
var left = (screen.width - 400)/2;
var top = (screen.height-500)/2;

///---------------------------------------------------------------------------------
function replace(instring)
{
	while(instring.indexOf(" ")>-1)
		instring = instring.replace(" ","%20");
	return(instring);
}	
///---------------------------------------------------------------------------------
function CityChange(flag)
{
	flag.value = "0";
}

///---------------------------------------------------------------------------------
	function getyearlydetail(sign)
	{
	window.open("YearlyForecast.asp?sign=" + sign ,"_blank","height=500,width=600,status=1,left=" + left + ",top=" + top+",resizable=false,scrollbars=yes");

	}

////------------------------------------------
//
//	function membershipcomparison()
//	{
//	window.open("http://www.Astrojeevan.com/Account/MembershipComparison.asp" ,"_blank","height=500,width=600,status=1,left=" + left + ",top=" + top+",resizable=false,scrollbars=yes");
//	window.open("http://192.168.0.1/Astrojeevan/Account/MembershipComparison.asp" ,"_blank","height=500,width=600,status=1,left=" + left + ",top=" + top+",resizable=false,scrollbars=yes");
//
//	}
//
//
////------------------------------------------
function viewdetail(docpath)
{
	window.open(docpath,"Browse","height=400,width=780,status=1,scrollbars=yes,left=" + left + ",top=" + top);
}


///---------------------------------------------------------------------------------
function refer()
{
	var str;
	var l;
	str=document.URL;
	str=str.toLowerCase();
	if (str.indexOf("default.asp?errorcode")==-1)
	{	
		window.document.LoginForm.retto.value = document.URL;
	}
	else
	{
		l=str.indexOf("?");
		window.document.LoginForm.retto.value = str.substr(0,l);
	}	
}

///---------------------------------------------------------------------------------
function onesc(t)
{
if (event.keyCode == 27)
	{
		t.value = "";
	}
}
///---------------------------------------------------------------------------------

function CheckCityLength(t)
{
if (t.value.length < 3)
	{
		alert("Enter First 3 Characters of the City");
		t.focus();
	}

}

///---------------------------------------------------------------------------------
function SelectCountry()
{	
	window.document.DataForm.action=document.URL;
	window.document.DataForm.selectcountry.value="yes";
	window.document.DataForm.BirthCity.value="";
	
	window.document.DataForm.submit();
}

///---------------------------------------------------------------------------------
function SelectLocationCountry()
{	
	window.document.DataForm.action=document.URL;
	window.document.DataForm.LocationCity.value="";
	window.document.DataForm.submit();
}

///---------------------------------------------------------------------------------
function onClickBirthCountryRadio()
{
	window.document.DataForm.BirthState.value = ""
	if (window.document.DataForm.CountryRadio[0].checked == true)
	{
		window.document.DataForm.BirthCountry.value = "USA"
		window.document.DataForm.BirthCountryCode.value = "USA"
	}
	if (window.document.DataForm.CountryRadio[1].checked == true)
	{
		window.document.DataForm.BirthCountry.value = "India"
		window.document.DataForm.BirthCountryCode.value = "India                   =INDIA,IN"
	}
	if (window.document.DataForm.CountryRadio[2].checked == true)
	{
		window.document.DataForm.BirthCountry.value = ""
		window.document.DataForm.BirthCountryCode.value = ""
		window.document.DataForm.BirthState.value = ""
		window.open("BrowseList.asp?form=DataForm&code=BirthCountryCode&name=BirthCountry&browse=country","Browse","height=400,width=300,status=1,left=" + left + ",top=" + top);
	}
	CityChange(document.DataForm.BirthCityVerified);
}

///---------------------------------------------------------------------------------
function onClickLocationCountryRadio()
{
	window.document.DataForm.LocationState.value = ""
	if (window.document.DataForm.LocCountryRadio[0].checked == true)
	{
		window.document.DataForm.LocationCountry.value = "USA"
		window.document.DataForm.LocationCountryCode.value = "USA"
	}
	if (window.document.DataForm.LocCountryRadio[1].checked == true)
	{
		window.document.DataForm.LocationCountry.value = "India"
		window.document.DataForm.LocationCountryCode.value = "India                   =INDIA,IN"
	}
	if (window.document.DataForm.LocCountryRadio[2].checked == true)
	{
		window.document.DataForm.LocationCountry.value = ""
		window.document.DataForm.LocationCountryCode.value = ""
		window.document.DataForm.LocationState.value = ""
		window.open("BrowseList.asp?form=DataForm&code=LocationCountryCode&name=LocationCountry&browse=country","Browse","height=400,width=300,status=1,left=" + left + ",top=" + top);
	}
	CityChange(document.DataForm.LocationCityVerified);
}

///---------------------------------------------------------------------------------
function getBirthState()
{
	if(document.DataForm.BirthCountry.value == "")
	{
		alert("Please fill in the country")
		return;
	}	
	if(document.DataForm.BirthCountry.value == "USA")
	{
		state = document.DataForm.BirthState.value;
		var str = document.DataForm.BirthCountry.value;	
		window.open("BrowseList.asp?form=DataForm&name=BirthState&browse=state&country=" + replace(str),"Browse","height=400,width=300,status=1,left=" + left + ",top=" + top);
	}
	else
		alert("State is not required");	
}

///---------------------------------------------------------------------------------
function getLocationState()
{
	if(document.DataForm.LocationCountry.value == "")
	{
		alert("Please fill in the country")
		return;
	}	
	if(document.DataForm.LocationCountry.value == "USA")
	{
		state = document.DataForm.LocationState.value;
		var str = document.DataForm.LocationCountry.value;	
		window.open("BrowseList.asp?form=DataForm&name=LocationState&browse=state&country=" + str,"Browse","height=400,width=300,status=1,left=" + left + ",top=" + top);
	}
	else
		alert("State is not required");	
}

