function enlargeText(elem){
	var elemTextSize = document.getElementById(elem).style.fontSize;
	if(elemTextSize=="")
		document.getElementById(elem).style.fontSize = "18px";
	else{	
		oldSize = elemTextSize.replace("px","");
		newSize = parseFloat(oldSize)+6;
		document.getElementById(elem).style.fontSize = newSize + "px";
	}
		
	return;
}
function reduceText(elem){
	var elemTextSize = document.getElementById(elem).style.fontSize;
	if(elemTextSize=="")
		document.getElementById(elem).style.fontSize = "14px";
	else{	
		if(elemTextSize!="14px"){
			oldSize = elemTextSize.replace("px","");
			newSize = parseFloat(oldSize)-6;
			document.getElementById(elem).style.fontSize = newSize + "px";
		}
	}
		
	return;
}

function sendPage(page_id,webSite_id,siteLang)
{
	day = new Date();
	id = day.getTime();	
	eval("page" + id + " = window.open('index.asp?catID='+page_id+'&siteLang='+siteLang+'&action=sendPage&send_page_id='+page_id, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=1,resizable=0,width=300,height=450,left = 540,top = 312');");	
}

function doDuplicat(pageName)
{
	var duplicatTo = window.showModalDialog("/contentManagment/admin/includes/duplicat.asp","????","dialogHeight: 100px; dialogWidth: 200px; dialogTop: px; dialogLeft: px; edge: Raised; center: Yes; help: No; resizable: No; status: No;");
	document.myForm.action = pageName + "?action=duplicat&newLang=" + duplicatTo;
	document.myForm.submit();
}	

function showImage(url,title,x,y)
{
	window.open(url,title,"height="+y+"px,width="+x+"px,location=no,scrollbars=yes,titlebar=no,menubars=no,toolbars=no,resizable=yes,margin=0");
}			

function MoveToPage(PageNumber,PagingPageName,filterUser)
{
	location = PagingPageName+"?iCurrentPage=" + PageNumber + filterUser;
}


function getDate(obj)
{
	var args = showModalDialog("/contentManagment/admin/includes/dPicker1.html", null ,"dialogHeight:270px; dialogwidth:230px;");
	if (args != undefined)
		obj.value= args;
	if (args == undefined)
		obj.value= "";	
}		


function getFile(objField,webSite_id)
{
	var x = showModalDialog('/contentManagment/admin/includes/browser/popups/insert_image.asp?webSite_id='+webSite_id,'', 'scrollbars:yes; width:550px; height:530px;');
	if(x != 0 && x != undefined)
	{
		objField.value = x;
	}
}	

function showBan(divName,width,height,wmode,src,bgcolor) 
{
	var d=document.getElementById(divName);
	if(width != 0 && height !=0)
	{
		d.innerHTML='<OBJECT classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0  WIDTH='+width+' HEIGHT='+height+'>'+wmode+'<PARAM NAME=movie VALUE="'+src+'"><PARAM NAME=quality VALUE=high><param name=bgcolor value="'+bgcolor+'"><EMBED src="'+src+'" quality=high WIDTH='+width+' HEIGHT='+height+' bgcolor="'+bgcolor+'" wmode="opaque" TYPE=application/x-shockwave-flash PLUGINSPAGE=http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash></EMBED></OBJECT>';
	}
	if(width == 0 && height !=0)
	{
		d.innerHTML='<OBJECT classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0  HEIGHT='+height+'>'+wmode+'<PARAM NAME=movie VALUE="'+src+'"><PARAM NAME=quality VALUE=high><param name=bgcolor value="'+bgcolor+'"><EMBED src="'+src+'" quality=high HEIGHT='+height+' bgcolor="'+bgcolor+'" wmode="opaque" TYPE=application/x-shockwave-flash PLUGINSPAGE=http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash></EMBED></OBJECT>';
	}
	if(width != 0 && height ==0)
	{
		d.innerHTML='<OBJECT classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0  WIDTH='+width+'>'+wmode+'<PARAM NAME=movie VALUE="'+src+'"><PARAM NAME=quality VALUE=high><param name=bgcolor value="'+bgcolor+'"><EMBED src="'+src+'" quality=high WIDTH='+width+' bgcolor="'+bgcolor+'" wmode="opaque" TYPE=application/x-shockwave-flash PLUGINSPAGE=http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash></EMBED></OBJECT>';
	}

}



