function popup(url,name,prop){
	Hwnd = window.open(url,name,prop);
	Hwnd.window.focus();
}
function callCurrencyConverter()
{		
	//popup("http://www.oanda.com/convert/classic?user=sltest","CurrencyConverter","width=680,height=380,left=50,top=50,noresize, scrollbars=yes");
	popup("http://www.oanda.com/convert/classic?user=srilanka","CurrencyConverter","width=650,height=380,left=50,top=50,noresize, scrollbars=yes");
	
}
function callCurrencyConvertertemp(){	
	popup("/currencyconverter.php","CurrencyConverter","width=450,height=230,left=50,top=50,noresize");
}
function callRecommendThisSite()
{
	popup('/RecommendThisSite.php',"Recommend",'width=500,height=510,left=50,top=0');
}
function callQuiz(){
	popup('/funstuff/quiz.htm',"Quiz",'width=400,height=500,left=50,top=0,scrollbars=yes');
}
function serviceloginhome(){
	document.frmhf.submit();
}
function homemaillogin(){
	if (maillogin(document.frmMailLogin))
	{
		document.frmMailLogin.submit();
	}
}
function uc(){
	alert("Under Construction");
}
function servicepopup() {
	popup('/services/servicepopup.php',"service",'width=650,height=400,left=50,top=0,scrollbars=yes');
}
function advertisementpopup() {
	popup('/advertisewithus.php',"advertise",'width=650,height=400,left=50,top=0,scrollbars=yes');
}
function privacypopup() {
	popup('/privacy.htm',"privacy",'width=300,height=200,left=50,top=0');
}
function disclaimerpopup() {
	popup('/disclaimer.htm',"disclaimer",'width=350,height=250,left=50,top=0,scrollbars=yes');
}
function photogallarypopup(id,catid)
{
	var locn = window.location.href;
	if(locn.indexOf("demo") == -1)
	{
		popup('/photogallery/pgenlargedimage.php?id='+id+'&catid='+catid,'Gallery','width=620,height=520,left=20,top=20,scrollbars=yes');
	}
	else
	{
		popup('/photogallery/pgenlargedimage.php?id='+id+'&catid='+catid,'Gallery','width=620,height=520,left=20,top=20,scrollbars=yes');
	}
}

function contactCompany(id,mod)
{
	var locn = window.location.href;
	if(locn.indexOf("demo") == -1)
	{
		//popup('/contactcompany.php?id='+id+"&mod="+mod,"advertise",'width=600,height=540,left=50,top=0,scrollbars=yes,status=yes');
		document.location.href = "/contact_us.php?id="+id+"&mod="+mod;
	}
	else
	{
		document.location.href = "/contact_us.php?id="+id+"&mod="+mod;
	}
	//popup('/contactcompany.php?id='+id+"&mod="+mod,"advertise",'width=600,height=540,left=50,top=0,scrollbars=yes,status=yes');
}

function contactus(id,mod)
{
	//popup('/travel/contactcompany.php?id='+id+"&mod="+mod,"advertise",'width=600,height=600,left=50,top=0,scrollbars=yes,status=yes');
	document.location.href = '/travel/contactcompany.php?id='+id+'&mod='+mod;
}

function getWebEmailClicks(id,mod,click)
{
	window.open('/countwebemailclicks.php?id='+id+"&mod="+mod+"&click="+click,"coclick",'');
}


function validateclassifiedregister(fr)
{
	if (isNull(fr.email.value))
	{
		alert("Please Enter Valid Mail");
		fr.email.focus();
		return false;
	} 
	else
	{
		if (!fnValidateEmailFormat(fr.email.value))
		{
			alert("Please enter a valid email id!");
			fr.email.focus();
			return false;
		}
	}
	if (isNull(fr.name.value))
	{
		alert("Please enter your name");
		fr.name.focus();
		return false;
	}
	if (isNull(fr.passwd.value))
	{
		alert("Please enter your password");
		fr.passwd.focus();
		return false;
	}
	if(fr.passwd.value != fr.passwd2.value)
	{
		alert("Your Password and Confirm password are diffrent. Please check..");
		fr.passwd2.focus();
		return false;
	}
	return true;
}

function addtoitemtocart(id,catid,quantity)
{
	popup("/shopping/itemadd.php?id="+id+"&quantity="+quantity+"&catid="+catid,'AddItem','width=200,height=200,left=50,top=50,noresize')
}

function viewshippingcharge()
{
	popup("/shopping/shipping.html",'shippingcharge','width=580,height=290,left=50,top=50,noresize,scrollbars=yes')
}

function offerboardadvantage()
{
	popup("/offerboard/offeradvantage.htm",'offeradvantage',"width=450,height=350,left=50,top=50,noresize,scrollbars=no");
}