///---------------------------------------------------------------------------------
function getBirthCity(fl)
{
	//document.DataForm.DayOfBirth.value = trim(document.DataForm.DayOfBirth.value);
	//document.DataForm.MonthOfBirth.value = trim(document.DataForm.MonthOfBirth.value);
	//document.DataForm.YearOfBirth.value = trim(document.DataForm.YearOfBirth.value);
	//document.DataForm.Hour.value = trim(document.DataForm.Hour.value);
	//document.DataForm.Minute.value = trim(document.DataForm.Minute.value);
	//document.DataForm.Second.value = trim(document.DataForm.Second.value);

	var yr="",mn,cn="",dy,hr,mi,sc,city="";
	if(document.DataForm.BirthCountry.value == "")
	{
		alert("Please fill in the Country.");
		return;
	}
	if(document.DataForm.BirthState.value == "" && document.DataForm.BirthCountry.value == "USA")
	{
		alert("Please fill in the State.");
		return;
	}
	if(document.DataForm.BirthCity.value=="" && fl==0)
	{
		alert("Please enter a City name.")
		return;
	}	 
	if(fl==1)
	{
		city = document.DataForm.BirthCity.value;
		return;
	}
	if(document.DataForm.DayOfBirth.value == "")
	{
		alert("Day cannot be left blank. Please enter a valid value for the Day.");
		return;
	}
	if(document.DataForm.MonthOfBirth.value == "")
	{
		alert("Month cannot be left blank. Please enter a valid value for the Month.");
		return;
	}
 	var yr = parseInt(document.DataForm.YearOfBirth.value);
	if(document.DataForm.YearOfBirth.value == "")
	{
		alert("Year cannot be left blank. Please enter a valid value for the Year.");
		return;
	}
	if(isNaN(parseInt(document.DataForm.YearOfBirth.value)))
	{
		alert("Please enter a valid year.");
		return;
	}
	if(isNaN(parseInt(document.DataForm.YearOfBirth.value)) || parseInt(document.DataForm.YearOfBirth.value) < 1805  || parseInt(document.DataForm.YearOfBirth.value) > 2045)
	{
		alert("The value for Year should be between 1805 and 2045.");
		return;
	}
	var mon = document.DataForm.MonthOfBirth.value
	if(isNaN(mon) || mon < 1 || mon > 12)
	{
		alert("Please enter a valid month.");
		return;
	}
	day  = parseInt(document.DataForm.DayOfBirth.value); 
	if(isNaN(day) || day < 1)
	{
		alert("Please enter a valid day.");
		return;
	}
	if((mon==1||mon==3||mon==5||mon==7||mon==8||mon==10||mon==12) && day >31)
	{
		alert("Please enter a valid day for the given month.");
		return;
	}
	if((mon==4||mon==6||mon==9||mon==11) && day >30)
	{
		alert("Please enter a valid day for the given month.");
		return;
	}
	if((mon==2 && yr%4==0 && day>29)||(mon==2 && yr%4!=0 && day>28))
	{
		alert("Please enter a valid day for the given month & year.");
		return;
	}
	hr = document.DataForm.Hour.value;
	if(isNaN(hr) || hr < 0 || hr > 23)
	{
		alert("Please enter a valid hour.");
		return;
	}
	mi = document.DataForm.Minute.value;
	if(isNaN(mi) || mi < 0 || mi > 59)
	{
		alert("Please enter a valid value for minutes.");
		return;
	}
	sc = document.DataForm.Second.value;
	if(isNaN(sc) || sc < 0 || sc > 59)
	{
		alert("Please enter a valid value for seconds.");
		return;
	}
	
	yr = document.DataForm.YearOfBirth.value;
	mn = document.DataForm.MonthOfBirth.value;
	dy = document.DataForm.DayOfBirth.value;
	hr = document.DataForm.Hour.value;
	mi = document.DataForm.Minute.value;
	sc = document.DataForm.Second.value;
	
	//	cn = yr.substring(0,2);
	//	yr = yr.substring(2);

	document.DataForm.IsBirthPopupOpen.value="1";
	
	var str =	replace(document.DataForm.BirthCountry.value) + "&state=" + replace(document.DataForm.BirthState.value) + "&city=" +
				replace(document.DataForm.BirthCity.value) + "&oldcity=" + replace(city);
			 
	str += "&hour=" + hr + "&minute=" + mi + "&second=" + sc + "&year=" + yr + "&month=" + mn 
			+ "&day=" + dy;
	str += "&Form=DataForm&CityField=BirthCity&ButtonField=Submit&StateField1=BirthState&StateField=BirthStateName&FlagField=IsBirthPopupOpen&Flag1Field=BirthCityVerified&Long=BirthLongitude&Lat=BirthLatitude&TZ=BirthTimezone&Dst=BirthDststr";
//	document.write(document.DataForm.Path.value + "/Account/CityList.asp?country=" + str,"Browse","height=400,width=780,status=1,scrollbars=yes,left=" + left + ",top=" + top);
	window.open( document.DataForm.Path.value + "/Account/CityList.asp?country=" + str,"Browse","height=400,width=820,status=1,scrollbars=yes,left=" + left + ",top=" + top);
}

