var d = document;

function smapShow() {
	if (d.getElementById('smap_area') && d.getElementById('smap_ico')) { 
		d.getElementById('smap_area').style.display = d.getElementById('smap_ico').className== 'smap' ? 'block' : 'none';
		if (d.getElementById('smap_ico').className== 'smap') {
			smapInit();
		}
		d.getElementById('smap_ico').className = d.getElementById('smap_ico').className== 'smap' ? 'smap selected' : 'smap';
	}
}
function smapInit() {
	if (d.getElementById('smap_bg') && d.getElementById('smap_cont')) { 
		var iH = d.getElementById('smap_cont').offsetHeight;
		//alert(iH);
		d.getElementById('smap_bg').style.height = iH+'px';
		d.getElementById('smap_cont').style.marginTop = '-'+iH+'px';
	}
}

var modMessages = new Array();

function modMessagesShow() {
	for (i=0; modMessages[i]; i++) {
		alert(modMessages[i]);
	}
}

function GetClock(){
d = new Date();
nhour  = d.getHours();
nmin   = d.getMinutes();
if(nmin <= 9){nmin="0"+nmin}
document.getElementById('clockbox').innerHTML=""+nhour+" : "+nmin+"";
setTimeout("GetClock()", 1000);
}

function olHandler() {
	GetClock();
	modMessagesShow();
}

/*window.onload = olHandler;*/


	function zoom_(imgSrc) {
		var img = window.open('','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,height=100,width=200');
		if (navigator.userAgent.indexOf("Opera") == -1) {
			img.document.writeln('<html><body bgcolor="#FFFFFF" style="padding: 0px; margin: 0px; border: 0px;"><div id="text" style="width: 100%; height: 100%; text-align: center; padding-top: 40px; font-family: tahoma; font-size: 12px;">+а_рузка изRбраж_-ия...</div><div id="image" style="display: none;"><img src="' + imgSrc + '" alt="" onload="document.getElementById(\'text\').style.display = \'none\'; document.getElementById(\'image\').style.display = \'block\'; window.resizeTo(this.width+6, this.height+25)" /></div></body></html>');
		} else {
			img.document.writeln('<html><body bgcolor="#FFFFFF" style="padding: 0px; margin: 0px; border: 0px;"><div id="image" style="display: block;"><img src="' + imgSrc + '" alt="" onload="window.resizeTo(this.width+6, this.height+43)" /></div></body></html>');
		}
	}
