
function sendToFriend()
{
	alert('here');
}
function subscribeEPlus(strEmail)
{
	if(!CheckEmail(strEmail))
	{
		alert("Invalid email address");
		rVal = false;
	}
	else
	{
		var theTop=(screen.height/2)-(300/2);
		var theLeft=(screen.width/2)-(370/2);
		window.open("SubscribeEPlus.aspx?SEMAIL=" + strEmail,"eplusResult","top=" + theTop + ",left=" + theLeft + ",height=300,width=370,status=0,toolbar=0,location=0,menubar=0,resizable=0");
	}
}

function submitVote(qID)
{
	var ans = "";
	for (i=0;i<document.Form1.POLLANSGROUP.length;i++)
	{
		if (document.Form1.POLLANSGROUP[i].checked==true)
			ans = document.Form1.POLLANSGROUP[i].value;
	}
	if(ans != "")
	{
		var theTop=(screen.height/2)-(300/2);
		var theLeft=(screen.width/2)-(370/2);
		window.open("MakeVote.aspx?QID=" + qID + "&ANS=" + ans,"pollResult","top=" + theTop + ",left=" + theLeft + ",height=300,width=370,status=0,toolbar=0,location=0,menubar=0,resizable=0");
	}
}

function createCookie(name,value,days) 
{
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) 
{
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function eraseCookie(name) 
{
	createCookie(name,"",-1);
}

function CheckEmail(e)
{
	var strEmailFilter = /^\w+[\+\.\w-]*@([\w-]+\.)*\w+[\w-]*\.([a-z]{2,4}|\d+)$/i ;
	var retVal = strEmailFilter.test(e);
	return retVal;
}
function validateData()
{
	var rVal = true;
	var errMsg = "";
	if(document.getElementById("txtName").value == "")
	{
		errMsg = "&nbsp;**&nbsp;Invalid Name"
		rVal = false;
	}
	if(!CheckEmail(document.getElementById("txtEmail")))
	{
		errMsg += "&nbsp;**&nbsp;Invalid Email"
		rVal = false;
	}
	if(document.getElementById("chkMale").checked == false && document.getElementById("chkFemale").checked == false)
	{
		errMsg += "&nbsp;**&nbsp;Invalid Gender"
		rVal = false;
	}
	if(document.getElementById("txtMobile").value == "")
	{
		errMsg += "&nbsp;**&nbsp;Invalid Mobile"
		rVal = false;
	}
	if(document.getElementById("cmbNationality").value == "0")
	{
		errMsg += "&nbsp;**&nbsp;Invalid Nationality"
		rVal = false;
	}
	errMsg += "&nbsp;**&nbsp;"
	if(rVal == false)
	{
		document.getElementById("tdErr").innerHTML = "<font color='red'>" + errMsg + "</font>";
	}
	return(rVal);
	
}
function OnlyAlphaNumeric(objEvent) 
{
	var iKeyCode;       
	if (navigator.appName == 'Microsoft Internet Explorer'){
			iKeyCode = objEvent.keyCode;                         
	}
	if (navigator.appName != 'Microsoft Internet Explorer'){
			iKeyCode = objEvent.which;                       
	}
				    

	if (iKeyCode>=97 && iKeyCode<=122){
		return true;
	}
	else if (iKeyCode>=65 && iKeyCode<=90) {
		return true;
	}
	else if (iKeyCode>=44 && iKeyCode<=57){
		return true;
	}
	else if (iKeyCode == 8 || iKeyCode == 32 || iKeyCode == 127) {
		return true;
	}
	else
		return false;
}	

function OnlyPhone(objEvent) 
{
	var iKeyCode;       
	if (navigator.appName == 'Microsoft Internet Explorer'){
			iKeyCode = objEvent.keyCode;                         
	}
	if (navigator.appName != 'Microsoft Internet Explorer'){
			iKeyCode = objEvent.which;                       
	}
			
	if (iKeyCode>=48 && iKeyCode<=57){
		return true;
	}
	else if (iKeyCode == 45 || iKeyCode == 8 || iKeyCode == 32 || iKeyCode == 127){
		return true;
	}
	else
		return false;
}

function OnlyNumber(objEvent) 
{
	var iKeyCode;       
	if (navigator.appName == 'Microsoft Internet Explorer'){
			iKeyCode = objEvent.keyCode;                         
	}
	if (navigator.appName != 'Microsoft Internet Explorer'){
			iKeyCode = objEvent.which;                       
	}
			
	if (iKeyCode>=48 && iKeyCode<=57){
		return true;
	}
	else if (iKeyCode == 8 || iKeyCode == 127){
		return true;
	}
	else
		return false;
}

function OnlyEmail(objEvent) 
{
	var iKeyCode;       
	if (navigator.appName == 'Microsoft Internet Explorer'){
			iKeyCode = objEvent.keyCode;                         
	}
	if (navigator.appName != 'Microsoft Internet Explorer'){
			iKeyCode = objEvent.which;                       
	}

	if ((iKeyCode>=48 && iKeyCode<=57) || (iKeyCode>=65 && iKeyCode<=90) || (iKeyCode>=97 && iKeyCode<=122)) {
		return true;
	}
	else if (iKeyCode == 45 || iKeyCode == 8 || iKeyCode == 32 || iKeyCode == 46 || iKeyCode == 64 || iKeyCode == 95 || iKeyCode == 127){
		return true;
	}
	else
		return false;
}

function copyToClipBoard(strText)
{
	if(widow.clipboardData)
	{
		window.clipboardData.setData("Text",strText);
	}
}

document.write(unescape('%3Cscript type="text/javascript" src="'+
document.location.protocol+'//counter.goingup.com/js/tracker.js?st=bdbqpwv&amp;b=5"%3E%3C/script%3E'));

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-7063268-3']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