///---------------------------------------------------------------------------------
function getBirthCity1(fl)
{
	//document.DataForm.DayOfBirth.value = trim(document.DataForm.DayOfBirth.value);
	//document.DataForm.MonthOfBirth.value = trim(document.DataForm.MonthOfBirth.value);
	//document.DataForm.YearOfBirth.value = trim(document.DataForm.YearOfBirth.value);
	//document.DataForm.Hour.value = trim(document.DataForm.Hour.value);
	//document.DataForm.Minute.value = trim(document.DataForm.Minute.value);
	//document.DataForm.Second.value = trim(document.DataForm.Second.value);

	var yr="",mn,cn="",dy,hr,mi,sc,city="";
	if(document.DataForm.BirthCountry.value == "")
	{
		alert("Please fill in the Country.");
		return;
	}

	if(document.DataForm.BirthState.value == "" && document.DataForm.BirthCountry.value == "USA")
	{
		alert("Please fill in the State.");
		return;
	}
	if(document.DataForm.BirthCity.value=="" && fl==0)
	{
		alert("Please enter a City name.")
		return;
	}	 
	if(fl==1)
	{
		city = document.DataForm.BirthCity.value;
		return;
	}
	if(document.DataForm.DateOfBirth.value == "")
	{
		alert("Date of Birth cannot be left blank. Please Put Proper Date of Birth.");
		return;
	}
	if(document.DataForm.TimeOfBirth.value == "")
	{
		alert("Time of Birth cannot be left blank. Please Put Proper Time of Birth.");
		return;
	}

	
	dateofbirth = document.DataForm.DateOfBirth.value;
	timeofbirth = document.DataForm.TimeOfBirth.value;
	yr = dateofbirth.substring(6);
	mn = dateofbirth.substring(3,5);
	dy = dateofbirth.substring(0,2);
	hr = timeofbirth.substring(0,2);
	mi = timeofbirth.substring(3,5);
	sc = timeofbirth.substring(6,8);
	if (timeofbirth.substring(9)=="PM")
		{if (hr!="12")
		     {hr=hr*1+12;}
		}
	document.DataForm.Hour.value=hr;
	document.DataForm.Minute.value=mi;
	document.DataForm.Second.value=sc;
	document.DataForm.DayOfBirth.value=dy;
	document.DataForm.MonthOfBirth.value=mn;
	document.DataForm.YearOfBirth.value=yr;



	//	cn = yr.substring(0,2);
	//	yr = yr.substring(2);

	document.DataForm.IsBirthPopupOpen.value="1";
	
	var str =	replace(document.DataForm.BirthCountry.value) + "&state=" + replace(document.DataForm.BirthState.value) + "&city=" +
				replace(document.DataForm.BirthCity.value) + "&oldcity=" + replace(city);
			 
	str += "&hour=" + hr + "&minute=" + mi + "&second=" + sc + "&year=" + yr + "&month=" + mn 
			+ "&day=" + dy;
	str += "&Form=DataForm&CityField=BirthCity&ButtonField=Submit&StateField1=BirthState&StateField=BirthStateName&FlagField=IsBirthPopupOpen&Flag1Field=BirthCityVerified&Long=BirthLongitude&Lat=BirthLatitude&TZ=BirthTimezone&Dst=BirthDststr";
//	document.write(document.DataForm.Path.value + "/Account/CityList.asp?country=" + str,"Browse","height=400,width=780,status=1,scrollbars=yes,left=" + left + ",top=" + top);
	window.open( document.DataForm.Path.value + "/Account/CityList.asp?country=" + str,"Browse","height=400,width=820,status=1,scrollbars=yes,left=" + left + ",top=" + top);
}
///---------------------------------------------------------------------------------
function getLocationCity(fl)
{
	currDate = new Date();
	document.DataForm.DayOfLocation.value = currDate.getDate();
	document.DataForm.MonthOfLocation.value = currDate.getMonth()+1;
	document.DataForm.YearOfLocation.value = currDate.getFullYear();
	document.DataForm.LocHour.value = currDate.getHours();
	document.DataForm.LocMinute.value = currDate.getMinutes();
	document.DataForm.LocSecond.value = currDate.getSeconds();

	var yr="",mn,cn="",dy,hr,mi,sc,city="";

	if(document.DataForm.LocationCountry.value == "")
	{
		alert("Please fill in the Country.");
		return;
	}
	if(document.DataForm.LocationState.value == "" && document.DataForm.LocationCountry.value == "USA")
	{
		alert("Please fill in the State.");
		return;
	}
	if(document.DataForm.LocationCity.value=="" && fl==0)
	{
		alert("Please enter a City name.")
		return;
	}	 
	if(fl==1)
	{
		city = document.DataForm.LocationCity.value;
		return;
	}
	if(document.DataForm.DayOfLocation.value == "")
	{
		alert("Day cannot be left blank. Please enter a valid value for the Day.");
		return;
	}
	if(document.DataForm.MonthOfLocation.value == "")
	{
		alert("Month cannot be left blank. Please enter a valid value for the Month.");
		return;
	}
	var yr = parseInt(document.DataForm.YearOfLocation.value);
	if(document.DataForm.YearOfLocation.value == "")
	{
		alert("Year cannot be left blank. Please enter a valid value for the Year.");
		return;
	}
	if(isNaN(parseInt(document.DataForm.YearOfLocation.value)))
	{
		alert("Please enter a valid Year.");
		return;
	}
	if(isNaN(parseInt(document.DataForm.YearOfLocation.value)) || parseInt(document.DataForm.YearOfLocation.value) < 1805  || parseInt(document.DataForm.YearOfLocation.value) > 2045)
	{
		alert("The value for Year should be between 1805 and 2045.");
		return;
	}
	var mon = document.DataForm.MonthOfLocation.value
	if(isNaN(mon) || mon < 1 || mon > 12)
	{
		alert("Please enter a valid Month.");
		return;
	}
	day  = parseInt(document.DataForm.DayOfLocation.value); 
	if(isNaN(day) || day < 1)
	{
		alert("Please enter a valid Day.");
		return;
	}
	if((mon==1||mon==3||mon==5||mon==7||mon==8||mon==10||mon==12) && day >31)
	{
		alert("Please enter a valid day for the given month.");
		return;
	}
	if((mon==4||mon==6||mon==9||mon==11) && day >30)
	{
		alert("Please enter a valid day for the given month.");
		return;
	}
	if((mon==2 && yr%4==0 && day>29)||(mon==2 && yr%4!=0 && day>28))
	{
		alert("Please enter a valid day for the given month & year.");
		return;
	}

	yr = document.DataForm.YearOfLocation.value;
	mn = document.DataForm.MonthOfLocation.value;
	dy = document.DataForm.DayOfLocation.value;
	hr = document.DataForm.LocHour.value;
	mi = document.DataForm.LocMinute.value;
	sc = document.DataForm.LocSecond.value;

//	cn = yr.substring(0,2);
//	yr = yr.substring(2);
	
	document.DataForm.IsLocPopupOpen.value="1";
//document.write("ok")

	var str = replace(document.DataForm.LocationCountry.value) + "&state=" + replace(document.DataForm.LocationState.value) + "&city=" +
			replace(document.DataForm.LocationCity.value) + "&oldcity=" + replace(city); 

	str += "&hour=" + hr + "&minute=" + mi + "&second=" + sc + "&year=" + yr + "&month=" + mn 
			+ "&day=" + dy;

	str = str + "&Form=DataForm&CityField=LocationCity&ButtonField=Submit&StateField1=LocationState&StateField=LocationStateName&FlagField=IsLocPopupOpen&Flag1Field=LocationCityVerified&Long=LocLongitude&Lat=LocLatitude&TZ=LocTimezone&Dst=LocDststr";
//	document.write(document.DataForm.Path.value + "/Account/CityList.asp?country=" + str,"Browse","height=400,width=780,status=1,scrollbars=yes,left=" + left + ",top=" + top);
	window.open( document.DataForm.Path.value + "/Account/CityList.asp?country=" + str,"Browse","height=400,width=780,status=1,scrollbars=yes,left=" + left + ",top=" + top);
}

///---------------------------------------------------------------------------------
function CheckLocationCity()
{
	if(document.DataForm.LocationCityVerified.value=="0")
	{
		alert("Please click on the Verify City button to validate your city.");
		return false;
	}
	if(document.DataForm.LocLongitude.value=="0")
	{
		alert("Please click on the Verify City button to validate your city.");
		return false;
	}
	if(document.DataForm.LocLatitude.value=="0")
	{
		alert("Please click on the Verify City button to validate your city.");
		return false;
	}
	//var city1 = (document.DataForm.LocCity1.value)
	//if(document.DataForm.LocationCity.value != city1)
	//{
	//	alert("Please verify city from the list as shown in pop window for Current location");
	//	return false;
	//}
	return true;
}