function showMovie(divName,width,height,src,picID) 
{
	var d=document.getElementById(divName);
	d.innerHTML='<object id="itemPlayer" style="border-left-color: #ff0000; border-bottom-color: #ff0000; border-top-style: solid; border-top-color: #ff0000; border-right-style: solid; border-left-style: solid; border-right-color: #ff0000; border-bottom-style: solid; backgroung-color: black" type="application/x-oleobject" width="'+ width +'" height="'+ height +'" standby="Loading Microsoft Windows Media Player components..."  align="absMiddle" border="0" classid="CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6" bgcolor="black"><param value="'+ src +'" name="URL" /><param value="0" name="autoStart" /><param value="50" name="volume" /><param value="0" name="mute" /><param value="1" name="ShowDisplay" /><param value="1" name="ShowCaptioning" /><PARAM NAME="Enabled" VALUE="-1" /><PARAM NAME="EnableContextMenu" VALUE="0" /><PARAM name="uiMode" value="full" /></object>';
}
function showMovieFLV(divName,width,height,src,picID,flvScriptURL)
{
	var obgectInnerHTML	
	var d=document.getElementById(divName);
	objectHTML = '';
	objectHTML = objectHTML + '<OBJECT' ;
	objectHTML = objectHTML + 'classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
	objectHTML = objectHTML + 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"  ';
	objectHTML = objectHTML + 'WIDTH="'+width+'" ';
	objectHTML = objectHTML + 'HEIGHT="'+height+'">';
	objectHTML = objectHTML + '<PARAM NAME=wmode VALUE=opaque>';
	objectHTML = objectHTML + '<PARAM NAME=movie VALUE="'+flvScriptURL+'">';
	objectHTML = objectHTML + '<PARAM NAME=quality VALUE=high>';
	objectHTML = objectHTML + '<PARAM NAME=flashvars VALUE="file=allowfullscreen=true&'+src+'">';
	objectHTML = objectHTML + '<embed src="'+flvScriptURL+'" width="'+width+'" height="'+height+'" ';
	objectHTML = objectHTML + 'wmode="opaque"';
	objectHTML = objectHTML + 'type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" ';
	objectHTML = objectHTML + 'flashvars="allowfullscreen=true&file='+src+'" />';
	objectHTML = objectHTML + '</OBJECT>';
	d.innerHTML=objectHTML;	
}

function showSoundMP3(divName,width,height,src,picID,flvScriptURL)
{
	var obgectInnerHTML	
	var d=document.getElementById(divName);
	objectHTML = '';
	objectHTML = objectHTML + '<embed src="'+flvScriptURL+'" width="'+width+'" height="'+height+'" ';
	objectHTML = objectHTML + 'wmode="opaque"';
	objectHTML = objectHTML + 'type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" ';
	objectHTML = objectHTML + 'flashvars="file='+src+'&repeat=false&showdigits=true&showdownload=false"/>';
	d.innerHTML=objectHTML;	
}

function addComment(page_id,webSite_id)
{
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open('index.asp?action=addComment&comment_page_id="+page_id+"', '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=1,resizable=0,width=300,height=350,left = 540,top = 312');");
}
function showComment(commentID){
	commentTable = document.getElementById('comment_table_'+commentID).style.backgroundColor;
	commentTr	 = document.getElementById('comment_tr_'+commentID).style.display;
	commentNoText= document.getElementById('no_text_id_string').value;
	if(commentNoText.length > 0)
	{
		commentNoText = "|"+commentNoText;	
		if (commentNoText.indexOf("|"+commentID+"|")>0)
		{
		}
		else
		{
			if(commentTr=='none'){
				document.getElementById('comment_table_'+commentID).style.backgroundColor = "#DFE2E1";
				document.getElementById('comment_tr_'+commentID).style.display = "block";
			}
			else{
				document.getElementById('comment_table_'+commentID).style.backgroundColor = "#FFFFFF";
				document.getElementById('comment_tr_'+commentID).style.display = "none";
			}
		}
	}
	else
	{
		if(commentTr=='none'){
			document.getElementById('comment_table_'+commentID).style.backgroundColor = "#DFE2E1";
			document.getElementById('comment_tr_'+commentID).style.display = "block";
		}
		else{
			document.getElementById('comment_table_'+commentID).style.backgroundColor = "#FFFFFF";
			document.getElementById('comment_tr_'+commentID).style.display = "none";
		}
	}
}
function openComments(numOfComments){
	for (i=1; i<=numOfComments; i++)	
	{
		commentTable = document.getElementById('comment_table_'+i).style.backgroundColor;
		commentTr	 = document.getElementById('comment_tr_'+i).style.display;
		document.getElementById('comment_table_'+i).style.backgroundColor = "#DFE2E1";
		document.getElementById('comment_tr_'+i).style.display = "block";
	}
}
function closeComments(numOfComments){
	for (i=1; i<=numOfComments; i++)	
	{
		commentTable = document.getElementById('comment_table_'+i).style.backgroundColor;
		commentTr	 = document.getElementById('comment_tr_'+i).style.display;
		document.getElementById('comment_table_'+i).style.backgroundColor = "#FFFFFF";
		document.getElementById('comment_tr_'+i).style.display = "none";
	}
}

