var xmlHttp_Sign;
var horoscopecontent = "";
	horoscopecontent += '<form name="frmHoroscope" id="frmHoroscope" method="post" action="default.aspx">';
	horoscopecontent += '<div id="horoscope_select">';
	horoscopecontent += '<select name="horoscope_selSign" onchange="showSign(this.value);" id="horsc_HoroscopeList" class="horoscope">';
	horoscopecontent += '<option value="">Select Your Sign</option>';
	horoscopecontent += '<option value="Aquarius">Aquarius</option>';
	horoscopecontent += '<option value="Pisces">Pisces</option>';
	horoscopecontent += '<option value="Aries">Aries</option>';
	horoscopecontent += '<option value="Taurus">Taurus</option>';
	horoscopecontent += '<option value="Gemini">Gemini</option>';
	horoscopecontent += '<option value="Cancer">Cancer</option>';
	horoscopecontent += '<option value="Leo">Leo</option>';
	horoscopecontent += '<option value="Virgo">Virgo</option>';
	horoscopecontent += '<option value="Libra">Libra</option>';
	horoscopecontent += '<option value="Scorpio">Scorpio</option>';
	horoscopecontent += '<option value="Sagittarius">Sagittarius</option>';
	horoscopecontent += '<option value="Capricorn">Capricorn</option>';
	horoscopecontent += '</select>';
	horoscopecontent += '</div>'
	horoscopecontent +=  '<Input type="hidden" name="hidastro" id="hidastro"></form>';
	
function ChangeSign(){
		var agt = navigator.userAgent;								
		var is_mac = (agt.indexOf("Mac")!=-1) && (agt.indexOf("MSIE")!=-1);					 	 
    	document.getElementById("horoscope_content").innerHTML = horoscopecontent;    	
		Delete_Cookie( 'Sign', '/', cookieDomain );
		if (!is_mac){
			document.location.href="#astrology";								
		}else{
			document.getElementById("horoscope_select").focus();					
		}
}

function showSign(str){ 
    xmlHttp_Sign=zXmlHttp.createRequest();
    if (xmlHttp_Sign==null)
    {
    alert ("Browser does not support HTTP Request");
    return;
    } 

    var url = "";
    if (str != "") url = "/Content/Horoscope/" + str + ".aspx";
    
	if (url =="") {
		document.getElementById("horoscope_content").innerHTML = horoscopecontent   ;
		Delete_Cookie( 'Sign', '/', cookieDomain );
	} else {
		xmlHttp_Sign.onreadystatechange=signClick ;
		xmlHttp_Sign.open("GET",url,true);
		xmlHttp_Sign.send(null);
		Set_Cookie( 'Sign', str, 180, '/', cookieDomain, '' );
    }
}

function signClick(){ 
var horofooter;
	horofooter = '<div id="horoscope_changecopy"><span class="horoscope_copyright">Powered by <a href="http://www.astrology.com" target="_blank">Astrology.com</a><br />&copy; Astrology.com 1996 - 2007.</span></div><br /><div id="change_sign"><a href="#astrology" onclick="ChangeSign();"><img src="/images/home/change_sign.gif" alt="CHANGE SIGN" width="102" height="9" border="0"></a></div>';

    if (xmlHttp_Sign.readyState==4 || xmlHttp_Sign.readyState=="complete")
    { 
        document.getElementById('horoscope_content').innerHTML=xmlHttp_Sign.responseText + horofooter;
    } 
}