///---------------------------------------------------------------------------------
function CheckBirthCity()
{
	if(document.DataForm.BirthCityVerified.value=="0")
	{
		alert("Please click on the Verify City button to validate your city.");
		return false;
	}

	if(document.DataForm.BirthLongitude.value.length=="0")
	{
		alert("Please click on the Verify City button to validate your city.");
		return false;
	}

	if(document.DataForm.BirthLatitude.value.length=="0")
	{
		alert("Please click on the Verify City button to validate your city.");
		return false;
	}
	//var city1 = (document.DataForm.BirthCity1.value)
	//if(document.DataForm.BirthCity.value != city1)
	//{
	//	alert("Please verify city from the list as shown in pop window for Birth information");
	//	return false;
	//}
	return true;
}

///---------------------------------------------------------------------------------
function BirthDataChange(flag)
{
	flag.value = "0";
}

///---------------------------------------------------------------------------------
function SubmitDataForm()
{
	if (window.document.DataForm.FirstName.value=="")
	{
		alert("Please Enter First Name");
		window.document.DataForm.FirstName.focus();
		return false;
	}
	if (window.document.DataForm.LastName.value=="")
	{
		alert("Please Enter Last Name");
		window.document.DataForm.LastName.focus();
		return false;
	}
	if (window.document.DataForm.AccountID.value=="")
	{
		alert("Please Enter User Name");
		window.document.DataForm.AccountID.focus();
		return false;
	}
	str=window.document.DataForm.AccountID.value;
	if (str.indexOf('!')!=-1 || str.indexOf('#')!=-1 || str.indexOf('$')!=-1 || str.indexOf('%')!=-1 || str.indexOf('^')!=-1 || str.indexOf('&')!=-1 || str.indexOf('*')!=-1 || str.indexOf('/')!=-1 || str.indexOf("\\")!=-1 || str.indexOf('|')!=-1)
	{
		alert("Please Enter Valid User Name");
		window.document.DataForm.AccountID.focus();
		return false;
	}
	if (window.document.DataForm.Password.value=="")
	{
		alert("Please Enter Password");
		window.document.DataForm.Password.focus();
		return false;
	}
	if (window.document.DataForm.RePassword.value=="")
	{
		alert("Please Retype Password");
		window.document.DataForm.RePassword.focus();
		return false;
	}
	if (window.document.DataForm.Password.value.length<6)
	{
		alert("Invalid Password Length!");
		window.document.DataForm.Password.focus();
		return false;
	}
	if (window.document.DataForm.Password.value.length>15)
	{
		alert("Invalid Password Length!");
		window.document.DataForm.Password.focus();
		return false;
	}
	
	if (window.document.DataForm.Password.value!=window.document.DataForm.RePassword.value)
	{
		window.document.DataForm.Password.value="";
		window.document.DataForm.RePassword.value="";
		alert("Please Enter Password again");
		window.document.DataForm.Password.focus();
		return false;
	}

	if(CheckBirthCity())
	{	
		document.DataForm.BirthState.disabled=false;
		if (document.DataForm.cobrandid.value=="00001")
			{	
			document.DataForm.action=document.DataForm.Path.value + "/Account/ValidateAddMember.asp"
			}
		document.DataForm.submit();
		return true;

	}
	return false;
}

///---------------------------------------------------------------------------------
function loginsubmitenter(e)
{
if (e.keyCode == 13 || e.charCode ==13 || e.which ==13)
{
	checkem(window.document.LoginForm.AccountID);
	if  (testresults==true)
	{	
	checkpass(window.document.LoginForm.Password);
	}
	else
	{
	window.document.LoginForm.AccountID.focus();
	retrun(testresult);
	}
	
	if  (testresults==true)
	{
	window.document.LoginForm.submit();
	}
	else
	{
	window.document.LoginForm.Password.focus();
	}
		
}

}

///---------------------------------------------------------------------------------
function loginsubmitclick()
{
	checkem(window.document.LoginForm.AccountID);
	if  (testresults==true)
	{	
	checkpass(window.document.LoginForm.Password);
	}
	else
	{
	window.document.LoginForm.AccountID.focus();
	retrun(testresult);
	}
	
	if  (testresults==true)
	{
	window.document.LoginForm.submit();
	}
	else
	{
	window.document.LoginForm.Password.focus();
	}

}

///---------------------------------------------------------------------------------
function submitEmailForm()
{
	if(trim(window.document.EmailDataForm.Email.value) != "")
	{
		if(trim(window.document.EmailDataForm.Email.value).length <=5)
		{
			alert("Please enter valid Email address");
			window.document.EmailDataForm.Email.focus();		
			return false;
		}
		else 
		{
			str = trim(window.document.EmailDataForm.Email.value);
			atInd = str.indexOf("@");
			dotInd = str.indexOf(".");
			if(atInd<1 || dotInd<1 )
			{
				alert("Invalid Email address");
				window.document.EmailDataForm.Email.focus();		
				return false;
			}
		}
	}
	else
	{
	  alert("Please enter Email address");
	  window.document.EmailDataForm.Email.focus();		
	  return false;
	}
	document.EmailDataForm.submit();
	return true;
}

///---------------------------------------------------------------------------------
function SubmitAddProfileForm()
{
	if (window.document.DataForm.FirstName.value=="")
	{
		alert("Please Enter First Name");
		window.document.DataForm.FirstName.focus();
		return false;
	}
	if (window.document.DataForm.LastName.value=="")
	{
		alert("Please Enter Last Name");
		window.document.DataForm.LastName.focus();
		return false;
	}
	locLength = window.document.DataForm.locations.length;
	if(locLength=0 || !window.document.DataForm.locations[locLength-1].checked)
	{
		if(CheckBirthCity())
		{
			document.DataForm.submit();
			return true;
		}
	}
	else	//if(locLength>0 && window.document.DataForm.locations[locLength-1].checked)
	{
		if(CheckBirthCity() && CheckLocationCity())
		{
			document.DataForm.submit();
			return true;
		}
	}
	return false;
}