function printpage() {
	window.print();  
}

function changeLang(pageName)
{
	document.myForm.action = pageName;
	document.myForm.submit();	
}	



function changeCountry(countryID)
{
	document.getElementById("city_select").innerHTML=""
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="/contentManagment/admin/includes/ajax.asp"
	url=url+"?action=changeCountry"
	url=url+"&countryID="+countryID.value
	url=url+"&filterOptions=1"
	url=url+"&sid="+Math.random()
	xmlHttp.onreadystatechange=countryChanged 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
} 
	
function countryChanged() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("city_select").innerHTML=xmlHttp.responseText;
	} 
} 
function showHint(str)
{
	if (str.length==0)
	{ 
		document.getElementById("txtHint").innerHTML=""
		return
	}
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="/contentManagment/admin/includes/ajax.asp"
	url=url+"?action=checkPassportNew"
	url=url+"&passportNew="+str
	url=url+"&sid="+Math.random()
	xmlHttp.onreadystatechange=stateChanged 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
} 
	
function stateChanged() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("txtHint").innerHTML=xmlHttp.responseText 
	} 
	} 


function getColor(objField)
{
	var oldcolor = objField.value;
	var newcolor = showModalDialog("/contentManagment/admin/includes/htmlarea/popups/select_color.html", oldcolor, "resizable: no; help: no; status: no; scroll: no;");
	objField.value = newcolor;	
	objField.style.backgroundColor = newcolor;	
		
}			


function getFieldFromTable(tableName,fieldName,objField)
{
	return window.open("/contentManagment/admin/tables/tablesIndex.asp?tableName="+tableName+"&fieldName="+fieldName+"&objField="+objField,"","scrollbars=yes,width=300,height=350");		
}
	
function closeFilterDiv()
{
	document.getElementById("filterDiv").innerHTML=""
}

function GetXmlHttpObject()
{ 
	var objXMLHttp=null
	if (window.XMLHttpRequest)
	{
		objXMLHttp=new XMLHttpRequest()
	}
	else if (window.ActiveXObject)
	{
		objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
	}
	return objXMLHttp
} 	

function saveAndmove(passportNum,rowTable,att)
{
	document.all.myForm.action = "?action=updateNext&selectedRow=" + passportNum + "&rowTable=" + rowTable + "&att=" + att
	document.all.myForm.submit()
}
function saveAndmoveBack(passportNum,rowTable,att)
{
	document.all.myForm.action = "?action=updatePrev&selectedRow=" + passportNum + "&rowTable=" + rowTable + "&att=" + att
	document.all.myForm.submit()
}

function setChecked()
{
	var isCheaced = "";
	for (i=0; i<document.myForm.elements.length; i++)	
	{
		if (document.myForm.elements[i].type=="checkbox")
		{
			if (document.myForm.elements[i].checked == true)
			{
				isCheaced = isCheaced + "1"
			}			
		}
	}

	
	for (i=0; i<document.myForm.elements.length; i++)	
	{
		if (document.myForm.elements[i].type=="checkbox")
		{
			if (isCheaced == "")
			{
				document.myForm.elements[i].checked = true
			}
			else
			{
				document.myForm.elements[i].checked = false				
			}	
			
		}	
	}	
}

















var myPASSPORT = "";
function showGroups(PASSPORT)
{
	myPASSPORT = PASSPORT;
	document.getElementById("group_for_organizer_"+PASSPORT).innerHTML="";
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request");
		return;
	} 
	var url="/contentManagment/admin/includes/ajax.asp";
	url=url+"?action=paymentShowGroup";
	url=url+"&PASSPORT="+PASSPORT;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=groupChanged;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
} 
function hideGroups(PASSPORT)
{
	myPASSPORT = PASSPORT;
	document.getElementById("group_for_organizer_"+PASSPORT).innerHTML="";
} 
	
function groupChanged()
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("group_for_organizer_"+myPASSPORT).innerHTML=xmlHttp.responseText;
	} 
} 





