function free(){
	alert(document.getElementById('clear').offsetHeight);
}

function fixHeight(contentBox){
	var winHeight = parseInt(document.body.clientHeight);
	if(winHeight > contentBox ){
		document.getElementById('root').style.paddingTop = (winHeight - contentBox)/2 + "px";
	}
	else{
		document.getElementById('root').style.paddingTop = "0px";	
	}
	
}

function mshover() { 
	if (document.all&&document.getElementById("pic_foot")) { 
		navRoot = document.getElementById("pic_foot"); 
		for (i=0; i<navRoot.childNodes.length; i++) { 
			node = navRoot.childNodes[i]; 
			//alert(node.className);
			if (node.nodeName=="DIV" && node.className=="it_pic") { 
				node.onmouseover=function() {
					this.className+=" over"; 
				} 
				node.onmouseout=function() { 
					this.className=this.className.replace
					(" over", ""); 
				}
				
			}
		}
	}
}
function mshoverInfo() { 
	if (document.all&&document.getElementById("info")) { 
		navRoot = document.getElementById("info"); 
		for (i=0; i<navRoot.childNodes.length; i++) { 
			node = navRoot.childNodes[i]; 
			//alert(node.className);
			if (node.nodeName=="DIV" && node.className=="it_pic") { 
				node.onmouseover=function() {
					this.className+=" over"; 
				} 
				node.onmouseout=function() { 
					this.className=this.className.replace
					(" over", ""); 
				}
				
			}
		}
	}
}
function mshoverInf() { 
	if (document.all&&document.getElementById("catalog_tech")) { 
		navRoot = document.getElementById("catalog_tech"); 
		for (i=0; i<navRoot.childNodes.length; i++) { 
			node = navRoot.childNodes[i]; 
			//alert(node.className);
			if (node.nodeName=="DIV" && node.className=="catalog_tec") { 
				node.onmouseover=function() {
					this.className+=" over"; 
				} 
				node.onmouseout=function() { 
					this.className=this.className.replace
					(" over", ""); 
				}
				
			}
		}
	}
}
function mshoverColor() { 
	if (document.all&&document.getElementById("selectColor")) { 
		navRoot = document.getElementById("selectColor"); 
		for (i=0; i<navRoot.childNodes.length; i++) { 
			node = navRoot.childNodes[i]; 
			if (node.nodeName=="DIV" && node.className=="colorist"){
				node.onmouseover=function() {
					this.className+=" over"; 
				}
			}
			node.onmouseout=function() { 
					this.className=this.className.replace
					(" over", ""); 
			}
		}
	}
}

var illLargeCurrent = null;
var illLargeNew = null;
var illActiveLink = null;
var illCurrentLink = null;
var counterHol = 0;
function showIllustration(illId) {
	illLargeNew = document.getElementById('ill-large-' + illId);
	illActiveLink = document.getElementById('ill-small-' + illId);
	if(illLargeNew != illLargeCurrent) {
		if(illLargeCurrent) {
			illLargeCurrent.style.visibility = 'hidden';
			//illLargeCurrent.style.display = 'none';
		}
		if(illLargeNew) {
			if(illId != 0 ){
				document.getElementById('ill-large-0').style.visibility = 'hidden';
				//document.getElementById('ill-large-0').style.display = 'none';			
			}
			illLargeNew.style.visibility = 'visible';
			//illLargeNew.style.display = 'block';
			illActiveLink.blur();
			illLargeCurrent = illLargeNew;
			illCurrentLink = illActiveLink;
		}
		
	}
}

/////
function init() {
   var xx=""+window.location;
	//alert(xx);	
	showIllustration(xx.substring(xx.indexOf("#")+1));
	if (arguments.callee.done) return;
	arguments.callee.done = true;
	if (_timer) {
		clearInterval(_timer);
		_timer = null;
	}
	// insert stuff here
	mshover();
	mshoverInfo() ;	
	mshoverColor();
	mshoverInf();
	//free();
	// end of insert
};
/* for Mozilla */
if (document.addEventListener) {
	document.addEventListener("DOMContentLoaded", init, false);
}

/* for Internet Explorer */
/*@cc_on @*/
/*@if (@_win32)
	document.write("<script id=__ie_onload defer src=javascript:void(0)><\/script>");
	var script = document.getElementById("__ie_onload");
	script.onreadystatechange = function() {
		if (this.readyState == "complete") {
			init(); // call the onload handler
		}
	};
/*@end @*/

/* for Safari */
if (/WebKit/i.test(navigator.userAgent)) { // sniff
	var _timer = setInterval(function() {
		if (/loaded|complete/.test(document.readyState)) {
			init(); // call the onload handler
		}
	}, 50);
}


/* for other browsers */
window.onload = init;

