﻿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 urlAddress = "http://www.a.co.il/index.htm";
var pageName = "A.co.il";
function addToFavorites() {
        if ( window.sidebar) { // Mozilla Firefox Bookmark
            window.sidebar.addPanel (pageName, urlAddress,"");
        } else if( window.external ) { // IE Favorite
            window.external.AddFavorite(urlAddress, pageName);
        } else {
            alert("Sorry! Your browser doesn't support this function.");
        }         
}

//	function to set as home page
function setHomePage(obj){
	var isIE = document.all ? true:false;
	var isNS6 = (document.getElementById && !isIE) ? true:false;
	var isOther = (!isIE && !isNS6);
	var link = document.getElementById('setas');
	var stylesh = '<style type=text/css>'
		+'BODY{	background: #ffffff;'
		+'FONT-FAMILY: Arial, Helvetica, Geneva, sans-serif;'
		+'FONT-SIZE: 12px;'
		+'color: #oooooo;}'
		+'A:link, A:visited, A:active {color:#0000ff;}'
		+'.purplebuttontext{'
		+'COLOR: #000000;'
		+'FONT-WEIGHT: bold;'
		+'FONT-SIZE: 12px;'
		+'LINE-HEIGHT: 12px;'
		+'FONT-FAMILY: Arial, Helvetica, Geneva, sans-serif;'
		+'TEXT-DECORATION: none}'
		+'a.purplebutton{'
		+'padding: 1px 6px 1px 6px;'
		+'border: 2px outset #cccccc;'
		+'background: #eeeeee;'
		+'COLOR: #000000;'
		+'text-decoration: none;'
		+'height: 19px;'
		+'vertical-align: middle;'
		+'}'
		+'a.purplebutton:focus, a.purplebutton:hover{'
		+'border: 2px inset #cccccc;'
		+'vertical-align: middle;'
		+'background: #eeeeee; '
		+'color: #000000;'
		+'text-decoration: none;}'
		+'</style>';
	
var closewin = '<table width="100%"><tr><td class="purplebuttontext" align="left"><a href="#" class="purplebutton" onClick="window.close();">Close window</a></td></tr></table>';
	if(isIE){
		eval("link.style.behavior=\'url(#default#homepage)\';");
		eval("link.setHomePage(\'http://www.a.co.il/index.htm');");
	}
	// If its Netscape 6, tell user to drag link onto Home button
	else if(isNS6) {
		var win = window.open('','HomePage','width=180,height=80');
		win.document.write(stylesh+'ע"מ להפוך עמוד זה לעמוד הבית<br>' + '<A ondrag="window.close();" HREF="http://www.a.co.il/index.htm">A.co.il</a> שלך גרור את הלינק <br>' + 'לכפתור של עמוד הבית בדפדפן'  +closewin);
	}
	else {
		var win = window.open('','HomePage','width=180,height=80');
		win.document.write(stylesh+'<b>Make this site your home page:</b><br>- Go to <b>Preferences</b> in the <B>Edit</B> Menu.<br>- Choose <b>Navigator</b> from the list on the left.<br>- Click on the <b>"Use Current Page"</b> button.<p>'+closewin);
	}
}


function setMethod(set)
{
	document.forms['morfix'].method.value = set;
	document.forms['morfix'].submit();
}