var url="#";
function secset(loc)
{	
	url=loc;
}
function op()
{
	if(url == "#")
	alert("Select a section");
	return;
	document.location.replace(url);
}

function openSUN(zodiac,queryType)
{
	theURL="http://www.expressindia.com/astro/show1.php?zodiac="+zodiac+"&queryType="+queryType;
	wname ="CHROMELESSWIN";
	W=390;
	H=220;
	TITLE="Star Power by Peter Vidal";
	windowCERRARa = "http://www.expressindia.com/slide/grfx/close_a.gif";
	windowCERRARd = "http://www.expressindia.com/slide/grfx/close_d.gif";
	windowCERRARo = "http://www.expressindia.com/slide/grfx/close_o.gif";
	windowNONEgrf = "http://www.expressindia.com/slide/grfx/none.gif";
	windowCLOCK	  = "http://www.expressindia.com/slide/grfx/clock.gif";
	windowREALtit = TITLE;
	windowTIT = "<font face=verdana size=1>&nbsp;"+TITLE+"</font>";
	windowBORDERCOLOR = "#86765D";
	windowBORDERCOLORsel = "#000000";
	windowTITBGCOLOR = "#AB9777";
	windowTITBGCOLORsel = "#F5D7A4";
	openchromeless(theURL, wname, W, H, windowCERRARa, windowCERRARd, windowCERRARo, windowNONEgrf, windowCLOCK, windowTIT, windowREALtit , windowBORDERCOLOR, windowBORDERCOLORsel, windowTITBGCOLOR, windowTITBGCOLORsel)
}
function astroSelected() 
{
	if(document.astro.zodiac.selectedIndex == 0)
	{
		alert ("Please select your sun sign");
		document.astro.zodiac.focus();

		return;
	}
	if(document.astro.queryType[0].checked)
		queryType="daily";
	else if(document.astro.queryType[1].checked)
		queryType="weekly";
	else
	{
		alert ("Please select either daily or weekly");
		return;
	}
	window.open("",'pop','width=390,height=215');
	document.astro.submit();

}
function MM_openBrWindow(theURL,winName,features)
{
	window.open(theURL,winName,features);
}
function MM_openBrWindow(theURL,winName,features)
{
	 window.open(theURL,winName,features);
}
function opwnd(url)
{
	var wind="http://www.expressindia.com/poll/popup.php?id="+url;
	window.open(wind,'poll_issue','width=360,height=300,scrollbars=yes');
}	
function archive(id)
{
	window.open("http://www.expressindia.com/poll/poll_result.php?id="+id,"poll_window","status=no,resize=no,toolbar=no,scrollbars=no,width=360,height=300,maximize=no");
}
function chk(ctr,id)
{
	flag=0;
	if(document.poll_form.country.selectedIndex == 0)
	{
		alert("Please select the country you live in");
		return;
	}
	for(a=0;a<ctr;a++)
	{
		if (document.poll_form.rd[a].checked) 
		{
			flag=1;
			break;
		}	
	}
	if(flag == 0)	
	{
		alert ("Select an option");
		return;
	}
	var today = new Date();
	var expires = new Date(today.getTime() + (56 * 86400000));
	var userProfile = Get_Cookie("poll");
	if (!userProfile)
	{
		Set_Cookie("poll",id,expires);
		document.poll_form.flag.value="no";
	}
	else if(userProfile != id)
	{
		Set_Cookie("poll",id,expires);
		document.poll_form.flag.value="no";
	}
	else
	{
		document.poll_form.flag.value="yes";
	}
	window.open("","poll_window","status=no,resize=no,toolbar=no,scrollbars=yes,width=367,height=260,maximize=no");
	document.poll_form.submit();
}

function Get_Cookie(name)
{
	var start = document.cookie.indexOf(name+"=");
	var len = start+name.length+1;
	if ((!start) && (name != document.cookie.substring(0,name.length))) return null;
	if (start == -1) return null;
	var end = document.cookie.indexOf(";",len);
	if (end == -1) end = document.cookie.length;
	return unescape(document.cookie.substring(len,end));
}
function Set_Cookie(name,value,expires,path,domain,secure)
{
	document.cookie = name + "=" + value +
	( (expires) ? ";expires=" + expires.toGMTString() : "") +
	( (path) ? ";path=" + path : "") +
	( (domain) ? ";domain=" + domain : "") +
	( (secure) ? ";secure" : "");
}
