var financeMenuLines = new Array("ראשי","מבט לשווקים","חברות","אג\"ח","קרנות נאמנות","תעודות סל","מעו\"ף","וול סטריט","אירופה","קרנות גידור","קופות גמל");
var sections = new Array("היי-טק","שוק ההון","וול סטריט","בעולם","קריירה","פרסום ומדיה","משפט","צרכנות","נדל\"ן","רכב","המדריך למשקיע","TV","Finance");
var sectionsLayers = new Array("hightech","market","walls","world","career","media","law","consumer","realEstate","car","investorGuide","tv","finance");
var newsletterMenuLines = new Array("עשרת הגדולים","מהדורת <b>IT</b>","מהדורת צרכנות","Marker ToGo","הסיפור המרכזי","סיכום היום","מהדורת נדל\"ן");
var newsletterMenuLinesURL = new Array("/newsletter","/newsletter","/newsletter","/newsletter","/newsletter","/newsletter","/newsletter");
var themarkerServices = new Array("מסחר בני\"ע","תיק אישי","ארכיון","כל הכותרות","כל הבלוגים","התראות","זמן אמת","התראות SMS","NewsLetter");
var moreLinks = new Array("English","<span><img vspace='4'  src='/tmc/i/c/hakrishim2.gif' border='0' ></span>");
var tempMinSelectedSection;//the points gif that is located right to the current section
var tempMaxSelectedSection;//the points gif that is located left to the current section	
var isFinMenuVisible = false;//is finance menu displayed now
var isNewsletterMenuVisible = false;//is newsletter menu displayed now
var downFin=0,downNews=0;//how much pixels are displayed in the menu
var zFin,yFin,zNews,yNews;//time
var INVESTORGUIDE_SECTION = 10; // a constant for changing the color of investor guide section font to green 


function containsDOM (container, containee) 
{
	var isParent = false;
  	do{
    	if ((isParent = container == containee))
      		break;
    	containee = containee.parentNode;
  	}
  	while (containee != null);
  	return isParent;
}

function checkMouseEnter (element, evt) 
{
	if (element.contains && evt.fromElement) 
	{
    	return !element.contains(evt.fromElement);
  	}
  	else if (evt.relatedTarget) 
	{
    	return !containsDOM(element, evt.relatedTarget);
  	}
}

function checkMouseLeave (element, evt) 
{
  	if (element.contains && evt.toElement) 
	{
    	return !element.contains(evt.toElement);
  	}
  	else if (evt.relatedTarget) 
	{
    	return !containsDOM(element, evt.relatedTarget);
  	}
}

function sethomePage()
{	
	document.getElementById("home").style.behavior='url(#default#homepage)';
	document.getElementById("home").setHomePage('http://www.themarker.com');
}

/*function for performing actions when onmouseover or onmouseout on sections strips*/
/*	flag - 0 if the function has been called baceuse of onMouseOver, 1 - onMouseOut*
	sectionId - id of the td when the section is located
	sectionNum - the number of the section 1-12
*/
function onMouseOverSection(sectionId, sectionNum, flag)
{		
	var isFinance = false;
	var tempMin = sectionId - 1;
	var tempMax = sectionId + 1;
	var isInvestorGuide = false;

	if ( (layerSelected == sectionsLayers[sectionNum]) && (flag == 1))//display always the current section
		return;			

	if (sectionNum > 0){//if not the right section
		tempMin = tempMin - 1;			
		if ((flag == 0) || (tempMin == tempMaxSelectedSection))
			document.getElementById("section"+tempMin).innerHTML='';	
		else
			document.getElementById("section"+tempMin).innerHTML='<img src="/tmc/i/header/points.gif" border=0>';			
	}
		
	if (sectionNum < (sections.length-1)){//if not the left section
		tempMax = tempMax + 1;
		if ((flag == 0) || (tempMax == tempMinSelectedSection))
			document.getElementById("section"+tempMax).innerHTML='';			
		else
			document.getElementById("section"+tempMax).innerHTML='<img src="/tmc/i/header/points.gif" border=0>';			
	}

	if (layerSelected == sectionsLayers[sectionNum]){
		tempMinSelectedSection = tempMin;
		tempMaxSelectedSection = tempMax;
	}

	if (sections[sectionNum] == "Finance"){		
		if (flag == 1){//out			
			notDisplayFinanceMenu(sectionId, tempMin, tempMax);						
		}
		else{//in					
			if (isFinMenuVisible == false){				
				displayFinanceMenu("section"+tempMax);	
				painSectionSelected(sectionId, tempMin, tempMax, flag, true);				
			}				
		}
	}
	else if (sections[sectionNum] == "המדריך למשקיע")
	{		
		isInvestorGuide = true;
		painSectionSelected(sectionId, tempMin, tempMax, flag, isFinance,isInvestorGuide);	//sectionNum == 10 
	}
	else 
		painSectionSelected(sectionId, tempMin, tempMax, flag, isFinance);	
}
	
