
function fullScreen(theURL)
						{
							window.open(theURL, '', 'fullscreen=yes, scrollbars=no');
						}
						
						function DisplayRow()
						{
							var row = document.getElementById("CityRow");
							if(row != null)
							row.style.display = 'none';
							//document.getElementById("drpCity").disabled=true;
						}
						
						function AssignICODE()
						{
							//alert("Hello");
							//document.Register.icode.value = document.Register.CountryId[document.Register.CountryId.selectedIndex].value;
							//document.Register.scode.focus();
							
							var val = document.frmContact.drCountry[document.frmContact.drCountry.selectedIndex].value;
							if(val.indexOf("#")!=-1)
							{
								var Icode = val.split("#")
								document.frmContact.txticode.value = Icode[1];
							}
							
							var row = document.getElementById("CityRow");
							row.style.display = 'none';
							
							if(document.frmContact.txticode.value == '+91')
							{
								//document.getElementById("drpCity").disabled=false;
								row.style.display = '';
							}
									
						}

function submitForm()
{
	if(validateCallme())
	{
		document.frmContact.method="post"; 
		document.frmContact.submit();  
	}
}
function validateCallme()
{
	
	
	var ICode = jtrim(document.frmContact.txticode.value);
	var Telephone	 =	jtrim(document.frmContact.txtphone.value);		
	var Phone = ICode +  Telephone;
	
	if ((jtrim(document.frmContact.txtname.value) == "") || (jtrim(document.frmContact.txtname.value) == "Null"))
	{
	alert ("Please enter your Name");
	document.frmContact.txtname.focus();
	return false;
	}


       if(document.frmContact.CountryId[document.frmContact.CountryId.selectedIndex].value =="")
					{
						alert("Please select a country");
						document.frmContact.CountryId.focus();
						return false;
 					}

                                 if (document.frmContact.CountryId.options[document.frmContact.CountryId.selectedIndex].text=="India")
						{
							if (document.frmContact.drpTryCity.options[document.frmContact.drpTryCity.selectedIndex].value=="")
							{
							alert ("Please select a City");
							document.frmContact.drpTryCity.value="";
							document.frmContact.drpTryCity.focus();
							return false;
							}
						}



			
	stremail = 	jtrim(document.frmContact.txtemail.value)
	if ((jtrim(document.frmContact.txtemail.value) == "") || (jtrim(document.frmContact.txtemail.value) == "Null"))
		{
		alert ("Please enter your Email ID");
		document.frmContact.txtemail.focus();
		return false;
		}
	
	if(jtrim(stremail).length >= 0)	
			{
				if(emailvalidate(stremail) == false)
				{
					document.frmContact.txtemail.value="";
					document.frmContact.txtemail.focus();
					return false;
				}
			}
			
	strorganization = 	jtrim(document.frmContact.txtorganization.value)
	if ((jtrim(document.frmContact.txtorganization.value) == "") || (jtrim(document.frmContact.txtorganization.value) == "Null"))
		{
		alert ("Please enter your Organization");
		document.frmContact.txtorganization.focus();
		return false;
		}
		
		
			
			if (Telephone=='')
			{
				alert("Please enter your Phone Number")
				document.frmContact.txtphone.focus();
				return false;
			}
			
			if (checkInternationalPhone(Phone)==false)
			{
				alert("Please enter a valid Phone Number")
				document.frmContact.txtphone.value="";
				document.frmContact.txticode.value ="";
				document.frmContact.txtphone.focus();
				return false;
			}




			if (document.frmContact.Chk1.checked != true)
			{
				alert("Please make your Webinar choice")
				return false;
			}
				
	return true;
}
//vijay code
function validateCallmeForBPM() {


    var ICode = jtrim(document.frmContact.txticode.value);
    var Telephone = jtrim(document.frmContact.txtphone.value);
    var Phone = ICode + Telephone;

    if ((jtrim(document.frmContact.txtname.value) == "") || (jtrim(document.frmContact.txtname.value) == "Null")) {
        alert("Please enter your Name");
        document.frmContact.txtname.focus();
        return false;
    }


    if (document.frmContact.CountryId[document.frmContact.CountryId.selectedIndex].value == "") {
        alert("Please select a country");
        document.frmContact.CountryId.focus();
        return false;
    }

    if (document.frmContact.CountryId.options[document.frmContact.CountryId.selectedIndex].text == "India") {
        if (document.frmContact.drpTryCity.options[document.frmContact.drpTryCity.selectedIndex].value == "") {
            alert("Please select a City");
            document.frmContact.drpTryCity.value = "";
            document.frmContact.drpTryCity.focus();
            return false;
        }
    }




    stremail = jtrim(document.frmContact.txtemail.value)
    if ((jtrim(document.frmContact.txtemail.value) == "") || (jtrim(document.frmContact.txtemail.value) == "Null")) {
        alert("Please enter your Email ID");
        document.frmContact.txtemail.focus();
        return false;
    }

    if (jtrim(stremail).length >= 0) {
        if (emailvalidate(stremail) == false) {
            document.frmContact.txtemail.value = "";
            document.frmContact.txtemail.focus();
            return false;
        }
    }

    strorganization = jtrim(document.frmContact.txtorganization.value)
    if ((jtrim(document.frmContact.txtorganization.value) == "") || (jtrim(document.frmContact.txtorganization.value) == "Null")) {
        alert("Please enter your Organization");
        document.frmContact.txtorganization.focus();
        return false;
    }



    if (Telephone == '') {
        alert("Please enter your Phone Number")
        document.frmContact.txtphone.focus();
        return false;
    }

    if (checkInternationalPhone(Phone) == false) {
        alert("Please enter a valid Phone Number")
        document.frmContact.txtphone.value = "";
        document.frmContact.txticode.value = "";
        document.frmContact.txtphone.focus();
        return false;
    }




    if ((document.frmContact.Chk1.checked != true) && (document.frmContact.Chk2.checked != true) && (document.frmContact.Chk3.checked != true) && (document.frmContact.Chk4.checked != true)) {
        alert("Please make your BPM-Resource choice")
        return false;
    }

    return true;
}
//end of vijay code

// Function to validate  Phone number
 function isValidPhone(strPh,lenPh)
 {
	// Phone number validation
		// should have minimum 'lenPh' digits and should not have the characters other than allowed characters
		var strPhone,strPhoneTemp
		var errFlag
		errFlag = false
		// allowed characters for phone number
		strPhone = "0123456789 -.,"
		strPhoneTemp = strPh
		//alert('len :'+strPhoneTemp.length)
		if(parseInt(strPhoneTemp.length) < parseInt(lenPh))
		{
			errFlag = true
		}
		else
		{
				var numCount
				numCount = 0;
				
				
				for(i=0;i<strPhoneTemp.length;i++)
				{
				  if(isNaN(parseInt(strPhoneTemp.charAt(i))) == false)
				  {
					 numCount = numCount + 1;
				  } 
				}
				
				//alert('numCount'+numCount)
				if (parseInt(numCount) < parseInt(lenPh))
				{
				 errFlag = true
				}  
				else
				{
					for(i=0;i<strPhoneTemp.length;i++)
					{
					  if(isNaN(strPhoneTemp.charAt(0)) == true)
					  {
						 errFlag = true
					    break;
					  } 
					  if (strPhone.indexOf(strPhoneTemp.charAt(i)) == -1)
					  {
					   errFlag = true
					   break;
					  }
					}
				}	
		 }		
		
		if (errFlag == true)
			return false;
		if (errFlag == true)
			return true;
 }	
function clearevent()
{
	document.frmContact.reset(); 
        
 
}