var myGroup_id = "";
function showStudents(group_id)
{
	myGroup_id = group_id;
	document.getElementById("students_for_group_"+group_id).innerHTML="";
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request");
		return;
	} 
	var url="/contentManagment/admin/includes/ajax.asp";
	url=url+"?action=paymentShowStudents";
	url=url+"&group_id="+group_id;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=studentChanged;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
} 
function hideStudents(group_id)
{
	myGroup_id = group_id;
	document.getElementById("students_for_group_"+group_id).innerHTML="";
} 
	
function studentChanged()
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("students_for_group_"+myGroup_id).innerHTML=xmlHttp.responseText;
	} 
} 








var mySPASSPORT = "";
function showLessons(PASSPORT)
{
	mySPASSPORT = PASSPORT;
	document.getElementById("lessons_for_student_"+PASSPORT).innerHTML="";
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request");
		return;
	} 
	var url="/contentManagment/admin/includes/ajax.asp";
	url=url+"?action=paymentShowLessons";
	url=url+"&student_id="+PASSPORT;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=lessonChanged;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
} 
function hideLessons(PASSPORT)
{
	mySPASSPORT = PASSPORT;
	document.getElementById("lessons_for_student_"+PASSPORT).innerHTML="";
} 
	
function lessonChanged()
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("lessons_for_student_"+mySPASSPORT).innerHTML=xmlHttp.responseText;
	} 
} 







function showTab(tabToShow,tabNum)
{
	for (i=1; i<=tabNum; i++)	
	{
		if(i!=tabToShow)
		{
			if(document.getElementById(i+'_tab_head') != null)
			{
				document.getElementById(i+'_tab').style.display='none';
				document.getElementById(i+'_tab_head').className = 'tab_off_td';
			}
		}
		else
		{
			document.getElementById(i+'_tab').style.display='block';									
			document.getElementById(i+'_tab_head').className = 'tab_on_td';										
		}	
	}	
}





function startclock()
{
	var thetime=new Date();
	var nhours=thetime.getHours();
	var nmins=thetime.getMinutes();
	var nsecn=thetime.getSeconds();
	var nday=thetime.getDay();
	var nmonth=thetime.getMonth();
	var ntoday=thetime.getDate();
	var nyear=thetime.getYear();
	var AorP=" ";

	if (nhours>=12)
		AorP="P.M.";
	else
		AorP="A.M.";

	if (nhours>=13)
		nhours-=12;
	
	if (nhours==0)
	   nhours=12;
	
	if (nsecn<10)
	 nsecn="0"+nsecn;
	
	if (nmins<10)
	 nmins="0"+nmins;
	
	if (nday==0)
	  nday="Sunday";
	if (nday==1)
	  nday="Monday";
	if (nday==2)
	  nday="Tuesday";
	if (nday==3)
	  nday="Wednesday";
	if (nday==4)
	  nday="Thursday";
	if (nday==5)
	  nday="Friday";
	if (nday==6)
	  nday="Saturday";

	nmonth+=1;

	if (nyear<=99)
	  nyear= "19"+nyear;
	
	if ((nyear>99) && (nyear<2000))
	 nyear+=1900;

document.getElementById('corentTimeDIV').innerHTML = nhours+":"+nmins+":"+nsecn+" "+ntoday+"/"+nmonth+"/"+nyear;

setTimeout('startclock()',1000);

} 

// return date formatted as dd/mm/yyyy
function selectDate_formatDate(dyear,dmonth,dday) 
{
	min_year = 1900;
	if (dyear<min_year) {
	  dyear = min_year;
	}
	y_mod4 = dyear % 4;
	if (dmonth<1) dmonth = 1;
	if (dmonth>12) dmonth = 12;
	if (dmonth==2) {
	  num_days = (y_mod4==0)?29:28;
	} else if(dmonth % 2) {
	  num_days = 31;
	} else {
	  num_days = 30;
	}
	if (dday<1) dday =1;
	if (dday>num_days) dday = num_days;
	res = (dday<10)?("0"+dday+"/"):(dday+"/");
	res += (dmonth<10)?("0"+dmonth+"/"):(dmonth+"/");
	res += dyear;
	return res;
	}
			function setSelectDate(attID)
			{
				inputDate = document.getElementById(attID).value;
				inputDate_day = document.getElementById('selectDateDay_'+attID).value;
				inputDate_month = document.getElementById('selectDateMonth_'+attID).value;
				inputDate_year = document.getElementById('selectDateYear_'+attID).value;
	
	dyear = parseInt(inputDate_year);
	dmonth = parseInt(inputDate_month);
	dday = parseInt(inputDate_day);
	
	f_date = selectDate_formatDate(dyear,dmonth,dday);
	document.getElementById(attID).value = f_date;
	//alert(f_date);
			}
			
			
			
			
			







/////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////

