// Written by Dominik Winkler 2009

function pruefe() 
{      
   if((window.document.lang_redirect_form.url[0].checked == false) && (window.document.lang_redirect_form.url[1].checked == false)) 
   { 
      alert("Please select a domain to get redirected!"); 
      return false; 
   }
   else
   {
	   //alert(window.document.lang_redirect_form.url.value);
	   return true;
   }
}

function repos_popup()
{
	var lang_box = document.getElementById('lang_box');
	var width = window.innerWidth || (window.document.documentElement.clientWidth || window.document.body.clientWidth);
	var height = window.innerHeight || (window.document.documentElement.clientHeight || window.document.body.clientHeight);
	
	if(lang_box)
	{
		var lang_box_width = lang_box.style.width;
		
		lang_box.style.left = (width/2) - (parseInt(lang_box_width)/2) + "px";
		lang_box.style.top = (height/2-150) + "px";
	}
}

window.onload = repos_popup;
window.onresize = repos_popup;

function show(id)
{
    document.getElementById(id).style.display = "block";    
} 

function hide(id)
{
    document.getElementById(id).style.display = "none";
} 

function showHide(id)
{
	if (document.getElementById(id).style.display == "none")
	{ 
		document.getElementById(id).style.display = "block";
	
	} 
	else 
	{ 
		document.getElementById(id).style.display = "none";
	} 
}     

function dont_ask_again()
{
	//if (document.cookie)
		//alert(document.cookie);
	
	My_SetCookie("langdnaa", "www.pjur.com", 30);
}


function My_SetCookie(name,value,days)
{
	now=new Date();
	del_time=new Date(now.getTime()+days*86400000);
	document.cookie=name+"="+value+";expires="+del_time.toGMTString()+";";
}