<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function spawnWindow(desktopURL,windowName,width,height,scroll) 
{
	window.open(desktopURL, windowName, "toolbars=no,top=250,left=350,scrollbars="+scroll+",width="+width+",height="+height );
}

function formValidation(formName,idsToValid)
{//alert(formName+" "+idsToValid)
	var fieldValue;
	var idsArray = idsToValid.split(",")
	for(var ii=0;ii<idsArray.length;ii++)
	{
		fieldValue = document.getElementById(idsArray[ii]).value;
		//alert(fieldValue)
		//return false;
		if(fieldValue=="")
		{
			alert('מלא שדה ' + eval("text"+ idsArray[ii] +".innerText"))
			return false;
		}
	}
	
}
function show_natour_iframe(xlink, xnewwindow)
{
	if (xlink != '' && (!xnewwindow) )
	{	
		//alert(xnewwindow);
		var table_hp_image_capsules = document.all.hp_image_capsules
		var table_hp_image_capsules_title = document.all.hp_image_capsules_title
		var table_hp_news_capsules = document.all.hp_news_capsules
		var table_hp_news_capsules_title = document.all.hp_news_capsules_title
		var natour_iframe_wrapper = document.all.natour_iframe_wrapper
		var natour_iframe = document.all.natour_iframe
	
		//_ hide image and news capsules 
		if (table_hp_image_capsules)
			table_hp_image_capsules.style.display = 'none';
		//if (table_hp_image_capsules_title)
		//	table_hp_image_capsules_title.style.display = 'none';

		if (table_hp_news_capsules)
			table_hp_news_capsules.style.display = 'none';
		
		
		
		if (table_hp_news_capsules_title)
			table_hp_news_capsules_title.style.display = 'none';
		//_ hide image and news capsules 
		
		if (natour_iframe_wrapper)
			natour_iframe_wrapper.style.display = 'block';
	
		if (natour_iframe)
		{
			natour_iframe.src = xlink;
			natour_iframe.style.width = 542;
		}
	}
	else
	{
		//spawnWindow(xlink,"menu_link",400,400,1) 
		if (screen.width == 1024)
		{
			window.open(xlink, "menu_link", "menubar=1, top=80, left=120, scrollbars=1, resizable=1, width=645, height=550");
		}
		else
		{
			window.open(xlink, "menu_link", "menubar=1, top=80, left=0, scrollbars=1, resizable=1, width=645, height=410");
		}
	}
}

//----------------------------------------------------------------------------------------------
function sendUrl()
{
	var link = "friend.asp?link=" + document.location.href;
	spawnWindow(link,'rec',250,360,'no');
}

function HiThis(item)
{
	
	var itemTR = eval("document.all." + item);
	//var itemIMG = eval("document.all." + item + "_image");
	itemBG = itemTR.style.backgroundColor;
	itemTR.style.backgroundColor = "#FF9020";
	//itemIMG.src = "images/but_details_over.gif"
			
}
function HiThisWithCheck(item,itsID)
{
	//if ((itsID==80353) || (itsID==79771) || (itsID==80354) || (itsID==79774) || (itsID==80356) || (itsID==79780) || (itsID==80363) || (itsID==79783) || (itsID==80357) || (itsID==79789) || (itsID==80358) || (itsID==79795) || (itsID==80359) || (itsID==79798) || (itsID==80360) || (itsID==79801) || (itsID==80364) || (itsID==79804) || (itsID==80365) || (itsID==79845))
	//{
	//alert ("THIS FLIGHT WILL BE OPERATED BY NAA");
	//}
	//if()
	//{
	//}
	
	//alert(itsID);
	var itemTR = eval("document.all." + item);
	//var itemIMG = eval("document.all." + item + "_image");
	itemBG = itemTR.style.backgroundColor;
	itemTR.style.backgroundColor = "#FF9020";
	//itemIMG.src = "images/but_details_over.gif"
			
}
function LowThis(item)
{
	//alert(item);
	var itemTR = eval("document.all." + item);
	//var itemIMG = eval("document.all." + item + "_image");
	itemTR.style.backgroundColor = itemBG;
	//itemIMG.src = "images/but_details.gif"
}

function HiThisBack(item)
{
	//alert(item);
	var itemTR = eval("document.all." + item);
	//var itemIMG = eval("document.all." + item + "_image");
	itemBG = itemTR.style.backgroundColor;
	itemTR.style.backgroundColor = "#FF9020";
	//itemIMG.src = "images/but_details_over.gif"
			
}
function HiThisBackWithCheck(item,itsID)
{
	//alert(item);
	var itemTR = eval("document.all." + item);
	//var itemIMG = eval("document.all." + item + "_image");
	itemBG = itemTR.style.backgroundColor;
	itemTR.style.backgroundColor = "#FF9020";
	//itemIMG.src = "images/but_details_over.gif"
			
}	
function LowThisBack(item)
{
	//alert(item);
	var itemTR = eval("document.all." + item);
	//var itemIMG = eval("document.all." + item + "_image");
	itemTR.style.backgroundColor = itemBG;
	//itemIMG.src = "images/but_details.gif"
}
function agentLogin()
{
	var f = document.frmAgents;
	
	if(!f.agentid.value)
	{
		alert("Please enter Agent ID");
		return false;
	}
		
	if(!f.agentpass.value)
	{
		alert("Please enter Agent Password");
		return false;
	}
	
	f.submit();
}
function ConvertToUserDefinedFormat(Date_,Switch_)
	{
		var D = Date_.split("/")
		//alert(Date_)
		switch(Switch_)
		{
			case 1:
				var MonthName = new Array("JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC");
				break
			case 2:
				var MonthName = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
				break
		}
		
		
		//return D.getMonth() + " " + D.GetDate() + ", " + D.getFullYear();	
		return D[1] + " " + MonthName[eval(D[0])] + " " + D[2]
	}
	
	
function calcAge(dd,mm,yy,ddc,mmc,yyc) {
	var yourage;

        if(!(ddc) || !(mmc) || !(yyc))
	{ 
      	 thedate = new Date()
	  mm2 = thedate.getMonth() + 1
	  dd2 = thedate.getDate()
	  yy2 = thedate.getYear()
	}else{
	  mm2 = mmc;
	  dd2 = ddc;
	  yy2 = yyc;
 	}
        
        if (yy2 < 100) {
	yy2 = yy2 + 1900 }
	yourage = yy2 - yy
	if (mm2 < mm) {
	yourage = yourage - 1; }
	if (mm2 == mm) {
	if (dd2 < dd) {
	yourage = yourage - 1; }
	}
	agestring = yourage + " "
	return agestring
}	

//-->