///---------------------------------------------------------------------------------
function SubmitEditProfileForm(flagAction)
{
	if (window.document.DataForm.FirstName.value=="")
	{
		alert("Please Enter First Name");
		window.document.DataForm.FirstName.focus();
		return false;
	}
	if (window.document.DataForm.LastName.value=="")
	{
		alert("Please Enter Last Name");
		window.document.DataForm.LastName.focus();
		return false;
	}
	if (flagAction==1)
	{
		if(trim(window.document.DataForm.Email.value) != "")
		{
			if(trim(window.document.DataForm.Email.value).length <=5)
			{
				alert("Please enter valid Email address");
				window.document.DataForm.Email.focus();		
				return false;
			}
			else 
			{
				str = trim(window.document.DataForm.Email.value);
				atInd = str.indexOf("@");
				dotInd = str.indexOf(".");
				if(atInd<1 || dotInd<1 )
				{
					alert("Invalid Email address");
					window.document.DataForm.Email.focus();		
					return false;
				}
			}
		}
		else
		{
			alert("Please enter Email address");
			window.document.DataForm.Email.focus();		
			return false;
		}
		if (window.document.DataForm.MemberType.checked)
		{
			if (window.document.DataForm.Address.value=="" || window.document.DataForm.Address.value==null)
			{
				alert("Please Enter Address for Gold Membership");
				window.document.DataForm.Address.focus();
				return false;
			}
			if (window.document.DataForm.City.value=="" || window.document.DataForm.City.value==null)
			{
				alert("Please Enter City for Gold Membership");
				window.document.DataForm.City.focus();
				return false;
			}
			if (window.document.DataForm.State.value=="" || window.document.DataForm.State.value==null)
			{
				alert("Please Enter State for Gold Membership");
				window.document.DataForm.State.focus();
				return false;
			}
			if (window.document.DataForm.Zip.value=="" || window.document.DataForm.Zip.value==null)
			{
				alert("Please Enter Zip for Gold Membership");
				window.document.DataForm.Zip.focus();
				return false;
			}
			if (window.document.DataForm.Country.value=="" || window.document.DataForm.Country.value==null)
			{
				alert("Please Enter Country for Gold Membership");
				window.document.DataForm.Country.focus();
				return false;
			}
			if (window.document.DataForm.Phone.value=="" || window.document.DataForm.Phone.value==null)
			{
				alert("Please Enter Phone Number for Gold Membership");
				window.document.DataForm.Phone.focus();
				return false;
			}
		}
	}
	if(CheckBirthCity())
	{
		document.DataForm.submit();
		return true;
	}
	return false;
}

///---------------------------------------------------------------------------------
function SubmitLocationForm()
{
	if (window.document.DataForm.LocationName.value=="")
	{ 
		alert("Please Enter First Name");
		window.document.DataForm.LocationName.focus();
		return false;
	}
	if(CheckLocationCity())
	{
		document.DataForm.LocationState.disabled=false;
		document.DataForm.action="ValidateLocation.asp";
		document.DataForm.submit();
		return true;
	}
	return false;
}

///---------------------------------------------------------------------------------
function SubmitCompatibility()
{
	if(document.CompatibilityForm.Partner.value == "-1")
	{
		alert("You should login first to order this report.");
		return;
	}
	if(document.CompatibilityForm.Partner.value == "-2")
	{
		alert("Please click on Add Partner to add the birth profile of your partner.");
		return;
	}
	var str1 = document.CompatibilityForm.ReportType.value;
	if(parseInt(document.CompatibilityForm.ReportPrice.value) > 0)
		document.CompatibilityForm.action = "../Transaction/AddTransaction.asp?Category=REPRT&Item="+str1;
	else
		document.CompatibilityForm.action = "../Transaction/DirectAddTransaction.asp?Category=REPRT&Item="+str1;

	document.CompatibilityForm.submit();
}

///---------------------------------------------------------------------------------
function SubmitMatchConsultation()
{
	if(document.CompatibilityForm.Partner.value == "-1")
	{
		alert("You should login first to order this report.");
		return;
	}
	if(document.CompatibilityForm.Partner.value == "-2")
	{
		alert("Please click on Add Partner to add the birth profile of your partner.");
		return;
	}
	var str1 = document.CompatibilityForm.ReportType.value;
	if(parseInt(document.CompatibilityForm.ReportPrice.value) > 0)
		//document.CompatibilityForm.action = "../Transaction/AddTransaction.asp?Category=CONSULTATION&Item="+str1;
		document.CompatibilityForm.action = "../Services/services.asp?Content=consultation&SubContent=policyTerms&Category=CONSULTATION&Item="+str1+"&ReportPrice="+parseInt(document.CompatibilityForm.ReportPrice.value);
	else
		//document.CompatibilityForm.action = "../Transaction/DirectAddTransaction.asp?Category=CONSULTATION&Item="+str1;
		document.CompatibilityForm.action = "../Services/services.asp?Content=consultation&SubContent=policyTerms&Category=CONSULTATION&Item="+str1+"&ReportPrice="+parseInt(document.CompatibilityForm.ReportPrice.value);

	document.CompatibilityForm.submit();
}

///---------------------------------------------------------------------------------
function SubmitMatchOnEmail()
{
	if(document.CompatibilityForm.Partner.value == "-1")
	{
		alert("You should login first to order this report.");
		return;
	}
	if(document.CompatibilityForm.Partner.value == "-2")
	{
		alert("Please click on Add Partner to add the birth profile of your partner.");
		return;
	}
	var str1 = document.CompatibilityForm.ReportType.value;
	if(parseInt(document.CompatibilityForm.ReportPrice.value) > 0)
		document.CompatibilityForm.action = "../Transaction/AddTransaction.asp?Category=HOROSCOPE&Item="+str1;
	else
		document.CompatibilityForm.action = "../Transaction/DirectAddTransaction.asp?Category=HOROSCOPE&Item="+str1;

	document.CompatibilityForm.submit();
}

///---------------------------------------------------------------------------------
function SubmitMatchAstrotalk()
{
	if(document.CompatibilityForm.Partner.value == "-1")
	{
		alert("You should login first to order this report.");
		return;
	}
	if(document.CompatibilityForm.Partner.value == "-2")
	{
		alert("Please click on Add Partner to add the birth profile of your partner.");
		return;
	}
	
	var str1 = document.CompatibilityForm.ReportType.value;
	document.CompatibilityForm.action = "../Services/services.asp?Content=astrotalk&SubContent=infoForm&Category=ASTROTALK&Item="+str1;
	document.CompatibilityForm.submit();
}

