function validate(){	
	if(document.form1.username.value==""){
		alert("Please enter the User Name      ");
		document.form1.username.focus();
		return false;
	}
	if(document.form1.pwd.value==""){
		alert("Please enter the password    ");
		document.form1.pwd.focus();
		return false;
	}
	if(document.form1.pwd2.value==""){
		alert("Please re-type the password    ");
		document.form1.pwd2.focus();
		return false;
	}
	if(document.form1.pwd.value!=document.form1.pwd2.value){
		alert("Passwords differ. Please re-enter the password    ");
		document.form1.pwd2.focus();
		return false;
	}
	if(document.form1.fname.value==""){
		alert("Please enter your name    ");
		document.form1.fname.focus();
		return false;
	}	
	if(document.form1.add1.value==""){
		alert("Please enter your address    ");
		document.form1.add1.focus();
		return false;
	}
	if(document.form1.city.value==""){
		alert("Please enter the name of your city    ");
		document.form1.city.focus();
		return false;
	}	
	if(document.form1.pincode.value==""){
		alert("Please enter pin/zip code    ");
		document.form1.pincode.focus();
		return false;
	}
	if(document.form1.phone1.value==""){
		alert("Please enter your phone number    ");
		document.form1.phone1.focus();
		return false;
	}	
}

function toggleMenu(objID) {
if (!document.getElementById) return;
var ob = document.getElementById(objID).style;
ob.display = (ob.display == 'block')?'none': 'block';
}

function showBrowse(){
	if(document.getElementById('bulk_sms').checked==true){
		getElementById('num_file_div').style.display='block';
	}
	else{
		num_file_div.style.display='none';
	}
	
}

function hidebox(){
crossobj=ns6? document.getElementById("showimage") : document.all.showimage
if (ie4||ns6)
crossobj.style.visibility="hidden"
else if (ns4)
document.showimage.visibility="hide"
}

function insertFields(){
	document.form1.sms_text.value=document.form1.sms_text.value+"{"+document.form1.select.value+"}";
	document.form1.text_len.value=document.form1.sms_text.value.length;
}

function validateSMSForm(){	
	if(document.form1.sms_from_name.value==""){
		alert("Please enter the Sender Name      ");
		document.form1.sms_from_name.focus();
		return false;
	}
	if(document.form1.sms_from_num.value<9400000000){
		alert("Please enter a GSM mobile number. Only GSM Numbers are allowed as Sender Number");
		document.form1.sms_from_num.focus();
		return false;
	}
}


var xmlHttp
function showValues(str){ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null){
		alert ("Browser does not support HTTP Request")
 		return
	}
	var url="getValues.php"
	url=url+"?aid="+str
	url=url+"&sid"+Math.random()
	xmlHttp.onreadystatechange=stateChanged 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}
function stateChanged(){ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ 
		document.getElementById("selVal").innerHTML=xmlHttp.responseText 
	}
}

function showAttribs(str){ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null){
		alert ("Browser does not support HTTP Request")
 		return
	}
	var url="getAttribs.php"
	url=url+"?pid="+str
	url=url+"&sid"+Math.random()
	xmlHttp.onreadystatechange=stateChanged1 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}
function stateChanged1(){ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ 
		document.getElementById("divAttribs").innerHTML=xmlHttp.responseText 
	}
}

function addDeliverables(){ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null){
		alert ("Browser does not support HTTP Request")
 		return
	}
	var cnt=parseInt(document.getElementById("attrib_counts").value);
	var attr;
	var val;
	var params="?oid="+document.getElementById("o_id").value+"&pid="+document.getElementById("selProdName").value+"&";
	for(var i = 1; i <= cnt; i++){
		attr="a"+i;
		val="v"+i;
		params=params+attr+"="+document.getElementById(attr).value+"&"+val+"="+document.getElementById(val).value+"&";
	}
	var url="addDeliverables.php"
	url=url+params
	url=url+"&sid"+Math.random()	
	xmlHttp.onreadystatechange=stateChanged2
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null)
}
function stateChanged2(){ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ 
		document.getElementById("divDeliverables").innerHTML=xmlHttp.responseText 
	}
}

function removeDeliverables(str){ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null){
		alert ("Browser does not support HTTP Request")
 		return
	}
	var oid=parseInt(document.getElementById("o_id").value);
	var url="remove_deliverables.php"
	url=url+"?i_no="+parseInt(str);
	url=url+"&o_id="+oid;
	url=url+"&sid"+Math.random()
	xmlHttp.onreadystatechange=stateChanged3
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}
function stateChanged3(){ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ 
		document.getElementById("divDeliverables").innerHTML=xmlHttp.responseText 
	}
}

function GetXmlHttpObject(){
	var xmlHttp=null;
	try{
		// Firefox, Opera 8.0+, Safari
 		xmlHttp=new XMLHttpRequest();
 	}
	catch (e){
		//Internet Explorer
 		try{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e){
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  		}
 	}
	return xmlHttp;
}

function viewOrdDetWin(strTarget){
	newWindow = window.open(strTarget,"WinName","toolbar=no,location=no,scrollbars=yes,width=400,height=500");
	
	return false;
}
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-7533185-1");
pageTracker._trackPageview();
} catch(err) {}

function validateEnquiryForm(){	

	if(document.form1.txtName.value==""){
		alert("Please enter your Name      ");
		document.form1.txtName.focus();
		return false;
	}
	if(document.form1.txtEmail.value==""){
		alert("Please enter your Email Id      ");
		document.form1.txtEmail.focus();
		return false;
	}
	if(document.form1.txtMobile.value==""){
		alert("Please enter your Mobile Number      ");
		document.form1.txtMobile.focus();
		return false;
	}
}

function openHathaYogaPopup(URLtoOpen, windowName, windowFeatures) {
newWindow=window.open(URLtoOpen, windowName, windowFeatures); }

<!-- Yahoo! 
var ysm_accountid = "14N9UNNLLQKQJS2SEUBLKQJ5LQ4"; 
document.write("<SCR" + "IPT language='JavaScript' type='text/javascript' " + "SRC=//" + "srv1.wa.marketingsolutions.yahoo.com" + "/script/ScriptServlet" + "?aid=" + ysm_accountid + "></SCR" + "IPT>"); 
// --> 