﻿	////////////////////////////////////
	//save the user lang to cookie
	function saveUserLang(obj)
	{ 
		//for(x in obj){
		//    dbgL(x + "=" + obj[x])
		//}
		document.cookie= "siteLang=" +escape(obj.value)+ "; expires=Fri, 25 Dec 2020 23:59:59 GMT; path=/";
		window.location.reload();
	} 

	function init()
	{
	//	document.getElementById('tbl_video18').rows[0].scrollIntoView();
	}

	
	/////////////////////////////////////////////////////////////////////////////////////////
	// for firefox
	/////////////////////////////////////////////////////////////////////////////////////////
	function checkFocus(){ 
		if (window.navigator.appVersion.indexOf("MSIE")==-1) 
			{ 
			if (modalWin!=null && modalWin!="" && !modalWin.closed) 
			{ 
				self.blur(); 
				modalWin.focus(); 
			} 
		} 
	} 
	
	function email2friend(url){
		//alert(document.body.scrollTop)
		try{
			//document.getElementById('email2friend_container').style.display='inline';
			document.getElementById('email2friend_div').style.display='inline';
			document.getElementById('email2friend_div').style.top=Number(document.body.scrollTop + 100);
			document.getElementById('email2friend_iframe').src=url;
		}
		catch(e){
			alert('There is problem.\n\nDescription:\n' + e.description);
		}
		//return false;
	}
	
	function open_reproductionRightsDiv(){
		try{
			document.getElementById('reproductionRightsDiv').style.display='inline';
			document.getElementById('reproductionRightsDiv').style.top=Number(document.body.scrollTop + 110);
		}
		catch(e){
			alert('There is problem.\n\nDescription:\n' + e.description);
		}
	}	
	
	//toggle the visibility of tds - when the tabs are clicked
	var last_tab = "";
	function toggleTab(objId)
	{
		try {
			// last tab shown, we change its properties to normal & hidden
			if (!isnull(last_tab)) {
				document.getElementById(last_tab).style.display = "none";
				//	document.getElementById("TD_" +last_tab).className="tabs_normal";
			}
			// new tab
			var tabName=objId;//objId.replace(/TD_/i,"");
			document.getElementById(tabName).style.display = "inline";
			//document.getElementById("TD_"+tabName).className="tabs_selected grad";

			last_tab = tabName;
		}
		catch (e) { alert('DHTML Tabbing error: ' + e.description); }
	}
	
	//change the visibility of obj
	function toggleDiv(objID){
		if(document.getElementById(objID).style.display=="none"){
			document.getElementById(objID).style.display=""
		}
		else{
			document.getElementById(objID).style.display="none"
		}
	}
	

