//ADD TO FAVORITES
function addFavorites(url,title) {
	window.external.addfavorite(url,title);
}

function openWindow(theURL,picname,winName,features) {
  var winHandle = window.open('',winName,features)

  if(winHandle != null){
    var htmlString = "<html><head><title>"+ picname +" </title></head><body bgcolor=#000000 topmargin=0 leftmargin=0 marginwidth=0 marginheight=0><img src='" + theURL + "'></body></html>"
    winHandle.document.open()
    winHandle.document.write(htmlString)
    winHandle.document.close()
    }	
  if(winHandle != null) winHandle.focus() //brings window to top
  return winHandle
  }

	var g_oForm = null ;
	var nSum
	var bSecurePoll = 0;
	function new_win(id){
	window.open('site/info.asp?id='+id,'','width=350,height=400')
	}
	function popUpPoll(objForm,id,N,bSecurePoll){
		nSum=0
		this.bSecurePoll += bSecurePoll ;
		g_oForm = objForm.form;
			
		if (g_oForm != null){
			for (i = 0 ; i < N ; i++){
				if (g_oForm.option[i].checked) {
					nSum = g_oForm.option[i].value;
				}
			}
			objForm.disabled = true;
		}
		//alert(nSum);
			
		if (bSecurePoll == 1){
			popupWin = window.open ('site/Survey_login.asp?id='+id+'&Answer_id='+nSum,'aa','width=450,height=300')
		}
		else{
			popupWin = window.open ('site/Survey_result.asp?id='+id+'&Answer_id='+nSum,'aa','width=450,height=300')
		}
		//popupWin.focus();
	}
	//g_oForm.r1[0].checked=true

function up(x){
	HomePageNews.behavior="scroll"
	HomePageNews.scrollAmount = 2
	HomePageNews.direction= "up"
	x.src="images/Cube/moveprevious2.gif"
}
function down(x){
	HomePageNews.behavior="scroll"
	HomePageNews.scrollAmount = 2
	HomePageNews.direction="down"
	x.src="images/Cube/movenext2.gif"
}
function stop(){
	HomePageNews.scrollAmount = 0;
}
function validForm(){
	if (document.formi.searchAll.value == "" )
		return alert ("חובה להזין מילת חיפוש");
	formi.submit();  
}

fontSize = 2;

function change_font(x){
	if (x==1) {document.body.style.fontSize = parseFloat(11) + "px";fontSize=1;}
	else if (x==2) {document.body.style.fontSize = parseFloat(12) + "px"; fontSize=2;}
	else {document.body.style.fontSize = parseFloat(14) + "px"; fontSize=3;}
}

function change_font_arr(isSmall){
	if (isSmall == 1 && fontSize > 1){
		fontSize--;
	}
	if (isSmall == 0 && fontSize < 3){
		fontSize++;
	}

	if (fontSize==1) {document.body.style.fontSize = parseFloat(11) + "px";fontSize=1;}
	else if (fontSize==2) {document.body.style.fontSize = parseFloat(12) + "px"; fontSize=2;}
	else {document.body.style.fontSize = parseFloat(14) + "px"; fontSize=3;}
}

function getElement(aID){ 
  return (document.getElementById) ? document.getElementById(aID) : document.all[aID];
//	alert(document.getElementById(aID));
} 
