
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_changeProp(objName,x,theProp,theValue) { //v6.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
    if (theValue == true || theValue == false)
      eval("obj."+theProp+"="+theValue);
    else eval("obj."+theProp+"='"+theValue+"'");
  }
}

function closeAll() {
         MM_changeProp('mkremik','','style.display','none','DIV')
         MM_changeProp('mtribunj','','style.display','none','DIV')
         MM_changeProp('mfuzfo','','style.display','none','DIV')
         MM_changeProp('myachting','','style.display','none','DIV')
         MM_changeProp('mcharter','','style.display','none','DIV')
}

function openID (ime) {
	closeAll();
         MM_changeProp(ime,'','style.display','block','DIV')
}


// override Highslide settings
hs.align = 'center';
hs.transitions = ['expand', 'crossfade'];
hs.outlineType = 'rounded-white';
hs.fadeInOut = true;
//hs.dimmingOpacity = 0.75;
// Add the controlbar
hs.addSlideshow({
    //slideshowGroup: 'group1',
    interval: 5000,
    repeat: false,
    useControls: true,
    fixedControls: 'fit',
    overlayOptions: {
       opacity: .70,
       position: 'bottom center',
       hideOnMouseOut: true
    }
});

function getCookie(c_name) {
if (document.cookie.length>0) {
  c_start=document.cookie.indexOf(c_name + "=");
  if (c_start!=-1) {
	c_start=c_start + c_name.length+1;
	c_end=document.cookie.indexOf(";",c_start);
	if (c_end==-1) c_end=document.cookie.length;
		return unescape(document.cookie.substring(c_start,c_end));
	}
  }
return "";
}

function setCookie(c_name,value,expiredays) {
	var exdate=new Date();
	exdate.setDate(exdate.getDate()+expiredays);
	document.cookie=c_name+ "=" +escape(value)+ ";path=/"+
	((expiredays==null) ? "" : ";expires="+exdate.toUTCString());
}

function Cestitaj(){
	//var t=setTimeout("Prikazi()",1000);
}

function Prikazi() {
	cestitka=getCookie('cestitka');
	if (cestitka!=null && cestitka!="") {
	} else {
	hs.expand(null, { objectWidth: 600, objectHeight: 600, src: 'http://www.adriatiq.com/img/easter2011.jpg'} )
	setCookie('cestitka', 'prosla', 2); // koliko dana da traje
	}
}