/*paint the section that mouse over it*/
function painSectionSelected(sectionId, tempMin, tempMax, isIn, isFinance, isInvestorGuide)
{
	var i;
	if (isIn == 0)	
		document.getElementById("sectionText" + sectionId).style.color='#ffffff';	
	else
	{
		if ( isInvestorGuide ) // section is investor guide - color it in green
			document.getElementById("sectionText" + sectionId).style.color='#D8DEFF';		
		else 
		{
			document.getElementById("sectionText" + sectionId).style.color='#D8DEFF';		
		}
			
	}
	for (i = tempMin; i <= tempMax; i++)
	{
		if ((isIn == 0) || (i == tempMaxSelectedSection) || (i == tempMinSelectedSection)){	
			if (isFinance == true)
				document.getElementById("section" + i).className='headerStripOverFinance';					
			else				
				document.getElementById("section" + i).className='headerStripOver';														
		}
		else
			document.getElementById("section" + i).className='headerStrip';			
	}
}

/*function for disappearing the finance menu*/
function notDisplayFinanceMenuBeforeDisplay()
{	
	isFinMenuVisible = false;
	if (document.all){ 		
		clearTimeout(zFin);			
		clearTimeout(yFin);	
		eval('financeMenu.style.clip = "rect(0px 101px 0px 0px)"');
	}	
}

/*function for displying the finance menu if is is not displayed yet*/
function displayFinanceMenu(sectionId){

	if (navigator.appVersion.indexOf("MSIE 5.5")==-1 && navigator.appVersion.indexOf("MSIE 6")==-1 )			
		return false;	

	notDisplayFinanceMenuBeforeDisplay();
	
	var pL = 0;
	var pT = 0;	
	var obj = document.getElementById(sectionId);
	
	if (document.all){
		while(obj.tagName != "BODY"){
			pL+=obj.offsetLeft;
			pT+=obj.offsetTop;
			obj=obj.offsetParent;
		}
			
		if (pT < 500)
			financeMenu.style.top = pT+24+"px"; 		
		else
			financeMenu.style.top = pT-24-96+"px";
			
		financeMenu.style.left = pL+"px";			
		financeMenu.style.display = "block";		

		downFin = 0;					
		isFinMenuVisible = true;
		displayFinanceMenuLine();					
	}

}

/*function for displying the finance menuline*/
function displayFinanceMenuLine(){
	
	if (document.all){				
		if (downFin <= parseInt(financeMenu.style.height)){
			eval('financeMenu.style.clip = "rect(0px 101px '+downFin+'px 0px)"');
			downFin+=17;
					
			zFin=setTimeout('displayFinanceMenuLine()',30);	
		}				
		else{
			financeMenu.style.display = "block";		
			clearTimeout(zFin);
			}
	}	
}

/*function for disappearing the finance menu*/
function notDisplayFinanceMenu(sectionId, tempMin, tempMax)
{	
	isFinMenuVisible = false;
	if (document.all){ 		
		clearTimeout(zFin);			
		notDisplayFinanceMenuLine(sectionId, tempMin, tempMax);					
	}  
}


/*function for not displying the finance line menu*/
function notDisplayFinanceMenuLine(sectionId, tempMin, tempMax){

	if (document.all){		
	
		var upp = financeMenu.style.clip.split(" ");
		var up = parseInt(upp[2]);
		
		if (up > 0){
			up = up-17;
			eval('financeMenu.style.clip = "rect(0px 101px '+ up +'px 0px)"');
			yFin=setTimeout('notDisplayFinanceMenuLine('+sectionId+','+tempMin+','+tempMax+')',30);
		}
		else{		
			clearTimeout(yFin);	
			financeMenu.style.display = "none";
			painSectionSelected(sectionId, tempMin, tempMax, 1, true);						
		}
	}	
}