// UDMv4.5 //
/***************************************************************/
var um={'menuClasses':[],'itemClasses':[],'menuCode':[]};
/***************************************************************\

  ULTIMATE DROP DOWN MENU Version 4.5 by Brothercake
  http://www.udm4.com/

  This script may not be used or distributed without license

\***************************************************************/


/***************************************************************\
 * CORE CONFIGURATION
\***************************************************************/


//path to images folder
um.baseSRC = "/udm-resources/";


//initialization trigger element ["id"];
um.trigger = "contact";


//navbar orientation
um.orientation = [
	"expanding",	// alignment ["vertical"|"horizontal"|"popup"|"expanding"]
	"left",		// h align ["left"|"right"|"rtl"]
	"top",		// v align ["top"|"bottom"]
	"absolute",	// positioning ["relative"|"absolute"|"fixed"|"allfixed"]
	"8px",	// x position ["em"|"ex"|"px"|"0"]
	"8px",	// y position ["em"|"ex"|"px"|"0"]
	"1000",		// z order ["0" to "10000"] (menu takes 20000 headroom)
	];


//navbar list output
um.list = [
	"flexible",	// horizontal overflow ["rigid"|"flexible"]
	"yes",		// -SPARE-
	"no", 		// -SPARE-
	];


//menu behaviors
um.behaviors = [
	"0",		// open timer ["milliseconds"|"0"]
	"never",	// close timer ["milliseconds"|"never"|"0"]
	"yes",		// reposition menus to stay inside the viewport ["yes"|"no"]
	"none",	// manage windowed controls for win/ie ["default","hide","iframe","none"]
	];


//reset behaviors
um.reset = [
	"no",		// reset from document mouse click ["yes"|"no"]
	"no",		// reset from window resize ["yes"|"no"]
	"no",		// reset from text resize ["yes"|"no"]
	"no",		// reset after following link ["yes"|"no"]
	];


//horizontal continuation strip
um.hstrip = [
	"none",		// background ["color"|"#hex"|"rgb()"|"image.gif"|"none"]
	"yes",		// copy item margin-right to margin-bottom ["yes"|"no"]
	];


/***************************************************************\
 * MODULE SETTINGS
\***************************************************************/


//keyboard navigation
um.keys = [
	"38",		// up ["n"] ("38" = up arrow key)
	"39",		// right ["n"] ("39" = right arrow key)
	"40",		// down ["n"] ("40" = down arrow key)
	"37",		// left ["n"] ("37" = left arrow key)
	"123",		// hotkey ["n"] ("123" = F12)
	"none",		// hotkey modifier ["none"|"shiftKey"|"ctrlKey"|"altKey"|"metaKey"]
	"27",		// escape ["n"|"none"] ("27" = escape key)
	"document.getElementsByTagName('a')[4]", // exit focus ["js-expression"]
	];


/***************************************************************\
 * NAVBAR DEFAULT STYLES
\***************************************************************/


//styles which apply to the navbar
um.navbar = [
	"0",		// nav to menu x-offset (+-)["n" pixels]
	"0",		// nav to menu y-offset (+-)["n" pixels]
	"128px",	// width ["em"|"ex"|"px"] (vertical navbar only - horizontal navbar items have "auto" width) ("%" doesn't work right)
	];


