<!--
// params
var nth=1; 
var perc = Math.round((1/nth)*1000);
var rnd = Math.round(Math.random()*1000);
var expdate=new Date(); expdate.setTime(expdate.getTime()+(24*60*60*1000*90));
var showAfter=0; // show after X times (user choice) if the ratio is 100% (else deppends on the ratio)
var cookieName="socratos_245";
var dhtmlLocation = "http://ivoxua.socratos.net/data/js/socratos_dhtml_30235.php";

// local params
var cookieval=0;
cookieval = GetCookie(cookieName);
var cookieShowed = false; // was the recruitment pane showed?

if(cookieval != 1) {
	SetCookie(cookieName,'1',expdate,"/",null,false);
	SetCookie(cookieName+"_pages_showed",'1',expdate,"/",null,false); // we are creating the cookie so its first access => 1
	SetCookie(cookieName+"_showed",'0',expdate,"/",null,false); // did we show the recruitment pane until now?
	cookieval = GetCookie(cookieName);
	if(cookieval == 1 && showAfter <= 1 && rnd <= perc) {	
		SetCookie(cookieName+"_showed",'1',expdate,"/",null,false); // recruitment pane showed
		document.write('<script type="text/javascript" src="'+dhtmlLocation+'"></script>');
	}
}

// cookie exists, page was visited before in the "expdate" days time interval
if(cookieval == 1) {
	cookiePagesShowed = GetCookie(cookieName+"_pages_showed");
	cookieShowed = GetCookie(cookieName+"_showed");
	if(showAfter == cookiePagesShowed && cookieShowed == "0" && rnd <= perc) {
		SetCookie(cookieName+"_showed",'1',expdate,"/",null,false); // recruitment pane showed
		document.write('<script type="text/javascript" src="'+dhtmlLocation+'"></script>');
	}
	
	cookiePagesShowed = Number(cookiePagesShowed) + 1;
	SetCookie(cookieName+"_pages_showed",cookiePagesShowed,expdate,"/",null,false); // recruitment pane showed
}

function GetCookie(name)
{
	var arg=name+"=";
	var alen=arg.length;
	var clen=document.cookie.length;
	var i=0;
	while(i<clen)
	{
		var j=i+alen;
		if(document.cookie.substring(i,j)==arg) return getCookieVal(j);
		i=document.cookie.indexOf(" ",i)+1;
		if(i==0)break;
	}
	return null;
}

function getCookieVal(offset)
{
	var endstr=document.cookie.indexOf(";",offset);
	if(endstr==-1)endstr=document.cookie.length;
	return unescape(document.cookie.substring(offset,endstr));
}
function SetCookie(name, value, expires, path, domain, secure, showAfter)
{
	document.cookie=name+"="+escape(value)+((expires==null)?"":("; expires="+expires.toGMTString()))+((path==null)?"":("; path="+path))+((domain==null)?"":("; domain="+domain))+((secure==true)?"; secure":"");
}

// -->