
function checkpage(totalpage,wantpage)
{
    if (parseInt(wantpage.value) > parseInt(totalpage))
    {
        alert("Page no does not exist.");
        wantpage.focus();
        return false;
    }
    if (emptyField(wantpage))
    {
        alert("Please enter page no.");
        wantpage.focus();
        return false;
    }
    if (!isInt(wantpage.value))
    {
        alert("Please enter numeric page no.");
        wantpage.focus();
        return false;
    }
}


function check_fields()
{
	var flag;
	if (emptyField(document.getElementById("Login_User1_txtUser")))
	{
		alert("Enter your Email Address");
		document.getElementById("Login_User1_txtUser").focus();
		return false;
	}
	
	arg=document.getElementById("Login_User1_txtUser").value;
	flag=check_email(arg);
	if (flag==0)
	{
		alert('Enter valid e-mail address.');
		document.getElementById("Login_User1_txtUser").focus();
		return false;	
	}
	if (emptyField(document.getElementById("Login_User1_txtPassword")))
	{
		alert("Enter Password");
		document.getElementById("Login_User1_txtPassword").focus();
		return false;
	}
}

function Signup_fields(txtFName, txtLName, txtEmail, txtPassword, txtRPassword, txtAddress1, txtCity, txtZip, ddlCountry)
{
	var arg;
	var flag;
	if (emptyField(txtFName)) {
	    alert('Please enter First Name');
	    txtFName.focus();
	    return false;
	}
	if (emptyField(txtLName)) {
	    alert('Please enter Last Name');
	    txtLName.focus();
	    return false;
	}
	if (emptyField(txtEmail))
	{
	    alert('Please enter Email');
		txtEmail.focus();
		return false;
	}
	if (!validEmailId(txtEmail.value)) {
	    alert('Please enter valid Email');
	    txtEmail.focus();
	    return false;
	}  



	if (emptyField(txtPassword))
	{
	    alert('Please enter Password');
		txtPassword.focus();
		return false;
	}


	if (!emptyField(txtPassword)) {
	    if (emptyField(txtRPassword)) {
	        alert('Please enter Confirm Password');
	        txtRPassword.focus();
	        txtRPassword.select();
	        return false;
	    }
	    if (txtPassword.value != txtRPassword.value) {
	        alert('Your Password & Confirm password are not matching');
	        txtRPassword.focus();
	        txtRPassword.select();
	        return false;
	    }
	} 
	if (emptyField(txtAddress1)) 
	{
	    alert('Please enter Address');
	    txtAddress1.focus();
	    return false;
	}

	if (emptyField(txtCity))
	 {
	     alert('Please enter City');
	    txtCity.focus();
	    return false;
	}

	if (emptyField(txtZip)) 
	{
	    alert('Please enter Post/Zip code');
	    txtZip.focus();
	    return false;
	}


	if (ddlCountry.value == "0") {
	    alert('Select Your Country.');
	    ddlCountry.focus();
	    return false;
	}
	
}

/*function check_product(i)
{
	if(i.value==0)
	{
		alert('Select product');
		return false;
	}
}*/
function check_product(i,pid)
{
//pvalueid
//pid

document.getElementById("SearchProducts1_pvalueid").value=i.value;
document.getElementById("SearchProducts1_pid").value=pid;

//alert('pvalueid ' + document.getElementById("SearchProducts1_pvalueid").value);
//alert('pid ' + document.getElementById("SearchProducts1_pid").value);

//return false;
	/*if(i.value==0)
	{
		alert('Select product');
		return false;
	}*/
}

