var ie6 = document.compatMode && document.all?1:0;
var ie55 = window.createPopup?1:0;
var ie5 = window.attachEvent?1:0;

var GetElementId = Class.create();
GetElementId.prototype = {
		initialize: function() {
			window.document.onclick = this.onMouseClick.bindAsEventListener(this);
	},
	onMouseClick:function(evt){
		if($("indicator1").style.display == "block"){
			new Effect.Opacity("indicator1", {duration:0.5, from:1.0, to:0.0,afterFinish:function(obj){$("indicator1").style.display = "none";}});
		}
		switch(evt.id){
			default:
			break;
		} 
	}
}
function mySuggHide(){
	
	upd = new GetElementId();
}
function showPage(){
	
//	Element.hide("preloader");
}
Event.observe(window,'load',mySuggHide,false);
Event.observe(window,'load',showPage,false);

function showBlock(pref,nr,count,css){
		
		$(pref+""+nr).style.display = "";
		$("imgl"+pref+""+nr).src = "image/"+css+"/tableft.gif";
		$("imgr"+pref+""+nr).src = "image/"+css+"/tabright.gif";
		$("imgm"+pref+""+nr).className = "tabmiddle"+css;
		$("link"+pref+""+nr).className = "boxlinkActive";
		for(i=1;i<=count;i++){
			
			if(i != nr ){
				$(pref+""+i).style.display = "none";
				$("imgl"+pref+""+i).src = "image/Default/tableft.gif";
				$("imgr"+pref+""+i).src = "image/Default/tabright.gif";
				$("imgm"+pref+""+i).className = "";
				$("link"+pref+""+i).className = "boxlink";
			}
		}
		
	}

	function setLyr(obj,lyr)
{
	var coors = findPos(obj);
	var x = $(lyr);
	x.style.top = coors[1] + 20 + 'px';
	x.style.left = coors[0]  + 'px';
}

function findPos(obj)
{
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
		}
	}
	
	return [curleft,curtop];
}
