function getObj(id){ if (bw.ie4) return document.all[id]; else return document.getElementById(id) }
function getInnHtml(id){ return getObj(id).innerHTML; if(bw.op) return getObj(id).innerText }
function showLayer(id){	getObj(id).style.visibility = "visible" }
function hideLayer(id){	getObj(id).style.visibility = "hidden" }
function displayOn(id){	getObj(id).style.display = "block" }
function displayOff(id){ getObj(id).style.display = "none" }

function add2Fav(lang){ var url='http://www.imobiro.hr';	
	if (lang=='hr') var tabName='Imobiro nekretnine - Mali Lošinj';
	else if (lang=='it') var tabName='Imobiro agenzia imobilliare - Lussin Piccolo, Croazia';
	else if (lang=='de') var tabName='Immobilienmaklerbüro Imobiro - Mali Losinj, Kroatien';	
	else if (lang=='en') var tabName='Imobiro Real Estate, Mali Losinj, Croatia';	
	if (bw.ie) window.external.AddFavorite(url,tabName);
	else if (bw.ns6 && (typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function"))  window.sidebar.addPanel (tabName,url,'')
}
function MM_preloadImages() { //Macromedia v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} }
function MM_swapImage() { var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3); if ((x=getObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} }
function MM_swapImgRestore() { var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc }
function printPage(){	
	document.printThis.docTitle.value=document.title;
	document.printThis.docCont.value=getObj('mainCon').innerHTML;
	MM_openBrWindow('','printPg','menubar=yes,scrollbars=yes,resizable=yes','580','500','false');
	document.printThis.submit();
}
function MM_openBrWindow(theURL,winName,features, myWidth, myHeight, isCenter) { //v3.0
  if(window.screen)if(isCenter)if(isCenter=="true"){
    var myLeft = (screen.width-myWidth)/2;
    var myTop = (screen.height-myHeight)/2;
    features+=(features!='')?',':'';
    features+=',left='+myLeft+',top='+myTop;
  }
  window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}
function flevDivPositionValue(sDiv, sProperty) {
    var sValue = ""; docObj = eval("getObj('" + sDiv + "')"); if (docObj == null) {return 0;}
	if ((sProperty == "left") || (sProperty == "top")) { docObj = docObj.style; sValue = eval("docObj." + sProperty);
		if ((bw.ie) && (sValue == "")) { if (sProperty == "top") { sValue = eval(sDiv + ".offsetTop"); } 
			else { sValue = eval(sDiv + ".offsetLeft"); } }
	} else { if (bw.op) { docObj = docObj.style;
			if (sProperty == "height") { sValue = docObj.pixelHeight; } 
			else if (sProperty == "width") { sValue = docObj.pixelWidth; } 
		} else if (bw.ns6) {sValue = document.defaultView.getComputedStyle(docObj, "").getPropertyValue(sProperty); } 
	    else if (bw.ie) { if (sProperty == "width") { sValue = eval(sDiv + ".offsetWidth"); } 
			else if (sProperty == "height") { sValue = eval(sDiv + ".offsetHeight"); } }
   	} sValue = (sValue == "") ? 0 : sValue;  if (isNaN(sValue)) { if (sValue.indexOf('px') > 0) { sValue = sValue.substring(0,sValue.indexOf('px')); } } 
	return parseInt(sValue);  }
function flevMoveDiv(sDivID, sLeft, sTop){
	var docObj = eval("getObj('" + sDivID + "')"), sSuffix=""; docObj = docObj.style; if(bw.ie&&!bw.op) {sSuffix="px";}
	if (sLeft != "") {eval("docObj.left = '" + sLeft + sSuffix + "'");} if (sTop != "") {eval("docObj.top = '" + sTop + sSuffix + "'");} }
function flevAutoScrollDivs() {
	var iArgs = flevAutoScrollDivs.arguments.length; var docObj = getObj('newsRoll'); if (!docObj) {return;}
	if (docObj.scrollTimeout != null) {clearTimeout(docObj.scrollTimeout);}; var sContainerDivID = 'newsRoll'; var sContentDivID = 'newsRollCon';
	var iStartScrolling = (iArgs > 0) ? parseInt(flevAutoScrollDivs.arguments[0]) : 1; var iPixels = (iArgs > 1) ? parseInt(flevAutoScrollDivs.arguments[1]) : 1;   
	var iDelay = (iArgs > 2) ? parseInt(flevAutoScrollDivs.arguments[2]) : 50; var iCurrentTop = flevDivPositionValue(sContentDivID, 'top');   
	var iScrollTop = (-1 * flevDivPositionValue(sContentDivID, 'height')); var iScrollBottom = flevDivPositionValue(sContainerDivID, 'height');   
	var iCurrentLeft = flevDivPositionValue(sContentDivID, 'left');  
	if (iStartScrolling) { if (iCurrentTop >= iScrollTop) {flevMoveDiv(sContentDivID, String(iCurrentLeft), String(iCurrentTop-iPixels));}
	else {flevMoveDiv(sContentDivID, String(iCurrentLeft), String(iScrollBottom));}
	docObj.scrollTimeout = setTimeout("flevAutoScrollDivs(" + iStartScrolling + "," + iPixels + "," + iDelay + ")", iDelay);}   
}