//styles which apply to each navbar item
um.items = [
	"1",		// margin between items ["n" pixels]
	"1",		// border size ["n" pixels] (single value only)
	"collapse",	// border collapse ["collapse"|"separate"] (only applies when margin = "0")
	"#ead4a4 #edbb85 #edbb85 #ead4a4",// border colors ["color"|"#hex"|"rgb()"] (single, double or four values)
	"solid",	// border styles ["solid"|"double"|"dotted"|"dashed"|"groove"|"ridge"|"inset"|"outset"] (single, double or four values; be careful with using "none")
	"#ead4a4 #ead4a4 #fae4b4 #fae4b4",// hover/focus border colors ["color"|"#hex"|"rgb()"] (single, double or four values)
	"solid",	// hover/focus border styles ["solid"|"double"|"dotted"|"dashed"|"groove"|"ridge"|"inset"|"outset"] (single, double or four values; be careful with using "none")
	"#ead4a4 #edbb85 #edbb85 #ead4a4",// visited border colors ["color"|"#hex"|"rgb()"] (single, double or four values)
	"solid dashed solid solid",// visited border styles ["solid"|"double"|"dotted"|"dashed"|"groove"|"ridge"|"inset"|"outset"] (single, double or four values; be careful with using "none")
	"9",		// left/right padding ["n" pixels] (single value only)
	"5",		// top/bottom padding ["n" pixels] (single value only)
	"orange-yellow-gradient.jpg",// background ["color"|"#hex"|"rgb()"|"image.gif"]
	"orange-cream-gradient.jpg",// hover/focus background ["color"|"#hex"|"rgb()"|"image.gif"]
	"orange-yellow-gradient.jpg",// visited background ["color"|"#hex"|"rgb()"|"image.gif"]
	"75%",		// font size ["em"|"ex"|"%"|"px"|"pt"|"absolute-size"|"relative-size"]
	"tahoma,sans-serif",// font family ["font1,font2,font3"] (always end with a generic family name)
	"bold",		// font weight ["normal"|"bold"|"bolder"|"lighter|"100" to "900"]
	"none",		// text decoration ["none"|"underline"|"overline"|"line-through"]
	"left",		// text-align ["left"|"right"|"center"]
	"#008000",	// color ["color"|"#hex"|"rgb()"]
	"#b05010",	// hover/focus color ["color"|"#hex"|"rgb()"]
	"#008000",	// visited color ["color"|"#hex"|"rgb()"]
	"normal",	// font-style ["normal"|"italic"|"oblique"]
	"normal",	// hover/focus font-style ["normal"|"italic"|"oblique"]
	"normal",	// visited font-style ["normal"|"italic"|"oblique"]
	"background-color:#ffc;letter-spacing:1px !important;",// additional link CSS (careful!)
	"background-color:#ffe;",// additional hover/focus CSS (careful!)
	"background-color:#ffc;",// additional visited CSS (careful!)
	"down-green.gif",// menu indicator character/image ["text"|"image.gif"|"none"]
	"down-red.gif",// menu indicator rollover image ["image.gif"|"none"] (only when using image arrows)
	"7",		// clipping width of indicator image ["n" pixels] (only when using image arrows)
	"..",		// alt text of indicator image ["text"] (only when using image arrows)
	];


/***************************************************************\
 * MENU DEFAULT STYLES
\***************************************************************/


//styles which apply to each menu
um.menus = [
	"0",		// menu to menu x-offset (+-)["n" pixels]
	"0",	// menu to menu y-offset (+-)["n" pixels]
	"1",		// border size ["n" pixels] (single value only)
	"#ead4a4",// border colors ["color"|"#hex"|"rgb()"] (single, double or four values)
	"solid",	// border styles ["solid"|"double"|"dotted"|"dashed"|"groove"|"ridge"|"inset"|"outset"] (single, double or four values; be careful with using "none")
	"119px",	// width ["em"|"ex"|"px"]
	"3",		// padding ["n" pixels] (single value only)
	"#f8fbd0",	// background ["color"|"#hex"|"rgb()"|"image.gif"]
	"",		// additional menu CSS (careful!) (you can use a transition here but *not* a static filter)
	"none",// shadow background ["color"|"#hex"|"rgb()"|"image.gif"|"none"]
	"0",		// shadow offset (+-)["em"|"ex"|"px"|"%"|"0"]
	"",// additional shadow layer CSS (if you use a Microsoft.Shadow filter here then Win/IE5.5+ will do that *instead* of default shadow)
	];


//styles which apply to each menu item
um.menuItems = [
	"0",		// margin around items ["n" pixels] (single value only; margins are like table cellspacing)
	"0",		// border size ["n" pixels] (single value only)
	"separate",	// border collapse ["collapse"|"separate"] (only applies when margin = "0")
	"",	// border colors ["color"|"#hex"|"rgb()"] (single, double or four values)
	"solid",	// border styles ["solid"|"double"|"dotted"|"dashed"|"groove"|"ridge"|"inset"|"outset"] (single, double or four values; be careful with using "none")
	"",		// hover/focus border colors ["color"|"#hex"|"rgb()"] (single, double or four values)
	"solid",	// hover/focus border styles ["solid"|"double"|"dotted"|"dashed"|"groove"|"ridge"|"inset"|"outset"] (single, double or four values; be careful with using "none")
	"",	// visited border colors ["color"|"#hex"|"rgb()"] (single, double or four values)
	"solid",	// visited border styles ["solid"|"double"|"dotted"|"dashed"|"groove"|"ridge"|"inset"|"outset"] (single, double or four values; be careful with using "none")
	"5",		// left/right padding ["n" pixels] (single value only)
	"2",		// top/bottom padding ["n" pixels] (single value only)
	"transparent",	// background ["color"|"#hex"|"rgb()"|"image.gif"]
	"#fec",	// hover/focus background ["color"|"#hex"|"rgb()"|"image.gif"]
	"transparent",	// visited background ["color"|"#hex"|"rgb()"|"image.gif"]
	"70%",		// font size ["em"|"ex"|"%"|"px"|"pt"|"absolute-size"|"relative-size"]
	"'trebuchet sans ms',sans-serif",// font family ["font1,font2,font3"] (always end with a generic family name)
	"normal",	// font weight ["normal"|"bold"|"bolder"|"lighter|"100" to "900"]
	"none",		// text decoration ["none"|"underline"|"overline"|"line-through"]
	"left",		// text-align ["left"|"right"|"center"]
	"#060",		// color ["color"|"#hex"|"rgb()"]
	"#000",		// hover/focus color ["color"|"#hex"|"rgb()"]
	"#060",		// visited color ["color"|"#hex"|"rgb()"]
	"normal",	// font-style ["normal"|"italic"|"oblique"]
	"normal",	// hover/focus font-style ["normal"|"italic"|"oblique"]
	"normal",	// visited font-style ["normal"|"italic"|"oblique"]
	"letter-spacing:0 !important;",		// additional link CSS (careful!)
	"",		// additional hover/focus CSS (careful!)
	"",		// additional visited CSS (careful!)
	"down-tinygreen.gif",// submenu indicator character/image ["text"|"image.gif"|"none"]
	"down-tinyblack.gif",// submenu indicator rollover image ["image.gif"|"none"] (only when using image arrows)
	"7",		// clipping width of indicator image ["n" pixels] (only when using image arrows)
	"..",		// alt text of indicator image ["text"] (only when using image arrows)
	];


