﻿var expDays = 1;
var page = "sethomepage.htm";
var windowprops = "width=300,height=280,location=no,toolbar=no,menubar=no,scrollbars=no,resizable=no";
function getCookieVal (offset) {
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1)
		endstr = document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie (name) {
	var arg = name + "=";
	var alen = arg.length;
	var clen = document.cookie.length;
	var i = 0;
	while (i < clen) {
		var j = i + alen;
		if (document.cookie.substring(i, j) == arg)
			return getCookieVal (j);
		i = document.cookie.indexOf(" ", i) + 1;
		if (i == 0)
			break;
	}
	return null;
}

function SetCookie (name, value) {
	var argv = SetCookie.arguments;
	var argc = SetCookie.arguments.length;
	var expires = (argc > 2) ? argv[2] : null;
	var path = "/"; //(argc > 3) ? argv[3] : null;
	var domain = (argc > 4) ? argv[4] : null;
	var secure = (argc > 5) ? argv[5] : false;
	document.cookie = name + "=" + escape (value) +
	((expires == null) ? "" : ("; expires=" +
	expires.toGMTString())) +
	((path == null) ? "" : ("; path=" + path)) +
	((domain == null) ? "" : ("; domain=" + domain)) +
	((secure == true) ? "; secure" : "");
}

function checkPopUp()
{
	var name = navigator.appName;
	if (GetCookie('AHomePagePopUpLast')!="1")
	{
	   window.open(page,"",windowprops);
	}
}

<!-- START OF TIME PRINTING -->

function initArray() {
	for(i=0;i<initArray.arguments.length; i++)
		this[i] = initArray.arguments[i];
}

var isnMonths=new initArray("ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר");
var isnDays= new initArray("יום ראשון","יום שני","יום שלישי","יום רביעי","יום חמישי","יום שישי","יום שבת");
today=new Date();
hrs=today.getHours();
min=today.getMinutes();
sec=today.getSeconds();
clckh=""+((hrs>12)?hrs-12:hrs); 
clckm=((min<10)?"0":"")+min;
clcks=((sec<10)?"0":"")+sec;
clck=(hrs>=12)?"p.m.":"a.m.";
var stnr="";
var ns="0123456789";
var a="";
// End Hiding -->

var display = 0;

<!-- END OF TIME PRINTING -->

function select_engine(form,engine)
{
	document.forms[form].elements[0].value = engine;
	if (document.forms[form].elements['newWindow'].checked)
		document.forms[form].target = "_blank";
	document.forms[form].submit();
}

function select_engine_nopopup(form,engine)
{
	document.forms[form].elements[0].value = engine;
	document.forms[form].submit();
}

function search_all_isr()
{
	document.forms['israel'].elements['newWindow'].checked = 1;
	setTimeout("select_engine('israel','google il')",500);
	setTimeout("select_engine('israel','msn il')",500);
	setTimeout("select_engine('israel','walla')",500);
	setTimeout("select_engine('israel','tapuz')",500);
	setTimeout("select_engine('israel','nana')",500);
	setTimeout("document.forms['israel'].elements['newWindow'].checked = 0",500);
}

function search_all_world()
{
	document.forms['world'].elements['newWindow'].checked = 1;
	setTimeout("select_engine('world','yahoo')",500);
	setTimeout("select_engine('world','google')",500);
	setTimeout("select_engine('world','excite')",500);
	setTimeout("select_engine('world','lycos')",500);
	setTimeout("select_engine('world','askjeeves')",500);
	setTimeout("select_engine('world','altavista')",500);
	setTimeout("select_engine('world','mamma')",500);
	setTimeout("document.forms['world'].elements['newWindow'].checked = 0",500);
}

function checkForm() {
	if ( document.searchd.Sex.value == -1) 
	{ 
		alert("אנא בחר את המין שלך"); 
		document.searchd.Sex.focus(); 
	}
	else if ( document.searchd.TSex.value == -1) 
	{ 
		alert("אנא בחר את מין בן/בת הזוג שברצונך לחפש"); 
		document.searchd.TSex.focus(); 
	}
	else  document.searchd.submit();	
}

var bookmarkurl="http://www.A.co.il" 
var bookmarktitle="A.co.il" 

function addbookmark()
{ 
	if (document.all) 
	window.external.AddFavorite(bookmarkurl,bookmarktitle) 
} 

function setMethod(set)
{
	document.forms['morfix'].method.value = set;
	document.forms['morfix'].submit();
}