/*function for changing a style when mouse is over a finance menu*/	
function financeMenuMouseOver(line, isOver)
{			
	if (isOver == 0){
		document.getElementById("finMenu"+line).className='financeMenuLineOver';	
		document.getElementById("finMenuText"+line).style.color='#A9F902';			
	}
	else{
		document.getElementById("finMenu"+line).className='financeMenuLine';	
		document.getElementById("finMenuText"+line).style.color='ffffff';	
	}
}	

/*check whether left both the finance menu and the finance section*/
function checkIfOutTabFinance(counter,evt)
{
	var res;
	var tag, tagid;
	var finTab = "sectiondiv"+(sections.length-1);
	
	if (sections[counter] == "Finance")
	{		
  		if (!evt) 
			evt = window.event;

		var current = evt['toElement'];
			
		do{
			tag = (current.nodeName) ? current.nodeName : '[unknown tag]';		
			tagid = (current.id) ? current.id : '[no id]';					
			current = current.parentNode;					
		}
		while ( ( (tag != "DIV") || (tagid != finTab) ) && 
				( (tag != "DIV") || (tagid != "financeMenu") ) &&
				(tag != "BODY") );

		res = (tag == 'BODY')?true:false;
		
		return res;
	}
	else
		return true;	
}

function showTheMarkerSections()
{
	var counter,i;//counters
	var temp;
	var sectSelected;
	var sectSelectedCounter = -1;
	var tempWidth,sectionsURLnew;
	
	for (counter = 0; counter < sections.length; counter++){		
		temp = counter * 3;
		temp = temp + counter - 1;		

		if (counter > 0){
			document.write('<td class=headerStrip align=center id=section'+temp+' style=width:2;>');
			document.write('<a id=sectionText'+temp+'><img src=/tmc/i/header/points.gif></a></td>');											
		}
		temp = temp + 1;
		
		if (layerSelected == sectionsLayers[counter]){		
				sectSelected = temp+1;
				sectSelectedCounter = counter;				
		}		
		document.write('<td>');
		document.write('<div id=sectiondiv'+counter+' onmouseover=\"if (checkMouseEnter(this, event)){onMouseOverSection('+(temp+1)+','+counter+',0);}\" onmouseout=\"if ((checkMouseLeave(this, event)) && (checkIfOutTabFinance('+counter+',event))){onMouseOverSection('+(temp+1)+','+counter+',1);}\">');
		document.write('<table cellspacing=0 cellpadding=0 border=0>');
		document.write('<tr>');
		sectionsURLnew = allLinks[counter];
		for (i= temp; i <= temp+2; i++){		
			if ((counter == 0) && (i == temp))//rightest
				tempWidth = 12;
			else if ( (counter == (sections.length-1)) && (i == (temp+2)) ) //leftest
				tempWidth = 14;
			else
				tempWidth = 10;
					
			if (i != (temp+1))
				document.write('<td class=headerStrip style=\"width:'+tempWidth+'px;\" id=section'+i+'></td>');			
			else{
				document.write('<td nowrap align=center class=headerStrip id=section'+i+'>');		
				// color the investor guide section in green.				
				if ( sections[counter] == "המדריך למשקיע")
					document.write('<a id=sectionText'+i+' class=headerStripText style="color:#d8deff;" target=\"_top\" href=\"'+sectionsURLnew+'\">');
				else
					document.write('<a id=sectionText'+i+' class=headerStripText target=\"_top\" href=\"'+sectionsURLnew+'\">');
				document.write(sections[counter]+'</a></td>');
			}			
		}			 
		document.write('</tr>');
		document.write('</table>');	
		document.write('</div>');
		document.write('</td>');
	}
	if (sectSelectedCounter != -1)
		onMouseOverSection(sectSelected,sectSelectedCounter,0);//paint the selected section
}

/*build the finance menu*/
function buildFinanceMenu()
{
	var i,financeMenuLinesURLnew;		
	for (i = 0; i < financeMenuLines.length; i++){		
		financeMenuLinesURLnew = allLinks5[i];
		document.write('<tr id=finMenu'+i+' class=financeMenuLine onmouseover=financeMenuMouseOver('+i+',0); onmouseout=financeMenuMouseOver('+i+',1);>');			
		document.write('<td style=\"width:6px; cursor:default;\"></td><td style=cursor:default;><a id=finMenuText'+i+' class=financeMenuLineText target=\"_top\" href=\"'+financeMenuLinesURLnew+'\">');
		document.write(financeMenuLines[i]);
		document.write('</a></td></tr>');
		if (i < (financeMenuLines.length-1))//if not the last line - add a line gif under it
			document.write('<tr><td colspan=2 class=separatingFinanceMenu></td></tr>');		
	}	
	
}