///---------------------------------------------------------------------------------
function submitAddressForm()
{
	if (window.document.AddressForm.AddressName.value=="")
	{
		alert("Please Enter Address Name");
		window.document.AddressForm.AddressName.focus();
		return false;
	}
	if (window.document.AddressForm.Address1.value=="" || window.document.AddressForm.Address1.value==null)
	{
		alert("Please Enter Address Line 1");
		window.document.AddressForm.Address1.focus();
		return false;
	}
	if (window.document.AddressForm.City.value=="")
	{
		alert("Please Enter City");
		window.document.AddressForm.City.focus();
		return false;
	}
	if (window.document.AddressForm.State.value=="")
	{
		alert("Please Enter State");
		window.document.AddressForm.State.focus();
		return false;
	}
	if (window.document.AddressForm.Zip.value=="")
	{
		alert("Please Enter Zip Code");
		window.document.AddressForm.Zip.focus();
		return false;
	}
	if (window.document.AddressForm.Phone.value=="")
	{
		alert("Please Enter Phone No.");
		window.document.AddressForm.Phone.focus();
		return false;
	}
	
	if (window.document.AddressForm.act.value=="add")
	{
		if (window.document.AddressForm.billing.checked==true)
		{
		window.document.AddressForm.billing.value="on"
		}
		else
		{
		window.document.AddressForm.billing.value="off"
		}

		if (window.document.AddressForm.shipping.checked==true)
		{
		window.document.AddressForm.shipping.value="on"
		}
		else
		{
		window.document.AddressForm.shipping.value="off"
		}
		document.AddressForm.action=document.AddressForm.Path.value + "/Account/ValidateAddress.asp?content=address&Action=add&retto="+document.AddressForm.retto.value
	}
	else
	{	
		document.AddressForm.action=document.AddressForm.Path.value + "/Account/ValidateAddress.asp?content=address&Action=edit&retto="+document.AddressForm.retto.value
	}	
	
	document.AddressForm.submit();
	return true;
}

///---------------------------------------------------------------------------------
function SetAddress(billObject)
{
	if (document.AddressForm.addresscount.value==0)
	{
		billObject.checked=true;
	}
}

///---------------------------------------------------------------------------------
function validatePassenter(e)
{
if (e.keyCode == 13 || e.charCode ==13 || e.which ==13)
{
validatePassword();
}

}
////------------------------------------------------
function validatePassword()
{
	if (window.document.DataForm.OldPassword.value=="")
	{
		alert("Please Enter Old Password");
		window.document.DataForm.OldPassword.focus();
		return false;
	}
	if (window.document.DataForm.NewPassword.value=="")
	{
		alert("Please Enter New Password");
		window.document.DataForm.NewPassword.focus();
		return false;
	}
	if (window.document.DataForm.RePassword.value=="")
	{
		alert("Please Retype New Password");
		window.document.DataForm.RePassword.focus();
		return false;
	}
	if (window.document.DataForm.OldPassword.value.length<6)
	{
		alert("Invalid Old Password !");
		window.document.DataForm.OldPassword.focus();
		return false;
	}
	if (window.document.DataForm.OldPassword.value.length>15)
	{
		alert("Invalid Old Password !");
		window.document.DataForm.OldPassword.focus();
		return false;
	}
	if (window.document.DataForm.NewPassword.value.length<6)
	{
		alert("Invalid New Password !");
		window.document.DataForm.NewPassword.focus();
		return false;
	}
	if (window.document.DataForm.RePassword.value.length<6)
	{
		alert("Invalid New Retyped-Password !");
		window.document.DataForm.RePassword.focus();
		return false;
	}
	if (window.document.DataForm.RePassword.value.length>15)
	{
		alert("Invalid New Retyped-Password !");
		window.document.DataForm.RePassword.focus();
		return false;
	}
	if (window.document.DataForm.NewPassword.value!=window.document.DataForm.RePassword.value)
	{
		window.document.DataForm.NewPassword.value="";
		window.document.DataForm.RePassword.value="";
		alert("Please Enter New Password again");
		window.document.DataForm.NewPassword.focus();
		return false;
	}
	window.document.DataForm.submit();
	return true;
}
///---------------------------------------------------------------------------------
function ShowLargeImage(imgName,description,height,width)
{
	var left = (screen.width - 450)/2;
	var top = (screen.height-550)/2;
	window.open("ShowImage.asp?Name="+imgName+"&desc="+description+"&height="+height+"&width="+width,"Astroved","height=450,width=550,status=1,left=" + left + ",top=" + top+",resizable=yes,scrollbars=yes");
}