/***************************************************************\
 * MENU CLASSES
\***************************************************************/




/***************************************************************\
 * DYNAMIC MENUS
\***************************************************************/





/***************************************************************\
\***************************************************************/


/////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////





// check wat to insert only english
  var input_fix_tick_last_val = "";
  var input_fix_lang = "en";

  // to select the filter, uncomment the appropriate line:
  var input_fix_regex = new Array();
  regex_common_allowed = "0-9\\-\\s,.!*@_";
  input_fix_regex["en"] = new RegExp("[^"+regex_common_allowed+"a-zA-Z]","g");
  input_fix_regex["he"] = new RegExp("[^"+regex_common_allowed+"?-?]","g");
  input_fix_regex["ru"] = new RegExp("[^"+regex_common_allowed+"?-??-?]","g");
  
  var input_fix_arr = Array();
  
  function input_fix_tick() {
    for (e_id in input_fix_arr) {
      edata = input_fix_arr[e_id];
      elm = edata["elm"];
      my_regex = edata["regex"];
      str = elm.value;
      if (str!=input_fix_tick_last_val) {
        str_fix = str.replace(my_regex,'');
        if (str_fix!=str) {
          input_fix_tick_last_val = str_fix;
          elm.value = str_fix;
        }
      }
    }
    setTimeout("input_fix_tick()",100);
  }
  
  function inpux_fix_keypress(event) {
    if (window.event) {
      evt = window.event;
    } else {
      evt = event;
    }
    if (evt.keyCode) {
      code = evt.keyCode;
    } else if (evt.charCode) {
      code = evt.charCode;
    } else {
      return true;
    }
    if ((code<32) || (code==37) || (code==39)) return true;
    str = String.fromCharCode(code);
    if (evt.srcElement) {
      elm = evt.srcElement;
    } else if (evt.target) {
      elm = evt.target;
    } else {
      return true;
    }
    edata = input_fix_arr[elm.id];
    if (!edata) return true;
    my_regex = edata["regex"];
    if (str.search(my_regex)==-1) {
      return true;
    } else {
      return false;
    }
  }
  
  function input_fix_register_element(elm_id,elm_lang) {
    elm = document.getElementById(elm_id);
    if (!elm) {
      alert('input_fix: bad element id!'); return;
    }
    my_regex = input_fix_regex[elm_lang];
    if (!my_regex) {
      alert('input_fix: bad language code!'); return;
    }
    edata = new Array();
    edata["elm"] = elm;
    edata["regex"] = my_regex;
    input_fix_arr[elm_id] = edata;
    elm.onkeypress = inpux_fix_keypress;
  }






  var dsearch_clicked = 0;
  function dsearch_activate(elem) {
    if (dsearch_clicked) return;
    elem.value = '';
    elem.style.color = '#000000';
    dsearch_clicked = 1;
  }








/*
##########################################
#######  menu  ##########
##########################################
*/
/*
navHover = function() {
	var lis = document.getElementById("navmenu-h").getElementsByTagName("LI");
	for (var i=0; i<lis.length; i++) {
		lis[i].onmouseover=function() {
			this.className+=" iehover";
		}
		lis[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" iehover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", navHover);






navHover = function() {
	var lis = document.getElementById("navmenu-v").getElementsByTagName("LI");
	for (var i=0; i<lis.length; i++) {
		lis[i].onmouseover=function() {
			this.className+=" iehover";
		}
		lis[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" iehover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", navHover);
*/