/*flag - 0 if the function has been called baceuse of onMouseOver, 1 - onMouseOut*/
function onMouseOverService(sectionNum, flag)
{		

	if (themarkerServices[sectionNum] == "NewsLetter"){			
		if (flag == 0){//onmouseover - display the newsletter menu
			if (isNewsletterMenuVisible == false)
				displayNewsletterMenu(sectionNum);										
		}
		else//onmouseout
			notDisplayNewsletterMenu();	
	}	
}

/*function for disappearing the newsletter menu*/
function notDisplayNewsletterMenuBeforeDisplay()
{	
	isNewsletterMenuVisible = false;
	if (document.all){ 		
		clearTimeout(zNews);			
		clearTimeout(yNews);	
		eval('newsletterMenu.style.clip = "rect(0px 84px 0px 0px)"');
	}	
}
	
/*function for dispalying the newsletter menu*/
function displayNewsletterMenu(sectionId){	
	
	if (navigator.appVersion.indexOf("MSIE 5.5")==-1 && navigator.appVersion.indexOf("MSIE 6")==-1 )			
		return false;	

	notDisplayNewsletterMenuBeforeDisplay();
	
	var pL = 0;
	var pT = 0;	
	var obj = document.getElementById("serv"+sectionId);
	
	if (document.all){
		while(obj.tagName != "BODY"){
			pL+=obj.offsetLeft;
			pT+=obj.offsetTop;
			obj=obj.offsetParent;
		}
			
		if (pT < 500)
			newsletterMenu.style.top = pT+15+"px"; 		
		else
			newsletterMenu.style.top = pT-15-96+"px";
			
		newsletterMenu.style.left = pL-10+"px";						
		
		newsletterMenu.style.display = "block";		
		downNews = 0;
				
		isNewsletterMenuVisible = true;
		displayNewsletterMenuLine();					
	}
}

/*function for displying the newsletter menuline*/
function displayNewsletterMenuLine(){
	
	if (document.all){				
		if (downNews <= parseInt(newsletterMenu.style.height)){
			eval('newsletterMenu.style.clip = "rect(0px 84px '+downNews+'px 0px)"');
			downNews+=17;
					
			zNews=setTimeout('displayNewsletterMenuLine()',30);	
		}				
		else{
			newsletterMenu.style.display = "block";		
			clearTimeout(zNews);
			}
	}	
}
	
/*function for dissapering the newsletter menu*/
function notDisplayNewsletterMenu()
{
	isNewsletterMenuVisible = false;
	if (document.all){ 		
		clearTimeout(zNews);			
		notDisplayNewsletterMenuLine();					
	} 
}
	
/*function for not displying the line of the newsletter menu*/
function notDisplayNewsletterMenuLine(){

	if (document.all){		
	
		upp = newsletterMenu.style.clip.split(" ");
		up = parseInt(upp[2]);
		
		if (up > 0){
			up = up-17;
			eval('newsletterMenu.style.clip = "rect(0px 84px '+ up +'px 0px)"');
			yNews=setTimeout('notDisplayNewsletterMenuLine()',30);
		}
		else{		
			clearTimeout(yNews);	
			newsletterMenu.style.display = "none";						
		}
	}	
}

/*check whether left both the newsletter menu and the newsletter section*/
function checkIfOutTabNewsletter(counter,evt)
{
	var res;
	var tag, tagid;
	var newsTab = "servicesdiv"+(themarkerServices.length-1);

	if (themarkerServices[counter] == "NewsLetter")
	{		
  		if (!evt) 
			evt = window.event;

		var current = evt['toElement'];
			
		do{
			tag = (current.nodeName) ? current.nodeName : '[unknown tag]';		
			tagid = (current.id) ? current.id : '[no id]';					
			current = current.parentNode;		
		}
		while ( ( (tag != "DIV") || (tagid != newsTab) ) && 
				( (tag != "DIV") || (tagid != "newsletterMenu") ) &&
				(tag != "BODY") );

		res = (tag == 'BODY')?true:false;
		
		return res;
	}
	else
		return true;	
}