///---------------------------------------------------------------------------------
function UpdateToDate()
{
	var n  = document.MuhurtaForm.Days.value;
	n = trim(n);
	if(! isNaN(parseInt(n)))
	{
		if(parseInt(n)>30)
		{
			alert("Muhurta period should not be more than 30 days.");
			document.MuhurtaForm.Days.value = "30";
			document.MuhurtaForm.Days.focus();
			n="30";
		}
		currentDate = new Date();
		if(parseInt(document.MuhurtaForm.FromYear.value) < 2005)
		{
			alert("You cannot cast a muhurta prior to January 2005.");
			document.MuhurtaForm.FromMonth.value = currentDate.getMonth()+1;
			document.MuhurtaForm.FromYear.value = currentDate.getYear();
			document.MuhurtaForm.FromMonth.focus();
		}
		else if(parseInt(document.MuhurtaForm.FromYear.value) > 2007)
		{
			alert("You cannot cast a muhurta beyond 2007.");
			document.MuhurtaForm.FromYear.value = currentDate.getFullYear();
			document.MuhurtaForm.FromMonth.value = currentDate.getMonth()+1;
			document.MuhurtaForm.FromYear.focus();
		}
		else
		{
			if(parseInt(document.MuhurtaForm.FromYear.value)==2007 && parseInt(document.MuhurtaForm.FromMonth.value)==12 && (parseInt(document.MuhurtaForm.FromDay.value) + parseInt(document.MuhurtaForm.Days.value)) > 31)
			{
				alert("You cannot cast a muhurta beyond December, 2007.");
				document.MuhurtaForm.FromMonth.value = currentDate.getMonth()+1;
				document.MuhurtaForm.FromYear.value = currentDate.getYear();
				document.MuhurtaForm.FromMonth.focus();
			}
		}
		if (parseInt(document.MuhurtaForm.FromMonth.value) > 12 || parseInt(document.MuhurtaForm.FromMonth.value) < 1)
		{
			alert("Please Enter Correct Month!");
			document.MuhurtaForm.FromMonth.value = currentDate.getMonth()+1;
			document.MuhurtaForm.FromMonth.focus();
		}
		if ((parseInt(document.MuhurtaForm.FromMonth.value) == 1 || parseInt(document.MuhurtaForm.FromMonth.value) == 3 || parseInt(document.MuhurtaForm.FromMonth.value) == 5 || parseInt(document.MuhurtaForm.FromMonth.value) == 7 || parseInt(document.MuhurtaForm.FromMonth.value) == 8 || parseInt(document.MuhurtaForm.FromMonth.value) == 10 || parseInt(document.MuhurtaForm.FromMonth.value) == 12) && (parseInt(document.MuhurtaForm.FromDay.value) >31 || parseInt(document.MuhurtaForm.FromDay.value) < 1))
		{
			alert("Please Enter day between 1 and 31!");
			document.MuhurtaForm.FromDay.value = 1;
			document.MuhurtaForm.FromDay.focus();
		}
		if ((parseInt(document.MuhurtaForm.FromMonth.value) == 4 || parseInt(document.MuhurtaForm.FromMonth.value) == 6 || parseInt(document.MuhurtaForm.FromMonth.value) == 9 || parseInt(document.MuhurtaForm.FromMonth.value) == 11) && (parseInt(document.MuhurtaForm.FromDay.value) >30 || parseInt(document.MuhurtaForm.FromDay.value) < 1))
		{
			alert("Please Enter day between 1 and 30!");
			document.MuhurtaForm.FromDay.value = 1;
			document.MuhurtaForm.FromDay.focus();
		}
		if ((parseInt(document.MuhurtaForm.FromMonth.value) == 2) && (parseInt(document.MuhurtaForm.FromYear.value)%4 == 0) && (parseInt(document.MuhurtaForm.FromYear.value)%400 == 0) && (parseInt(document.MuhurtaForm.FromDay.value) >29 || parseInt(document.MuhurtaForm.FromDay.value) < 1))
		{
			alert("Please Enter day between 1 and 29!");
			document.MuhurtaForm.FromDay.value = 1;
			document.MuhurtaForm.FromDay.focus();
		}
		if ((parseInt(document.MuhurtaForm.FromMonth.value) == 2) && (parseInt(document.MuhurtaForm.FromYear.value)%4 == 0) && (parseInt(document.MuhurtaForm.FromYear.value)%100 > 0) && (parseInt(document.MuhurtaForm.FromDay.value) >29 || parseInt(document.MuhurtaForm.FromDay.value) < 1))
		{
			alert("Please Enter day between 1 and 29!");
			document.MuhurtaForm.FromDay.value = 1;
			document.MuhurtaForm.FromDay.focus();
		}
		if ((parseInt(document.MuhurtaForm.FromMonth.value) == 2) && (parseInt(document.MuhurtaForm.FromYear.value)%4 > 0) && (parseInt(document.MuhurtaForm.FromDay.value) >28 || parseInt(document.MuhurtaForm.FromDay.value) < 1))
		{
			alert("Please Enter day between 1 and 28!");
			document.MuhurtaForm.FromDay.value = 1;
			document.MuhurtaForm.FromDay.focus();
		}
		if ((parseInt(document.MuhurtaForm.FromMonth.value) == 2) && (parseInt(document.MuhurtaForm.FromYear.value)%4 == 0) && (parseInt(document.MuhurtaForm.FromYear.value)%100 == 0) && (parseInt(document.MuhurtaForm.FromYear.value)%400 > 0) && (parseInt(document.MuhurtaForm.FromDay.value) >28 || parseInt(document.MuhurtaForm.FromDay.value) < 1))
		{
			alert("Please Enter day between 1 and 28!");
			document.MuhurtaForm.FromDay.value = 1;
			document.MuhurtaForm.FromDay.focus();
		}

		d = new Date(document.MuhurtaForm.FromYear.value,document.MuhurtaForm.FromMonth.value-1,document.MuhurtaForm.FromDay.value);
		d.setDate(parseInt(n) + d.getDate())	
		
		document.MuhurtaForm.ToYear.value = d.getFullYear();
		document.MuhurtaForm.ToMonth.value = d.getMonth()+1;
		document.MuhurtaForm.ToDay.value = d.getDate();
	}
} 

///---------------------------------------------------------------------------------
function FillNameAndBirthStar(formName)
{
	formName.Name.value = document.commonForm.Name.value;
	formName.NakNo.value = document.commonForm.NakNo.value;
	formName.submit();
}

///---------------------------------------------------------------------------------
function FillNameOnly(formName)
{
	formName.Name.value = document.commonForm.Name.value;
	formName.submit();
}

///---------------------------------------------------------------------------------
function ShowLargeImage(imgName,description,height,width)
{
	var left = (screen.width - 450)/2;
	var top = (screen.height-550)/2;
	window.open("ShowImage.asp?Name="+imgName+"&desc="+description+"&height="+height+"&width="+width,"Astroved","height=450,width=550,status=1,left=" + left + ",top=" + top+",resizable=yes,scrollbars=yes");
}

///---------------------------------------------------------------------------------
function ShowRamal()
{
	var left = (screen.width - 550)/2;
	var top = (screen.height- 550)/2;
	window.open("ramal/RamalQuestion.asp","RamalSpeaks","height=450,width=550,status=1,left=" + left + ",top=" + top+",resizable=false,scrollbars=yes");
	//window.showModalDialog("ramal/RamalQuestion.asp","RamalPrashnottari",'dialogheight=450,dialogwidth=550');
}

///---------------------------------------------------------------------------------
function ShowGanesha(source)
{
	//source 1= home, 2=services
	var left = (screen.width - 550)/2;
	var top = (screen.height- 550)/2;
	if (source == 1)
	{
		window.open("AstroIntuition/Ganesha/GaneshaHome.asp","GaneshaSpeaks","height=450,width=550,status=1,left=" + left + ",top=" + top+",resizable=false,scrollbars=yes");
	}
	else
	{
			window.open("Ganesha/GaneshaHome.asp","GaneshaSpeaks","height=450,width=550,status=1,left=" + left + ",top=" + top+",resizable=false,scrollbars=yes");
	}
}

///---------------------------------------------------------------------------------
function yearForecast(source)
{
	//source 1= home, 2=services
	var left = (screen.width - 550)/2;
	var top = (screen.height-550)/2;
	if (source == 1)
		window.open("services/prediction/yearly/YearlyPred.asp","YearlyPrediction","height=450,width=550,status=1,left=" + left + ",top=" + top+",resizable=yes,scrollbars=yes,status=no");
	else
		window.open("prediction/yearly/YearlyPred.asp","YearlyPrediction","height=450,width=550,status=1,left=" + left + ",top=" + top+",resizable=yes,scrollbars=yes,status=no");
}

///---------------------------------------------------------------------------------
function weekForecast(source)
{
	//source 1= home, 2=services
	var left = (screen.width - 500)/2;
	var top = (screen.height-450)/2;
	if (source == 1)
		window.open("services/prediction/weekly/weeklyPred.asp","WeeklyPrediction","height=400,width=500,status=1,left=" + left + ",top=" + top+",resizable=yes,scrollbars=yes,status=no");
	else
		window.open("prediction/weekly/weeklyPred.asp","WeeklyPrediction","height=400,width=500,status=1,left=" + left + ",top=" + top+",resizable=yes,scrollbars=yes,status=no");
}

