	function getWindow(id, w) {
		window.open("http://www.opinion.co.il/ajax/send.asp?w="+w+"&id="+id, "AddNewOpinion", "resizable=0, width=500 ,height=520, scrollbars=0, status=0, location=0, menubar=0");
	}
	

	 var urlTodoUsers = "http://www.opinion.co.il/results/global/todo/do.asp"
	function todoThis(statusId, itemId, wid, getDivNumber){
			getInfo(urlTodoUsers + '?statusId=' + statusId + '&i=' + itemId + '&w=' + wid,"block","thisTodoUsers"+getDivNumber);
	}


	
function OpenOptions(i_id) {
          var objStyle = document.getElementById(i_id).style
	objStyle.display=objStyle.display == "none" ? "block" : "none"
}

		function gotoSuggest(){
			this.location="http://www.opinion.co.il/suggest/?history=1&sq="+document.getElementById("q").value;
		}

		   	function footerApp(num){
				if(num==1) document.getElementById("bottom_div").innerHTML = "קבלו כל בוקר לתיבת הדוא''ל שלכם את הסרטים המומלצים בטלוויזיה";
				if(num==2) document.getElementById("bottom_div").innerHTML = "קבלו עדכונים מידיים על סרטים חדשים, ספרים חדשים, חוות דעת חדשות ועוד";
				if(num==3) document.getElementById("bottom_div").innerHTML = "הרשמו לדף של אופיניון ברשת החברתית Facebook";
				if(num==4) document.getElementById("bottom_div").innerHTML = "שתפו את חוות הדעת שלכם גם בחשבון ה-Twitter שלכם";
				if(num==5) document.getElementById("bottom_div").innerHTML = "תקועים בקולנוע ומתלבטים לאיזה סרט ללכת? למדו עכשיו כיצד לשלוח הודעת SMS ולקבל חוות דעת ודירוגים על סרטים";
				if(num==6) document.getElementById("bottom_div").innerHTML = "הרחבות ואפליקציות לגוגל";
			}
			
var int=0;
var cursorp1=1;
var cursorp2=1;
var cursorp4=1;
var cursorp6=1;
var cursorp8=1;
var cursorp0=1;
var stayOpen=1;

	function callStayOpen(){
		stayOpen=0;
	}

	function returnCP1(){
		return cursorp1;
	}
	
	function setCP1(newCP1){
		cursorp1=newCP1;
	}

	function returnCP2(){
		return cursorp2;
	}
	
	function setCP2(newCP2){
		cursorp2=newCP2;
	}

	function returnCP4(){
		return cursorp4;
	}
	
	function setCP4(newCP4){
		cursorp4=newCP4;
	}
	
	function returnCP8(){
		return cursorp8;
	}
	
	function setCP8(newCP8){
		cursorp8=newCP8;
	}
	
	function returnCP6(){
		return cursorp6;
	}
	
	function setCP6(newCP6){
		cursorp6=newCP6;
	}

	function returnCP0(){
		return cursorp0;
	}
	
	function setCP0(newCP0){
		cursorp0=newCP0;
	}
	function returnInt(){
		return int;
	}
	
	function setInt(newInt){
		int=newInt;
	}

	function gl_rateValue(itemId, id){
	document.getElementById(itemId).rates.value=id;
	}
	
function isParent(parent, child){
    var p = child.parentNode;
    while(p!=document.body){
        if(p==parent) return true;
        else p = p.parentNode;
    }
    return false;
}

	function callChange(tabId, tdId, lnkId, actionId, qar){

		if(actionId==0){
			document.getElementById(tabId).style.display="block";
			document.getElementById(tdId).className="itemOn";
			document.getElementById(lnkId).className="itemLnkOn";
		//	if(returnCP1()==0 || returnCP2()==0 || returnCP4()==0 || returnCP8()==0 || returnCP7()==0 || returnCP6()==0) document.getElementById("i_generalMain").className="generalMainClassOn";
		}	else {
			document.getElementById(tabId).style.display="none";
			document.getElementById(tdId).className="item";
			document.getElementById(lnkId).className="itemLnk";
					if(qar=="movies" && lnkId=="lnk_01")	document.getElementById(lnkId).className="itemLnk1";
					if(qar=="books" && lnkId=="lnk_02")	document.getElementById(lnkId).className="itemLnk1";
					if(qar=="music" && lnkId=="lnk_04")	document.getElementById(lnkId).className="itemLnk1";
					if(qar=="blogs" && lnkId=="lnk_06")	document.getElementById(lnkId).className="itemLnk1";
					if(qar=="rests" && lnkId=="lnk_08")	document.getElementById(lnkId).className="itemLnk1";
					if(qar=="me" && lnkId=="lnk_00")	document.getElementById(lnkId).className="itemLnk1";
					
		//	if(returnCP1()==1 && returnCP2()==1 && returnCP4()==1 && returnCP8()==1 && returnCP7()==1 && returnCP6()==1) document.getElementById("i_generalMain").className="generalMainClass";
		}
	}

	function gl_commentUnMarkAll(itemId, id){
				// reset stars
		for (i=1;i<=5;i++){
			document.getElementById(id.substring(0,id.length-1) + i).src = "http://www.opinion.co.il/results/includes/_overstar.gif";
		}	
				// make stars
				var cuRate=document.getElementById(itemId).rates.value;
				if(cuRate=='') cuRate=0;
		for (i=1;i<=cuRate;i++){
			document.getElementById(id.substring(0,id.length-1) + i).src = "http://www.opinion.co.il/results/includes/_star.gif";
		}
	}


	function gl_markStars(id){
		for (i=1;i<=5;i++){
			document.getElementById(id.substring(0,id.length-1) + i).src = "http://www.opinion.co.il/results/includes/_overstar.gif";
		}
		
		var basicId = id.substring(0,id.length-1);
		for (i=1;i<=id.substring(id.length-1,id.length);i++){
			document.getElementById(basicId + i).src = "http://www.opinion.co.il/results/includes/_star.gif";
		}
	}
