/*





function readCookie(cname) {

  var num = document.cookie.length;
  var name = cname + "=";
  var len = name.length;
  var x = 0;
  while (x <= num) {
    var y = (x + len);
    if (document.cookie.substring(x,y) == name) {
      var yy = document.cookie.indexOf(";",y); 
      if (yy == -1) yy=document.cookie.length;
      return unescape(document.cookie.substring(y,yy));
    }
    x = document.cookie.indexOf(" ",x) + 1;
    if (x == 0) break;
  }
  return null;
} 

function sendTempCookie(name,value) {
//  document.cookie = name + "=" + value;
  document.cookie = name + "=" + value + "; path=/; domain=.artplus.hr";
}

var newWindow
/******************************************
function pop()
 {
  if (readCookie('popOK')==null) {
    var newWindow = window.open('../goodies/popup.htm','pop','Width=240,Height=200,toolbar=0,menubar=0,scrollbars=0,status=0,resizable=0,location=0,directories=0'); 
   newWindow.focus();
   sendTempCookie('popOK','1'); 
   }
 }
******************************************/
/******************************************
* ORIGINAL Script DHTML Ad Box By Matt Gabbert
* at http://www.nolag.com modified by ART PLUS
* START
******************************************/




//ovo izbaciti
/*






var cook 
cook = readCookie('popOK');

var lang
var lang =navigator.language? navigator.language : navigator.userLanguage

var ad ='off';


if ((lang =="hr")) {
adTime=10;
document.write('<div id="oglasDiv" style="visibility:hidden" align="center"><table width="460px" height="260px" bgcolor="#009900"><tr><td><table width="455px" height="255px" bgcolor="#ffffff"><tr><td align="center" valign="middle"><table bgcolor="#ffcc66" width="100%" height="100%" cellpadding="0" cellspacing="0"><tr><td align="center">');
document.write('<font face="Arial CE,Arial,Helvetica,sans-serif" size="5" color="#cc0000">');
document.write('Art Plusove hrvatske stranice<br>nalaze se na: ');
document.write('<a href="http://www.artplus.com.hr" target="_blank">www.artplus.com.hr</font></a>');
document.write('<p class="h2link"><a href="javascript:closeAd()">Kliknite OVDJE da zatvorite<br> obavijest i ostanete na Art Plusovim<br>engleskim web stranicama.</a></p>');
document.write('</td></tr></table></td></tr></table></td></tr></table></div>');
}
else {
if ((ad =='on')) {
adTime=0;
document.write('<div id="oglasDiv" style="visibility:hidden" align="center"><table width="460px" height="260px" bgcolor="#009900"><tr><td><table width="455px" height="255px" bgcolor="#ffffff"><tr><td align="center" valign="middle"><table bgcolor="#ffcc66" width="100%" height="100%" cellpadding="0" cellspacing="20"><tr><td align="center">');
document.write('<font face="Arial CE,Arial,Helvetica,sans-serif" size="5" color="#cc0000">');
document.write('Can\'t afford to buy our software?</font>');
document.write('<div class="h2link"><a href="http://www.artplus.hr/adapps/eng/gift.htm" target="_self"><img src="http://www.artplus.hr/adapps/thn/snowman.gif" width="120" height="120" vspace="5" alt="" border="0"><br>Click here and ask for a holiday present!</a></div>');
document.write('<p class="h2link"><a href="javascript:closeAd()">CLOSE THIS MESSAGE</a></p>');
document.write('</td></tr></table></td></tr></table></td></tr></table></div>');
}
else {
adTime=0;
document.write('<div id="oglasDiv" style="visibility:hidden" align="center"></div>');
}
}


if (((lang =="hr") || (ad =='on')) && (cook !='1')) {

sendTempCookie('popOK','1');

//adTime=10;  // seconds ad reminder is shown
chanceAd=1; // ad will be shown 1 in X times (put 1 for everytime)

var ns=(document.layers);
var ie=(document.all);
var w3=(document.getElementById && !ie);
var calunit=ns? "" : "px"
adCount=0;


function initAd(){
	if(!ns && !ie && !w3) return;
	if(ie)		adDiv=eval('document.all.oglasDiv.style');
	else if(ns)	adDiv=eval('document.layers["oglasDiv"]');
	else if(w3)	adDiv=eval('document.getElementById("oglasDiv").style');
	randAd=Math.ceil(Math.random()*chanceAd);
        if (ie||w3)
        adDiv.visibility="visible";
        else
        adDiv.visibility ="show";
	if(randAd==1) showAd();
}

function showAd(){
if(adCount<adTime*10){adCount+=1;
	if (ie){documentWidth  =truebody().offsetWidth/2+truebody().scrollLeft-41;
	documentHeight =truebody().offsetHeight/2+truebody().scrollTop+70;}	
	else if (ns){documentWidth=window.innerWidth/2+window.pageXOffset-41;
	documentHeight=window.innerHeight/2+window.pageYOffset+70;} 
	else if (w3){documentWidth=self.innerWidth/2+window.pageXOffset-20;
	documentHeight=self.innerHeight/2+window.pageYOffset-20;} 
	adDiv.left=documentWidth-200+calunit;adDiv.top =documentHeight-200+calunit;
	setTimeout("showAd()",100);}else closeAd();
}
function closeAd(){
if (ie||w3)
adDiv.display="none";
else
adDiv.visibility ="hide";
}

function truebody(){
return (document.compatMode!="BackCompat")? document.documentElement : document.body
}

}


// document.onload=pop;
// window.onload=pop; 
onload=initAd;

/******************************************
* ORIGINAL Script DHTML Ad Box By Matt Gabbert
* at http://www.nolag.com modified by ART PLUS
* END
******************************************/


//ovo izbaciti
