var expires = new Date();
expires.setTime(expires.getTime() + (365 * 24 * 60 * 60 * 1000 * 365));

var strArchaA = "raadvgc"
var strArchaB = "irisnet"
var strArchaC = "be"
var strSpiculum = String.fromCharCode(46);
var strArobase = String.fromCharCode(64);
var strAgere = String.fromCharCode(109) + String.fromCharCode(97) + String.fromCharCode(105) + String.fromCharCode(108) + String.fromCharCode(116) + String.fromCharCode(111);

//alert(document.styleSheets[0].href);
//alert(document.styleSheets[1].href);
//alert(get_cookie("Stylecookie"));

/*
var nStyle;
nStyle = get_cookie("Stylecookie");

if(nStyle==null)
	nStyle = "1"
	
document.styleSheets[0].href = "/styles/deraad" + nStyle +".css"
document.styleSheets[1].href = "/styles/pop_style" + nStyle +".css"
*/

//alert("Styles geladen: " + document.styleSheets[0].href + " "  + document.styleSheets[1].href );

function get_cookie ( cookie_name )
{
  var results = document.cookie.match ( '(^|;) ?' + cookie_name + '=([^;]*)(;|$)' );

  if ( results )
    return ( unescape ( results[2] ) );
  else
    return null;
}

function LoadStyle(nStyle){
	document.styleSheets[0].href = "/styles/deraad" + nStyle +".css"
	document.styleSheets[1].href = "/styles/pop_style" + nStyle +".css"
	//alert(document.styleSheets[0].href + " "  + document.styleSheets[1].href );

	var d;
	d = "Fri 16 nov 2012 12:50:23"
	//alert("Stylecookie=" + nStyle + ";expires=" + d);
	document.cookie = "Stylecookie=" + nStyle + ";expires=" + d;
}

function epistula(strLocus){
	//alert(strAgere + ":" + strLocus + strArobase + strArchaA + strSpiculum + strArchaB + strSpiculum + strArchaC);
	document.location = strAgere + ":" + strLocus + strArobase + strArchaA + strSpiculum + strArchaB + strSpiculum + strArchaC;
}

function setActiveFontSize_1(n){
	SetCookie("DeRaadFont",n,expires,"/");
	var objDiv = document.getElementById("container")
	objDiv.style.fontSize = n + "em"
	var objDiv = document.getElementById("menu")
	objDiv.style.fontSize = n + "em"
}

function GetCookie(name) {
	var start = document.cookie.indexOf(name+"=");
	var len = start+name.length+1;
	if ((!start) && (name != document.cookie.substring(0,name.length))) return null;
	if (start == -1) return null;
	var end = document.cookie.indexOf(";",len);
	if (end == -1) end = document.cookie.length;
	return unescape(document.cookie.substring(len,end));
}

function SetCookie(name,value,expires,path,domain,secure) {
	document.cookie = name + "=" +escape(value) +
		( (expires) ? ";expires=" + expires.toGMTString() : "") +
		( (path) ? ";path=" + path : "") + 
		( (domain) ? ";domain=" + domain : "") +
		( (secure) ? ";secure" : "");
}

function CheckIsIE() 
{ 
	if (navigator.appName.toUpperCase() == 'MICROSOFT INTERNET EXPLORER') {
		return true;
	} 
	else {
		return false;
	} 
} 

function PrintThisPage() 
{ 
	if (CheckIsIE() == true){ 
		document.ifWorkspace.focus(); 
		//document.ifWorkspace.print(); 
		window.frames.ifWorkspace.location.print();
	} 
	else{ 
		window.frames['ifWorkspace'].focus(); 
		window.frames['ifWorkspace'].print(); 
	} 
} 

function ShowInfo(obj, visibility) {
	if(document.getElementById){
		divs = document.getElementsByTagName("div");
		divs[obj].style.visibility = visibility;
	}
}