///---------------------------------------------------------------------------------
function dayForecast(source)
{
	//source 1= home, 2=services
	var left = (screen.width - 350)/2;
	var top = (screen.height-250)/2;
	if (source == 1)
		window.open("services/prediction/daily/dailyPred.asp","DailyPrediction","height=250,width=350,status=1,left=" + left + ",top=" + top+",resizable=yes,scrollbars=yes,status=no");
	else
		window.open("prediction/daily/dailyPred.asp","DailyPrediction","height=250,width=350,status=1,left=" + left + ",top=" + top+",resizable=yes,scrollbars=yes,status=no");
}

///---------------------------------------------------------------------------------
function showPrintVersion(year,month,number,reportType)
{
	var left = 0;
	var top = 0;
	window.open("showPrinterVersion.asp?Year="+year+"&Month="+month+"&Number="+number+"&ReportType="+reportType,"printerversion","height="+(screen.height - 150)+",width="+(screen.width-10)+",status=1,left=" + left + ",top=" + top+",resizable=yes,scrollbars=yes,menubar=yes");
}

///---------------------------------------------------------------------------------
function showSample(sampleName)
{
	var left = 0;
	var top = 0;
	window.open("../samples/"+sampleName+".asp","sample","height="+(screen.height - 150)+",width="+(screen.width-10)+",status=1,left=" + left + ",top=" + top+",resizable=yes,scrollbars=yes,menubar=yes");
}

///---------------------------------------------------------------------------------
function showYantraDesc(item)
{
	var left = 50;
	var top = 0;
	window.open("yantradesc.asp?Item="+item,"YantraDesc","height="+(screen.height - 180)+",width="+(screen.width-100)+",status=1,left=" + left + ",top=" + top+",resizable=yes,scrollbars=yes,menubar=yes,status=no");
}

///---------------------------------------------------------------------------------
function showFramedYantra()
{
	var left = 50;
	var top = 0;
	window.open("framedyantra.asp","YantraDesc","height="+(screen.height - 175)+",width="+(screen.width-100)+",status=1,left=" + left + ",top=" + top+",resizable=yes,scrollbars=yes,menubar=yes,status=no");
}

///---------------------------------------------------------------------------------
function showParadDesc(item)
{
	var left = 50;
	var top = 0;
	window.open("ParadDesc.asp?Item="+item,"ParadDesc","height="+(screen.height - 180)+",width="+(screen.width-100)+",status=1,left=" + left + ",top=" + top+",resizable=yes,scrollbars=yes,menubar=yes,status=no");
}

///---------------------------------------------------------------------------------
function showGemsDesc(item)
{
	var left = 50;
	var top = 0;
	window.open("gemsdesc.asp?Item="+item,"GemsDesc","height="+(screen.height - 180)+",width="+(screen.width-100)+",status=1,left=" + left + ",top=" + top+",resizable=yes,scrollbars=yes,menubar=yes,status=no");
}

///---------------------------------------------------------------------------------
function SubmitPredCompatibility()
{
	if(document.CompatibilityForm.Partner.value == "-1")
	{
		alert("You should login first to order this report.");
		return;
	}
	if(document.CompatibilityForm.Partner.value == "-2")
	{
		alert("Please click on Add Partner to add the birth profile of your partner.");
		return;
	}
	var str1 = document.CompatibilityForm.ReportType.value;
	if(parseInt(document.CompatibilityForm.ReportPrice.value) > 0)
		document.CompatibilityForm.action = "../Transaction/AddTransaction.asp?Category=REPRTTEST&Item="+str1;
	else
		document.CompatibilityForm.action = "../Transaction/DirectAddTransaction.asp?Category=REPRTTEST&Item="+str1;

	document.CompatibilityForm.submit();
}

///---------------------------------------------------------------------------------
function ValidateAstroForm()
{
	if (window.document.AstroTalkForm.City.value == "")
	{
		alert("Please enter your current city location!");
		window.document.AstroTalkForm.City.focus();
		return false;
	}
	if (window.document.AstroTalkForm.State.value == "")
	{
		alert("Please enter your current state location!");
		window.document.AstroTalkForm.State.focus();
		return false;
	}
	if (window.document.AstroTalkForm.Country.value == "")
	{
		alert("Please enter your current country location!");
		window.document.AstroTalkForm.Country.focus();
		return false;
	}
	if (window.document.AstroTalkForm.dc1.value == "")
	{
		alert("Please enter your first preference date!");
		window.document.AstroTalkForm.dc1.focus();
		return false;
	}
	if (window.document.AstroTalkForm.Phone1.value == "")
	{
		alert("Please enter your Telephone no to contact!");
		window.document.AstroTalkForm.Phone1.focus();
		return false;
	}

	window.document.AstroTalkForm.submit();
}

//------------------------------------------------
function ordernow()
{
var str;
str=document.CompatibilityForm.referpage.value;
str=str+"?partner="+document.CompatibilityForm.Partner.value;
	document.CompatibilityForm.referpage.value=str;
	document.CompatibilityForm.submit();

}
//-----------------------------------------------------
function order(n)
{
if (n==1)
{document.ProductDetails.submit();}
else
{document.PartnerForm.submit();}

}
//-----------------------------------------------------
function Refresh()
{
	document.DirectShow.submit();
}
//-----------------------------------------------------
function Refreshmyorders()
{
	document.myorders.submit();
}
//-----------------------------------------
   
function MuhurtaPrintContent(spanname)
    {
        var DocumentContainer = document.getElementById(spanname);
	    var WindowObject = window.open('', "Printing", 
                              "width=80,height=20,top=10,left=10,toolbars=no,scrollbars=yes,status=no,resizable=no");
		var str="<html>"
		str += "<head>"
		str += "<link href='Styles.css' rel='stylesheet' type='text/css' />"
		str += "</head>"
		str += "<body><br><br><br><br><br>"
		str += DocumentContainer.innerHTML
		str += "</body>"
		str += "</html>"
        WindowObject.document.writeln(str);
        WindowObject.document.close();
        WindowObject.focus();
        WindowObject.print();
        WindowObject.close();
    }
    
//-----------------------------------------
function PrintContent()
    {
        var DocumentContainer = document.getElementById('printdata');
	    var WindowObject = window.open('', "Printing", 
                              "width=80,height=20,top=10,left=10,toolbars=no,scrollbars=yes,status=no,resizable=no");
        WindowObject.document.writeln(DocumentContainer.innerHTML);
        WindowObject.document.close();
        WindowObject.focus();
        WindowObject.print();
        WindowObject.close();
    }