var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])

function fixPNG(myImage) 
{
    if ((version >= 5.5) && (version < 7) && (document.body.filters)) 
    {
       var imgID = (myImage.id) ? "id='" + myImage.id + "' " : ""
	   var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
	   var imgTitle = (myImage.title) ? 
		             "title='" + myImage.title  + "' " : "title='" + myImage.alt + "' "
	   var imgStyle = "display:inline-block;" + myImage.style.cssText
	   var strNewHTML = "<span " + imgID + imgClass + imgTitle
                  + " style=\"" + "width:" + myImage.width 
                  + "px; height:" + myImage.height 
                  + "px;" + imgStyle + ";"
                  + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
                  + "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>"
	   myImage.outerHTML = strNewHTML	  
    }
}




/*
Copyright 2005, 4word systems
All rights reserved.

This software may not be reproduced or distributed in any form without the express 
written consent of 4word systems or it's designee.

Revision 1.1:  20050729 Added underscore to list of valid characters
*/


function isValidEmail(email, required) {
    if (required==undefined) {   // if not specified, assume it's required
        required=true;
    }
    if (email==null) {
        if (required) {
            return false;
        }
        return true;
    }
    if (email.length==0) {  
        if (required) {
            return false;
        }
        return true;
    }
    if (! allValidChars(email)) {  // check to make sure all characters are valid
        return false;
    }
    if (email.indexOf("@") < 1) { //  must contain @, and it must not be the first character
        return false;
    } else if (email.lastIndexOf(".") <= email.indexOf("@")) {  // last dot must be after the @
        return false;
    } else if (email.indexOf("@") == email.length) {  // @ must not be the last character
        return false;
    } else if (email.indexOf("..") >=0) { // two periods in a row is not valid
	return false;
    } else if (email.indexOf(".") == email.length) {  // . must not be the last character
	return false;
    }
    return true;
}

function allValidChars(email) {
  var parsed = true;
  var validchars = "abcdefghijklmnopqrstuvwxyz0123456789@.-_";
  for (var i=0; i < email.length; i++) {
    var letter = email.charAt(i).toLowerCase();
    if (validchars.indexOf(letter) != -1)
      continue;
    parsed = false;
    break;
  }
  return parsed;
}

function isValidPhone(phone) {
  var t_counter = 0;
  var validchars = "0123456789";
  for (var i=0; i < phone.length; i++) {
    var letter = phone.charAt(i).toLowerCase();
    if (validchars.indexOf(letter) != -1)
      t_counter = t_counter+1;
  }
  if (t_counter<7)
  {
	  return false;
  }
  else
  {
	  return true;
  }
}

function addToFav() {
	var title = "Sofash";
	var url = "http://www.sofash.co.il";
     if (window.sidebar) { // firefox
              window.sidebar.addPanel(title, url,"");
        } else if( document.all ) { //MSIE
                window.external.AddFavorite( url, title);
        } else {
               alert("Sorry, your browser doesn't support this");
        }
}

function bannerOver(theBaner,bannerOverItem,bannerLink,bannerNewWin,bannerID,bannerClick){
	//alert(parseInt($(theBaner).position().top)+60);
	var my_screen_width = screen.width;
	var add_to_left_padding = 0;
	if(my_screen_width>1280)
		add_to_left_padding = (parseInt(my_screen_width)-1280)/2; 
	$(bannerOverItem).css('top',(parseInt($(theBaner).position().top)+75)+'px');
	$(bannerOverItem).css('left',(parseInt($(theBaner).position().left)+122+add_to_left_padding)+'px');
	$(bannerOverItem).css('width',$(theBaner).width()+'px');
	$(bannerOverItem).css('height',$(theBaner).height()+'px');
	if(bannerLink!="")
	{
		$(bannerOverItem).click(function() {clickOnBanner(bannerLink,bannerNewWin,bannerID,bannerClick)}); 
	}
}


function clickOnBanner(bannerLink,bannerNewWin,bannerID,bannerClick){
	$.get("/contentManagment/ajaxBanner.asp", { action:"updateBannerClick" , banner_id: bannerID , file_show_num: bannerClick },
		function(data){
	});	
	if (bannerLink!='')
	{
		if(bannerNewWin=="true"){
			window.open(bannerLink);
		}
		else{
			document.location=bannerLink;
		}	
	}
}










