limiter=true;

function change_data(lay,n){

if(limiter==true){

if(preloadFlag == true){

limiter=false;

oj=getLayerName(lay);

if(document.all || document.getElementById ){
oj.innerHTML=change_html[n]
} else if(document.layers) {
oj.document.open();
oj.document.write(change_html[n])
oj.document.close();
}

}

limiter=true;
}
}


function getLayerName(name){
layArray=new Array();
layArray=name.split(",");
layArrayEnd=layArray.length;
var oj;
if(document.getElementById) oj=document.getElementById(layArray[layArrayEnd-1]);
else if(document.layers){
for(i=0;i<layArrayEnd;i++){
if (i<1) {
oj=document.layers[layArray[i]];
} else {
oj=oj.document.layers[layArray[i]];
}
}
}
else if(document.all) oj=document.all(layArray[layArrayEnd-1]);

return oj;
}


function getLayer(theId) {
	if (document.getElementById) {
		return document.getElementById(theId);
	}
	if (document.all) {
		return document.all(theId);
	}
	if (document.layers) {
		return recurLayer(document.layers, theId);
	}
	return null;
}

function recurLayer(theLayers, theId) {
	for (var i=0; i<theLayers.length; i++) {
		var aLayer = theLayers[i];
		var aName = aLayer.name;
		if (aName) {
			if (aName == theId) {
				return aLayer;
			} else {
				if (aLayer.document.layers) {
					var aSubLayer = recurLayer(aLayer.document.layers, theId);
					if (aSubLayer) return aSubLayer;
				}
			}
		}
	}
	return null;
}

function getStyle(theId) {
	theLayer = getLayer(theId);
	if (!theLayer) return null;
	if (document.layers) {
		return theLayer;
	} else {
		return theLayer.style;
	}
	return null;
}

function setVisibility(theId, isVisible) {
	theStyle = getStyle(theId);
	if (theStyle) {
		theStyle.visibility = isVisible ? "visible" : "hidden";
	}
}

function resetVisibility(theId) {
	theStyle = getStyle(theId);
	if (theStyle) {
		theStyle.visibility = "inherit";
	}
}

function setPosition(theId, x, y) {
	theStyle = getStyle(theId);
	if (!theStyle) return null;
	if (document.all) {
		theStyle.pixelLeft = x;
		theStyle.pixelTop  = y;
		return;
	}
	if (document.getElementById || document.layers) {
		theStyle.left = x;
		theStyle.top  = y;
		return;
	}
}

function hideSubNavi() {
	setVisibility('subsubnavi', false);
	setVisibility('subnavi', false);
}

function showSubNavi() {
	setVisibility('subnavi', true);
}

function hideSubSubNavi() {
	setVisibility('subsubnavi', false);
}

function showSubSubNavi() {
	setVisibility('subsubnavi', true);
}

function MM_openBrWindow(theURL,winName) { //v2.0
  window.open(theURL,winName,"scrollbars=yes,resizable=yes,width=650,height=400");
}
