IE=document.all?1:0;
n=document.layers?1:0;
ns6=document.getElementById&&!document.all?1:0;

function fixHover(object,classToggle) {
	var i;
	rootnode=object.childNodes[0];
	for (i=0; i<rootnode.childNodes.length; i++) {
		  node = rootnode.childNodes[i];
		  if (node.nodeName=="LI") {
			  node.onmouseover=function() { this.className+=(" " + classToggle);}
			  node.onmouseout=function() { this.className=this.className.replace(" " + classToggle, "");}
		  }
	}
}
function fixHoverStick(object,classToggle) {
	var i;
	for(i=0;i<object.childNodes.length;i++)
		if(object.childNodes[i].nodeName=="UL"){
			rootnode=object.childNodes[i];
			break;
		}
	for (i=0; i<rootnode.childNodes.length; i++) {
		  node = rootnode.childNodes[i];
		  if (node.nodeName=="LI") {
			  node.onmouseover=function() {if(this.className.indexOf('sub_navig')<0) this.className+=(" " + classToggle);}
			  node.onmouseout=function() {if(this.className.indexOf('sub_navig')<0) this.className=this.className.replace(" " + classToggle, "");}
		  }
	}
}
function addHover(object, classToggle){
	object.onmouseover=function() { this.className+=(" " + classToggle);}
	object.onmouseout=function() { this.className=this.className.replace(" " + classToggle, "");}	
}
function executeFix(){
var i;
if (IE) {
for(i=0; i<document.getElementsByTagName('div').length; i++)
	if(document.getElementsByTagName('div')[i].className.indexOf('main_navig')>=0)
		addHover(document.getElementsByTagName('div')[i],' over');
	else if(document.getElementsByTagName('div')[i].className.indexOf('sub_navig')>=0)
		fixHover(document.getElementsByTagName('div')[i],' over');
}
}
function fix_tablecell(){
var i;
var j;
var tableNode;
var tdNode;

var tableProxy;
var tbodyProxy;
var trProxy;
var tdProxy;

	for(i=0;i<document.getElementsByTagName("div").length;i++){
		if(document.getElementsByTagName("div")[i].className.indexOf("fixclass_table")>=0){
			tableNode=document.getElementsByTagName("div")[i];
			
			tableProxy=document.createElement('table');
			tableProxy.cellPadding="0";
			tableProxy.cellSpacing="0";
			tableProxy.border="0";
			tbodyProxy=document.createElement('tbody');
			trProxy=document.createElement('tr');
			
			for(j=0;j<tableNode.childNodes.length;j++)
				if(tableNode.childNodes[j].nodeName=="DIV"){
						tdNode=tableNode.childNodes[j];
						tdProxy=document.createElement("td");
						tdProxy.vAlign="top";
						tdProxy.appendChild(tdNode);
						trProxy.appendChild(tdProxy);
						j--;
					}
			tbodyProxy.appendChild(trProxy);
			tableProxy.appendChild(tbodyProxy);
			
			tableNode.appendChild(tableProxy);
		}
	}
}