/*function for openning the magazine link of services*/	
function openMagazineLink()
{
	window.open('/tmc/droplet/magazine/regMag.jhtml','', 'scrollbars=no,width=600,height=250,top=0,left=0');
}

/*function for dispalying themarker services*/
function showTheMarkerServices()
{
	var i,j,themarkerServicesURLnew;
	for (i = 0; i < themarkerServices.length; i++){	
		themarkerServicesURLnew = allLinkses[i];
		document.write('<td>');
		document.write('<div id=servicesdiv'+i+' onmouseover=\"if (checkMouseEnter(this, event)){onMouseOverService('+i+',0);}\" onmouseout=\"if ((checkMouseLeave(this, event)) && (checkIfOutTabNewsletter('+i+',event))){onMouseOverService('+i+',1);}\">');
		document.write('<table cellspacing=0 cellpadding=0 border=0>');
		document.write('<tr>');
		for (j = 0; j < 3; j++){		
			if (j != 1)
				document.write('<td class=servicesSpaces></td>');					
			else{
				document.write('<td id=serv'+i+' align=center>');
				if (i == 0)
					document.write('<a target=\"_blank\" class=headerTheMarkerServices href=\"'+themarkerServicesURLnew+'\">');
				else{
					if (themarkerServices[i] == "תיק אישי")
						document.write('<a target=\"_top\" class=headerTheMarkerServicesSpecial href=\"'+themarkerServicesURLnew+'\">');
					else if (themarkerServices[i] == "כל הבלוגים")
						document.write('<a target=\"_blank\" class=headerTheMarkerServices href=\"'+themarkerServicesURLnew+'\">');
					else
						document.write('<a target=\"_top\" class=headerTheMarkerServices href=\"'+themarkerServicesURLnew+'\">');
				}
				document.write(themarkerServices[i]+'</a></td>');										
			}
		}
		document.write('</tr>');
		document.write('</table>');
		document.write('</div>');
		document.write('<td class=headerTheMarkerServicesSeparateLine align=center>|</td>');																
	}	
}

/*function for dispalying themarker more links  - money, forex, english*/
function showMoreLinks()
{
	var i,j,moreLinksURLnew;
	for (i = 0; i < moreLinks.length; i++){			
		moreLinksURLnew = allLinks4[i];
		for (j = 0; j < 3; j++){		
			if (j != 1)
				document.write('<td><a class=servicesMore target=\"_top\" href=\"'+moreLinksURLnew+'\"></a></td>');		
			else
				document.write('<td align=center><a class=headerMore target=\"_top\" href=\"'+moreLinksURLnew+'\">'+moreLinks[i]+'</a></td>');
		}		
		if (i < moreLinks.length-1){
			document.write('<td class=headerTheMarkerServicesSeparateLine align=center>|</td>');																
		}
	}
}

/*function for chaning the style of the link where the mouse over it*/
function newsletterMenuMouseOver(line, isOver)
{		
	if (isOver == 0){
		document.getElementById("newsMenu"+line).className = 'newsletterMenuLineOver';	
		document.getElementById("newsMenuText"+line).style.color = '#ffffff';				
		document.getElementById("newsMenuText"+line).style.fontWeight = 'bold';				
	}
	else{
		document.getElementById("newsMenu"+line).className = 'newsletterMenuLine';			
		document.getElementById("newsMenuText"+line).style.color = '#081848';				
		document.getElementById("newsMenuText"+line).style.fontWeight = 'normal';				
	}			
}

/*function fro displaying a newsletter box*/
function buildNewsletterMenu()
{
	var i,newsletterMenuLinesURLnew;		
	for (i = 0; i < newsletterMenuLines.length; i++){				
		newsletterMenuLinesURLnew = linkName2;
		document.write('<tr id=newsMenu'+i+' class=newsletterMenuLine onmouseover=newsletterMenuMouseOver('+i+',0); onmouseout=newsletterMenuMouseOver('+i+',1);>');			
		document.write('<td style=\"width:6px;cursor:default;\"></td><td style=cursor:default;><a id=newsMenuText'+i+' class=newsletterMenuLineText target=\"_top\" href=\"'+newsletterMenuLinesURLnew+'\">');
		document.write(newsletterMenuLines[i]);
		document.write('</a></td></tr>');
		if (i < (newsletterMenuLines.length-1))//if not the last line - add a line gif under it
			document.write('<tr><td colspan=2 class=separatingNewsletterMenu></td></tr>');
	}	
}