function check_product1(i,pid)
{
//pvalueid
//pid

document.getElementById("View_products1_pvalueid").value=i.value;
document.getElementById("View_products1_pid").value=pid;
//alert('pvalueid ' + document.getElementById("View_products1_pvalueid").value);
//alert('pid ' + document.getElementById("View_products1_pid").value);
}
function emptyField(textobj)
{
	
	if(textobj.value.length==0)
	{
		 textobj.focus();
		 return true;
	}
	for(var i=0;i < textobj.value.length;++i)
	{
		var ch =textobj.value.charAt(i);
	if(ch!=' '&&ch!= '\t') 
		return false;
	}
	textobj.focus();
	return true;
}
function isInt(argvalue) 
{
	argvalue = argvalue.toString();

	if (argvalue.length == 0)
	{
		return true;
	}

	for (var n = 0; n < argvalue.length ; n++)
	{
	
		if(argvalue.substring(n, n+1) == "0")
			continue;
			
		else if(argvalue.substring(n, n+1) == "1")
			continue;
			
		else if(argvalue.substring(n, n+1) == "2")
			continue;
			
		else if(argvalue.substring(n, n+1) == "3")
			continue;
			
		else if(argvalue.substring(n, n+1) == "4")
			continue;
			
		else if(argvalue.substring(n, n+1) == "5")
			continue;
				
		else if(argvalue.substring(n, n+1) == "6")
			continue;
				
		else if(argvalue.substring(n, n+1) == "7")
			continue;
				
		else if(argvalue.substring(n, n+1) == "8")
			continue;
			
		else if(argvalue.substring(n, n+1) == "9")
			continue;
			
		/*else if(argvalue.substring(n, n+1) == " ")
			continue;*/
			
		else
			return false;

	}
return true;
}
function check_qty(txtqty) {
    
				var test =0;
				var con = 2;
				for (var i=0; i<document.aspnetForm.length; i++)
				{
				
					        
					        
							if (emptyField(document.getElementById("ctl00_ContentPlaceHolder1_DataGrid1_ctl0"+con+"_txtqty")))
								{
									alert('Please enter Quantity');
									document.getElementById("ctl00_ContentPlaceHolder1_DataGrid1_ctl0"+con+"_txtqty").focus();
									return false;
								}
								
							if (document.getElementById("ctl00_ContentPlaceHolder1_DataGrid1_ctl0"+con+"_txtqty").value < 1)
								
								{
									alert('Quentity must be Greater then Zero.');
									document.getElementById("ctl00_ContentPlaceHolder1_DataGrid1_ctl0"+con+"_txtqty").focus();
									return false;
								}
					
							if (!isInt(document.getElementById("ctl00_ContentPlaceHolder1_DataGrid1_ctl0"+con+"_txtqty").value))
								
								{
									alert('Please enter Integer value.');
									document.getElementById("ctl00_ContentPlaceHolder1_DataGrid1_ctl0"+con+"_txtqty").focus();
									return false;
								}
					
					
						con =con + 1;			
				}
}







