	
function Open_S2F(Url,MenuID,PRMenuID,ID)
{
	window.open(Url+'?MenuID='+ MenuID+'&PRMenuID='+PRMenuID+'&ID='+ID,'form','location=no,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,WIDTH=400,HEIGHT=300')
}


function winOpen(Url,ID)
{
	window.open(Url+'?ID='+ID ,'Lexicon','location=no,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,WIDTH=500,HEIGHT=500')
}

function winOpenGallery(Url,ID,LangCode)
{
	window.open(Url+'?ID='+ ID + '&Lang=' + LangCode,'Lexicon','location=no,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,WIDTH=530,HEIGHT=500')
}

function winOpenGallery1(Url,ID)
{
	window.open(Url+'?ID='+ ID, 'Lexicon', 'location=no,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,WIDTH=520,HEIGHT=450')
}


				
	function change(id, newClass) {
	
		identity=document.getElementById('td_' + id);
		identity.className=newClass + 'TD';
		
		identity=document.getElementById('alink_' + id);
		identity.className=newClass;
		
		}
		
		function SwitchMenu(obj)
		{
			//alert(obj);
		//try{
			var newClass;
			//if (document.all('sub_' + obj).style.display == 'none')
			if (document.getElementById('sub_' + obj).style.display == 'none')
				{
				//alert('true');
				document.getElementById('sub_' + obj).style.display = '';
				identity=document.getElementById('img_' + obj);
				identity.src = '/imgs/signRed.png';
				
				/*identity=document.getElementById('maintd_' + obj);	
				identity.style.borderBottom='1px dotted #ffffff';*/
				//alert(identity.style);
				
				}
			else
				{
				//alert('false');
				document.getElementById('sub_' + obj).style.display = 'none';
				//document.all('img_' + obj).src = '/imgs/arrow_down.gif';
				//document.all('img_' + obj).alt = '1';
				identity=document.getElementById('img_' + obj);
				identity.src = '/imgs/signGreen.png';
				
				/*identity=document.getElementById('maintd_' + obj);	
				identity.style.borderBottom='1px dotted #bfbfbd';*/
				
				}
				
				
				
			//}
		//catch(e){}
		}
		
function SwitchMenuByOne(obj)
	{
	try{
		
		if (document.getElementById('sub_' + obj).style.display == 'none')
			{
			//alert('true');
			document.getElementById('sub_' + obj).style.display = '';
			//document.getElementById('img_' + obj).src = 'img/SearchItemArrowOpen.jpg';
			//close obj by cookie
			openSub=getCookie('openSub');
			if(openSub!=obj)
				{
				if (openSub!=null && openSub!="")
					  {
					    //alert('history open '+openSub+'!');
					    document.getElementById('sub_' + openSub).style.display = 'none';
				    	//document.getElementById('img_' + openSub).src = 'img/SearchItemArrow.jpg';
					  }
				}
			//set new cookie
			setCookie('openSub',obj,1);
			}
		else
			{
			//alert('false');
			document.getElementById('sub_' + obj).style.display = 'none';
			//document.getElementById('img_' + obj).src = 'img/SearchItemArrow.jpg';
			//document.all('img_' + obj).alt = '1';
			setCookie('openSub','',0);
			}
		}
	catch(e){}
	}
	
	function getCookie(c_name)
	{
	if (document.cookie.length>0)
	  {
	  c_start=document.cookie.indexOf(c_name + "=");
	  if (c_start!=-1)
	    { 
	    c_start=c_start + c_name.length+1 ;
	    c_end=document.cookie.indexOf(";",c_start);
	    if (c_end==-1) c_end=document.cookie.length
	    return unescape(document.cookie.substring(c_start,c_end));
	    } 
	  }
	return ""
	}

function setCookie(c_name,value,expiredays)
	{
	var exdate=new Date();
	exdate.setDate(exdate.getDate()+expiredays);
	document.cookie=c_name+ "=" +escape(value)+((expiredays==null) ? "" : "; expires="+exdate.toGMTString());
	}
	
	
	function SwitchMenuSG(obj)
	{
	try{
		
		if (document.all('sub_' + obj).style.display == 'none')
			{
			//alert('true');
			document.all('sub_' + obj).style.display = '';
			document.all('close_' + obj).style.display = '';
			document.all('note_' + obj).style.display = 'none';
			}
		else
			{
			//alert('false');
			document.all('sub_' + obj).style.display = 'none';
			document.all('close_' + obj).style.display = 'none';
			document.all('note_' + obj).style.display = '';
			}
		}
	catch(e){}
	}




