﻿// JScript File
function sendMail()
{
        var name = document.getElementById("first_name").value;
        var mail = document.getElementById("email").value;
        var phone = document.getElementById("Phone").value;
        
        if (name == "")
	    {
	        alert("Please Enter the Name !!");
	        document.getElementById("first_name").select();
	        return;
	    }
	    
	    
	    
	    if ( mail == "")
	    {
		    alert("Please Enter a Valid Email ID and Continue !!");
		    document.getElementById("email").select();
		    return;
	    }
        if ( phone == "")
		 {
		    alert("Please Enter the Phone!!");
		    document.getElementById("Phone").select();
		    return;
		 }
		  
         var url = "SendMail.aspx?nm='"+name+"'&mail='"+ mail +"'&ph='"+phone+"'";
         
        location.href = url;
        location.href=window.location;
        //alert("Thanks for your interest.\n Our sales team will contact you within 1 to 2 business days.");
        return;        
}



    function removeText(txtBox)
    {
        if(txtBox.value == "Name")
            txtBox.value = '';
         if(txtBox.value == "Email")
            txtBox.value = '';
        if(txtBox.value == "Phone")
            txtBox.value = '';
    }
    
    function getText(txtBox)
    {
        
        if(txtBox == 'first_name')
        {
          if(document.getElementById(txtBox).value == '')
            document.getElementById(txtBox).value = "Name";
        }
        if(txtBox == 'phone')
        {
          if(document.getElementById(txtBox).value == '')
            document.getElementById(txtBox).value = "Phone";
        }
        if(txtBox == 'email')
        {
          if(document.getElementById(txtBox).value == '')
            document.getElementById(txtBox).value = "Email";
        }
        
    }
    
    ///Google Analytics Code
    ///Google Analytics Account : tj@monetizemedia.com, changes
    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
    try 
    {
        var pageTracker = _gat._getTracker("UA-9040230-1");
        pageTracker._trackPageview();
    } 
    catch(err) 
    {
    }