function set_shippingInfo(chkShip,txtFName,txtLName,txtEmail,txtAddress1,txtCity,txtState,txtZip,ddlCountry,txtother,txtPhone,txtSFName,txtSLName,txtSEmail,txtSAddress1,txtSCity,txtSState,txtSZip,ddlSCountry,txtSother,txtSPhone)
{
//txtSFName,txtSLName,txtSEmail,txtSAddress1,txtSCity,txtSState,txtSZip,ddlSCountry,txtSother,txtSPhone
	if(chkShip.checked==true)
	{
		txtSFName.value =txtFName.value;
		txtSLName.value = txtLName.value;
		txtSEmail.value = txtEmail.value;
		txtSAddress1.value = txtAddress1.value;
		txtSCity.value = txtCity.value;
		txtSState.value = txtState.value;
		txtSZip.value = txtZip.value;
		ddlSCountry.value = ddlCountry.value;
		txtSother.value = txtother.value;
		txtSPhone.value = txtPhone.value;
		
	}
	else if (chkShip.checked == false)
	{
		txtSFName.value = "";
		txtSLName.value = "";
		txtSEmail.value = "";
		txtSAddress1.value = "";
		txtSCity.value = "";
		txtSState.value = "";
		txtSZip.value = "";
		ddlSCountry.value = "";
		txtSother.value = "";
		txtSPhone.value = "";
	}
}
function check_billingInfo(txtFName, txtLName, txtEmail, txtAddress1, txtCity, txtState, txtZip, ddlCountry, txtother, txtPhone, txtSFName, txtSLName, txtSEmail, txtSAddress1, txtSCity, txtSState, txtSZip, ddlSCountry, txtSother, txtSPhone)
{
	var arg;
	var flag;
	
	
	// check billing info fields
	if (emptyField(txtFName))
	{
		alert("Enter your First Name");
		txtFName.focus();
		return false;
	}
	if (emptyField(txtLName))
	{
		alert("Enter your Last Name");
		txtLName.focus();
		return false;
    }
    if (emptyField(txtEmail)) {
        alert('Enter your Email');
        txtEmail.focus();
        return false;
    }
    if (!validEmailId(txtEmail.value)) {
        alert('Please enter valid Email');
        txtEmail.focus();
        return false;
    }
    if (emptyField(txtAddress1)) {
        alert('Enter your First Address');
        txtAddress1.focus();
        return false;
    }

  
    if (emptyField(txtCity)) {
        alert('Enter your City');
        txtCity.focus();
        return false;
    }
 

    if (emptyField(txtZip)) {
        alert('Enter your Post/Zip code');
        txtZip.focus();
        return false;
    }

    if (ddlCountry.value == "0")
	{
		alert('Select Your Country.');
		ddlCountry.focus();
		return false;
	}
	
	 if (emptyField(txtSFName)) {
        alert('Enter shipping First Name');
        txtSFName.focus();
        return false;
    }
	
	 if (emptyField(txtSLName)) {
        alert('Enter shipping Last Name');
        txtSLName.focus();
        return false;
    }
	
	  if (emptyField(txtSEmail)) {
        alert('Enter shipping Email');
        txtSEmail.focus();
        return false;
    }
    if (!validEmailId(txtSEmail.value)) {
        alert('Please enter valid shipping Email');
        txtSEmail.focus();
        return false;
    }
	


	  if (emptyField(txtSAddress1)) {
        alert('Enter shipping Address');
        txtSAddress1.focus();
        return false;
    }
	
	  if (emptyField(txtSCity)) {
        alert('Enter shipping City');
        txtSCity.focus();
        return false;
    }
	
	  if (emptyField(txtSZip)) {
        alert('Enter shipping Post/Zip code');
        txtSZip.focus();
        return false;
    }
	
	  if (ddlSCountry.value == "0")
	{
		alert('Select Your shipping Country.');
		ddlSCountry.focus();
		return false;
	}
	
	
	
	
}