/*functions for the seacrh field*/

/*write state for the search field - changes the background color to white*/
function writeState()
{	
	document.getElementById("search_text").style.background='#FFFFFF';	
}

/*focus on the search field*/
function focusOnSearch()
{	
	document.searchFund.val.focus();		
}

var currentSearchElement = "";//the current search element in the site
var selectedSearchType = 0;

/*change the style of the selected search type and the previous one*/
function changeSearchType(elm,type)
{	
	if (currentSearchElement != "")//if there is previous
		currentSearchElement.className = 'searchTitle';		
	else//otherwise - the first one was the previous
		document.getElementById("articleSearch").className = 'searchTitle';		
	
	elm.className = 'searchTitleSelected';
	currentSearchElement = elm;
	
	selectedSearchType = type;	
	focusOnSearch();//focus on a search field	
}

/*check the search form*/
function checkSearch()
{
	if (selectedSearchType == 0){
		if (document.searchFund.val.value.length < 3){
			alert("חיפוש בארכיון חייב להכיל לפחות 3 אותיות");
			document.searchFund.val.focus();	
			return false;
		}
		else{
			document.getElementById("namesymbol").value="article";
			document.getElementById("searchText").value=document.searchFund.val.value;
			document.searchFund.action = "/tmc/archive/arcArticleSearch.jhtml";
		}		
	}
	else if (selectedSearchType == 1)
	{
		if (document.searchFund.val.value.length < 1){
			alert("יש להזין מילה לחיפוש");
			document.searchFund.val.focus();	
			return false;
		}
		else{
			document.getElementById("namesymbol").value="name";
			a = document.searchFund.val.value;
			b = a.split("'");
			str = "";
			for(i=0; i < b.length; i++)
			{
				if ((b[i] != "") && (b[i] != null))
				{			
					str = str.concat(b[i]);			
				}		
			}
			document.searchFund.action='http://finance.themarker.com/f/quote/resultsQuote.jhtml';			
			document.searchFund.val.value = str;	
		}
	}
	else if (selectedSearchType == 2)
	{
		if (document.searchFund.val.value.length < 1){
			alert("יש להזין מילה לחיפוש");
			document.searchFund.val.focus();	
			return false;
		}
		else{
			document.searchFund.action = "http://themarker.walla.co.il/";		
			document.searchFund.q.value = document.searchFund.val.value;			
		}
	}	
	else if (selectedSearchType == 3)
	{
		if (document.searchFund.val.value.length < 1){
			alert("יש להזין מילה לחיפוש");
			document.searchFund.val.focus();	
			return false;
		}
		else{
			var spacePlace,spacePlace2,temp;
			document.searchFund.action = "http://www.anashim.biz/theSearch_themarker.asp";
			document.searchFund.target = "_blank";
			spacePlace = document.searchFund.val.value.indexOf(" ",0);
			if (spacePlace == -1){//just one word
				document.searchFund.firstname.value = document.searchFund.val.value;
				document.searchFund.lastname.value = "";
			}
			else{
				document.searchFund.firstname.value = document.searchFund.val.value.substring(0,spacePlace);
				temp = document.searchFund.val.value.substring(spacePlace+1);
				spacePlace2 = temp.indexOf(" ",0);
				if (spacePlace2 == -1)//just one word	
					document.searchFund.lastname.value = temp;
				else
					document.searchFund.lastname.value = temp.substring(0,spacePlace2);
			}
					
		}
	}	
	else if (selectedSearchType == 4)
	{	
		var searchItem;
		searchItem=document.searchFund.val.value;
		if (document.searchFund.val.value.length < 1){
			alert("יש להזין מילה לחיפוש");
			document.searchFund.val.focus();	
			return false;
		}
		else{
			document.searchFund.action = "http://www.d.co.il/?arena=Business&callback=Form_Find&formGroup=main&language=HEB&page=Summaries&queryHeading="+encodeHebrewString(searchItem)+"&ref=themarker";		
			document.searchFund.target = "_blank";
			document.searchFund.q.value = document.searchFund.val.value;			
		}
	}
}

function submitForm()
{	
	if (window.event && window.event.keyCode == 13){				
		checkSearch();
		document.searchFund.submit();		
		return false;
	}
	else
		return true;
}