function getObjectByID(Objid){	
				var ns4 = document.layers;
			var ns6 = document.getElementById && !document.all;
			var ie4 = document.all;
				if(ns4)
				{
					return eval('document.' + Objid)
				}
				if(ns6)
				{
					return document.getElementById(Objid);
				}
				if(ie4)
				{
					return document.all(Objid);      
				}  
				return null
			}


			function SetText(objid,msg, fg, bg){
				var ns4 = document.layers;
			var ns6 = document.getElementById && !document.all;
			var ie4 = document.all;
				if(!fg) fg = "#ff0000";
				if(!bg) bg = "#FFFFFF";
				
				var content = msg ;
				if(ns4)
				{
					objItm = eval('document.' + objid)
					objItm.document.write(content);
					objItm.document.close();
					objItm.visibility = "visible";
				}
				if(ns6)
				{
					document.getElementById(objid).innerHTML = content;
				}
				if(ie4)
				{
					document.all(objid).innerHTML=content;
				}  
			}
			
			
		///vishal script//	
		/*function check_radiobutton()
		{ 
			var i;
			var tot;
			for(i=0;i<document.Form1.length;i++)
			{
				if(document.Form1.elements[i].type=="radio")
				{
					if(document.Form1.elements[i].checked==true)
					{
						document.getElementById("NetPrc").value	 = parseFloat(document.getElementById("subtot").value) + parseFloat(document.Form1.elements[i].value);
					}
				}
				
			}
			//alert('discount: ' +document.getElementById("dis").value);
			if (document.getElementById("dis").value!="")
			{
			document.getElementById("NetPrc").value	=parseFloat(document.getElementById("NetPrc").value) - parseFloat(document.getElementById("dis").value);		
			}
			tot=(parseFloat(document.getElementById("NetPrc").value)).toFixed(2);			
					
			SetText("Contenttot", tot);
		}*/
		
		//end of vishal script
		
		function check_radiobutton()
		{ 
			var i;
			var tot;
			for(i=0;i<document.Form1.length;i++)
			{
				if(document.Form1.elements[i].type=="radio")
				{
					if(document.Form1.elements[i].checked==true)
					{
						document.getElementById("NetPrc").value	 = parseFloat(document.getElementById("subtot").value) + parseFloat(document.Form1.elements[i].value);
					}
				}
				
			}
		
			if (document.getElementById("dis").value!="")
			{
			document.getElementById("NetPrc").value	=parseFloat(document.getElementById("NetPrc").value) - parseFloat(document.getElementById("dis").value); 		
			}
			
			document.getElementById("NetPrc").value = parseFloat(document.getElementById("NetPrc").value) - parseFloat(document.getElementById("spdis").value);
			
			tot=(parseFloat(document.getElementById("NetPrc").value)).toFixed(2);			
					
			SetText("Contenttot", tot);
		}
		
		
		
		function checkKey(b1,e)
		{
			if (e.keyCode == 13)
			{
				document.getElementById(b1).click();
				return false;
			}
		}	
		
		
		function check_review()
        {
	        var flag;
	        if (emptyField(document.getElementById("ctl00_ContentPlaceHolder1_txtEmail")))
	        {
		        alert("Enter your Email Address");
		        document.getElementById("ctl00_ContentPlaceHolder1_txtEmail").focus();
		        return false;
	        }
        	
	        arg=document.getElementById("ctl00_ContentPlaceHolder1_txtEmail").value;
	        flag=validEmailId(arg);
	        if (flag==false)
	        {
		        alert('Enter valid e-mail address.');
		        document.getElementById("ctl00_ContentPlaceHolder1_txtEmail").focus();
		        return false;	
	        }
	        if (emptyField(document.getElementById("ctl00_ContentPlaceHolder1_txtName")))
	        {
		        alert("Enter Your Name");
		        document.getElementById("ctl00_ContentPlaceHolder1_txtName").focus();
		        return false;
	        }
	        if (emptyField(document.getElementById("ctl00_ContentPlaceHolder1_txtalbum")))
	        {
		        alert("Enter Album Name");
		        document.getElementById("ctl00_ContentPlaceHolder1_txtalbum").focus();
		        return false;
	        }
	        if (emptyField(document.getElementById("ctl00_ContentPlaceHolder1_txtcomments")))
	        {
		        alert("Enter Comments");
		        document.getElementById("ctl00_ContentPlaceHolder1_txtcomments").focus();
		        return false;
	        }
        }
        
        function checkmailfields()
        {
            var flag;
	        if (emptyField(document.getElementById("ctl00_ContentPlaceHolder1_txtnameReci")))
	        {
		        alert("Enter Name of Recipient");
		        document.getElementById("ctl00_ContentPlaceHolder1_txtnameReci").focus();
		        return false;
	        }
	        
	        if (emptyField(document.getElementById("ctl00_ContentPlaceHolder1_txtemailRecipi")))
	        {
		        alert("Enter E-mail of Recipient");
		        document.getElementById("ctl00_ContentPlaceHolder1_txtemailRecipi").focus();
		        return false;
	        }
        	
	        arg=document.getElementById("ctl00_ContentPlaceHolder1_txtemailRecipi").value;
	        flag=validEmailId(arg);
	        if (flag==false)
	        {
		        alert('Enter Valid E-mail Address of Recipient.');
		        document.getElementById("ctl00_ContentPlaceHolder1_txtemailRecipi").focus();
		        return false;	
	        }
	        
	        if (emptyField(document.getElementById("ctl00_ContentPlaceHolder1_txtyourname")))
	        {
		        alert("Enter Your Name");
		        document.getElementById("ctl00_ContentPlaceHolder1_txtyourname").focus();
		        return false;
	        }
	        if (emptyField(document.getElementById("ctl00_ContentPlaceHolder1_txtyourmail")))
	        {
		        alert("Enter Your E-mail");
		        document.getElementById("ctl00_ContentPlaceHolder1_txtyourmail").focus();
		        return false;
	        }
        	
	        arg=document.getElementById("ctl00_ContentPlaceHolder1_txtyourmail").value;
	        flag=validEmailId(arg);
	        if (flag==false)
	        {
		        alert('Enter Your Valid E-mail Address.');
		        document.getElementById("ctl00_ContentPlaceHolder1_txtyourmail").focus();
		        return false;	
	        }
	        if (emptyField(document.getElementById("ctl00_ContentPlaceHolder1_txtmessage")))
	        {
		        alert("Enter Your Message");
		        document.getElementById("ctl00_ContentPlaceHolder1_txtmessage").focus();
		        return false;
	        }
        }
        
        function resetmailfields()
        {
            
            document.getElementById("ctl00_ContentPlaceHolder1_txtnameReci").value=""
            document.getElementById("ctl00_ContentPlaceHolder1_txtemailRecipi").value=""
            document.getElementById("ctl00_ContentPlaceHolder1_txtyourname").value=""
            document.getElementById("ctl00_ContentPlaceHolder1_txtyourmail").value=""
            document.getElementById("ctl00_ContentPlaceHolder1_txtmessage").value=""
            return false;
        }
        
        function check_contactus()
        {
            var flag;
	        if (emptyField(document.getElementById("ctl00_ContentPlaceHolder1_txtEmail")))
	        {
		        alert("Enter your Email Address");
		        document.getElementById("ctl00_ContentPlaceHolder1_txtEmail").focus();
		        return false;
	        }
        	
	        arg=document.getElementById("ctl00_ContentPlaceHolder1_txtEmail").value;
	        flag=validEmailId(arg);
	        if (flag==false)
	        {
		        alert('Enter valid e-mail address.');
		        document.getElementById("ctl00_ContentPlaceHolder1_txtEmail").focus();
		        return false;	
	        }
	        if (emptyField(document.getElementById("ctl00_ContentPlaceHolder1_txtName")))
	        {
		        alert("Enter Your Name");
		        document.getElementById("ctl00_ContentPlaceHolder1_txtName").focus();
		        return false;
	        }
	        
	        if (emptyField(document.getElementById("ctl00_ContentPlaceHolder1_txtcomments")))
	        {
		        alert("Enter Comments");
		        document.getElementById("ctl00_ContentPlaceHolder1_txtcomments").focus();
		        return false;
	        }
        }
      
      
        
        function addtocartpro(prid,mdid,curr)
        {
            
            location.href="addcartquery.aspx?pid=" + prid + "&mid=" + mdid + "&curr=" + curr;
        }
    
        //function addtocartspecial(spid,mdid,curr)
        //{
            
        //    location.href="addcartquery.aspx?spid=" + spid + "&mid=" + mdid + "&curr=" + curr;
       // }

        function addtocartspecial(spid, mdid, curr, flag) {

            location.href = "subcart.aspx?sid=" + spid + "&mdid=" + mdid + "&curr=" + curr + "&flag=" + flag;
        }
    
        function checkshipfields()
        {
            var flag;
            
	        if (emptyField(document.getElementById("ctl00_ContentPlaceHolder1_txtFname")))
	        {
		        alert("Enter First Name");
		        document.getElementById("ctl00_ContentPlaceHolder1_txtFname").focus();
		        return false;
	        }
	        if (emptyField(document.getElementById("ctl00_ContentPlaceHolder1_txtLname")))
	        {
		        alert("Enter Last Name");
		        document.getElementById("ctl00_ContentPlaceHolder1_txtLname").focus();
		        return false;
	        }
	        
	        if (emptyField(document.getElementById("ctl00_ContentPlaceHolder1_txtEmail")))
	        {
		        alert("Enter E-mail Address");
		        document.getElementById("ctl00_ContentPlaceHolder1_txtEmail").focus();
		        return false;
	        }
        	
	        arg=document.getElementById("ctl00_ContentPlaceHolder1_txtEmail").value;
	        flag=validEmailId(arg);
	        if (flag==false)
	        {
		        alert('Enter Valid E-mail Address');
		        document.getElementById("ctl00_ContentPlaceHolder1_txtEmail").focus();
		        return false;	
	        }
	        
	        if (emptyField(document.getElementById("ctl00_ContentPlaceHolder1_txtAdd1")))
	        {
		        alert("Enter First Address");
		        document.getElementById("ctl00_ContentPlaceHolder1_txtAdd1").focus();
		        return false;
	        }
	        if (emptyField(document.getElementById("ctl00_ContentPlaceHolder1_txtCity")))
	        {
		        alert("Enter City");
		        document.getElementById("ctl00_ContentPlaceHolder1_txtCity").focus();
		        return false;
	        }
	        if (emptyField(document.getElementById("ctl00_ContentPlaceHolder1_txtState")))
	        {
		        alert("Enter State");
		        document.getElementById("ctl00_ContentPlaceHolder1_txtState").focus();
		        return false;
	        }
	        if (emptyField(document.getElementById("ctl00_ContentPlaceHolder1_txtZip")))
	        {
		        alert("Enter Zip/Postal Code");
		        document.getElementById("ctl00_ContentPlaceHolder1_txtZip").focus();
		        return false;
	        }
	        if (document.getElementById("ctl00_ContentPlaceHolder1_ddlCountry").value=="0")
	        {
		        alert("Please Select Country");
		        document.getElementById("ctl00_ContentPlaceHolder1_ddlCountry").focus();
		        return false;
	        }
	        if (emptyField(document.getElementById("ctl00_ContentPlaceHolder1_txtPhone")))
	        {
		        alert("Enter Phone Number");
		        document.getElementById("ctl00_ContentPlaceHolder1_txtPhone").focus();
		        return false;
	        }
        	
	        
        }
        
        
        function chk_price(symbol)
        {
            var prc;
            if(document.getElementById("ctl00_ContentPlaceHolder1_rbtnregular").checked == true)
            {
                document.aspnetForm.ctl00_ContentPlaceHolder1_shiptot.value=document.getElementById("ctl00_ContentPlaceHolder1_Hregular").value
                //alert(document.getElementById("ctl00_ContentPlaceHolder1_Hship").value);
                
                prc=parseFloat(document.getElementById("ctl00_ContentPlaceHolder1_prdtot").value) + parseFloat(document.getElementById("ctl00_ContentPlaceHolder1_Hregular").value);
                document.aspnetForm.ctl00_ContentPlaceHolder1_nt.value=prc;
                //alert(prc.toFixed(2));
                SetText("dvTotal",symbol + prc.toFixed(2));
            }
            else if(document.getElementById("ctl00_ContentPlaceHolder1_rbtnNext").checked == true)
            {
                document.aspnetForm.ctl00_ContentPlaceHolder1_shiptot.value=document.getElementById("ctl00_ContentPlaceHolder1_Hnext").value
                //alert(document.getElementById("ctl00_ContentPlaceHolder1_Hship").value);
                
                prc=parseFloat(document.getElementById("ctl00_ContentPlaceHolder1_prdtot").value) + parseFloat(document.getElementById("ctl00_ContentPlaceHolder1_Hnext").value);
                document.aspnetForm.ctl00_ContentPlaceHolder1_nt.value=prc;
                //alert(prc.toFixed(2));
                SetText("dvTotal",symbol + prc.toFixed(2));
            }
        }
        
        function checkNewsfields()
        {
            var flag;
            
	        if (emptyField(document.getElementById("ctl00_ContentPlaceHolder1_txtFname")))
	        {
		        alert("Enter First Name");
		        document.getElementById("ctl00_ContentPlaceHolder1_txtFname").focus();
		        return false;
	        }
	        if (emptyField(document.getElementById("ctl00_ContentPlaceHolder1_txtLname")))
	        {
		        alert("Enter Last Name");
		        document.getElementById("ctl00_ContentPlaceHolder1_txtLname").focus();
		        return false;
	        }
	        
	        if (emptyField(document.getElementById("ctl00_ContentPlaceHolder1_txtEmail")))
	        {
		        alert("Enter E-mail Address");
		        document.getElementById("ctl00_ContentPlaceHolder1_txtEmail").focus();
		        return false;
	        }
        	
	        arg=document.getElementById("ctl00_ContentPlaceHolder1_txtEmail").value;
	        flag=validEmailId(arg);
	        if (flag==false)
	        {
		        alert('Enter Valid E-mail Address');
		        document.getElementById("ctl00_ContentPlaceHolder1_txtEmail").focus();
		        return false;	
	        }
	        
	        if (emptyField(document.getElementById("ctl00_ContentPlaceHolder1_txtAddress")))
	        {
		        alert("Enter Address");
		        document.getElementById("ctl00_ContentPlaceHolder1_txtAddress").focus();
		        return false;
	        }
	        if (emptyField(document.getElementById("ctl00_ContentPlaceHolder1_txtCity")))
	        {
		        alert("Enter City");
		        document.getElementById("ctl00_ContentPlaceHolder1_txtCity").focus();
		        return false;
	        }
	        if (emptyField(document.getElementById("ctl00_ContentPlaceHolder1_txtState")))
	        {
		        alert("Enter State");
		        document.getElementById("ctl00_ContentPlaceHolder1_txtState").focus();
		        return false;
	        }
	        if (emptyField(document.getElementById("ctl00_ContentPlaceHolder1_txtZip")))
	        {
		        alert("Enter Zip/Postal Code");
		        document.getElementById("ctl00_ContentPlaceHolder1_txtZip").focus();
		        return false;
	        }
	        if (document.getElementById("ctl00_ContentPlaceHolder1_ddlCountry").value=="0")
	        {
		        alert("Please Select Country");
		        document.getElementById("ctl00_ContentPlaceHolder1_ddlCountry").focus();
		        return false;
	        }
	        if (emptyField(document.getElementById("ctl00_ContentPlaceHolder1_txtPhone")))
	        {
		        alert("Enter Phone Number");
		        document.getElementById("ctl00_ContentPlaceHolder1_txtPhone").focus();
		        return false;
	        }
        }
        
        
        function opensmallwindow(file,width,height,top,left)
        {
            awindow = window.open(file,"thewindow1","width="+width+",height="+height+",top="+top+",left="+left+",status=yes,resizable=yes,scrollbars=yes");
        }
        
        function opentellus(file,width,height,top,left)
        {
            awindow = window.open(file,"thewindow1","width="+width+",height="+height+",top="+top+",left="+left+",status=yes,resizable=no,scrollbars=no");
        }
        function openorder(file,width,height,top,left)
        {
            awindow = window.open(file,"thewindow1","width="+width+",height="+height+",top="+top+",left="+left+",status=yes,resizable=no,scrollbars=yes");
        }

        function opensmallwindowforsub(file, width, height, top, left,sver) {
            awindow = window.open( sver + file, "thewindow1", "width=" + width + ",height=" + height + ",top=" + top + ",left=" + left + ",status=yes,resizable=yes,scrollbars=yes");
        }
        
        function getvalue(ddlid, id, pid, sid, key, stype, companyid, chartid, conid, currentpage,sver,path)
         {

             location.href =sver + "sendpage.aspx?curr=" + ddlid.value + "&id=" + id + "&pid=" + pid + "&sid=" + sid + "&key=" + key + "&styp=" + stype + "&companyid=" + companyid + "&chartid=" + chartid + "&conid=" + conid + "&currentpage=" + currentpage + "&path=" + path;

           return false;

       }

       function getvalueformailtofriend(ddlid, id, pid, sid, key, stype, companyid, chartid, conid, currentpage, sver, path) {

           location.href = sver + "sendmailtofriend.aspx?curr=" + ddlid.value + "&id=" + id + "&pid=" + pid + "&sid=" + sid + "&key=" + key + "&styp=" + stype + "&companyid=" + companyid + "&chartid=" + chartid + "&conid=" + conid + "&currentpage=" + currentpage + "&path=" + path;

           return false;

       }
        
        
        function commonsearch(ddlid,pid) {

            pid.value = ddlid.value;

            return false;

        }
        function publishersearch(ddlid,  pid) {

            pid.value = ddlid.value;

            return false;

        }

     


