
//// layer control for detailBox inBoxL ////
function changeImg(bpref, hpref, id_max, selected) {
  if (! document.getElementById) return;
  for (i = 0; i <= id_max; i++) {
    if (! document.getElementById(bpref + i)) continue;
    if (i == selected) {
    document.getElementById(bpref + i).style.display = "inline";
    } else {
    document.getElementById(bpref + i).style.display = "none";
		}
	}
}

//// layer control for detailBox inBoxR ////
function changeArea(bpref, hpref, id_max, selected) {
  if (! document.getElementById) return;
  for (i = 0; i <= id_max; i++) {
    if (! document.getElementById(bpref + i)) continue;
    if (document.getElementById(hpref + i).className == "gray"){
 		document.getElementById(bpref + i).style.display = "none";
		continue;
	}
    if (i == selected) {
    document.getElementById(bpref + i).style.display = "inline";
		document.getElementById(hpref + i).className = "close";
    } else {
    document.getElementById(bpref + i).style.display = "none";
		document.getElementById(hpref + i).className = "open";
		}
	}
}

//// layer control for layoutBox ////
function layoutImg(bpref, hpref, id_max, selected) {
  if (! document.getElementById) return;
  for (i = 0; i <= id_max; i++) {
    if (! document.getElementById(bpref + i)) continue;
    if (document.getElementById(hpref + i).className == "gray"){
	    document.getElementById(bpref + i).style.display = "none";
        continue;
	}
    if (i == selected) {
    document.getElementById(bpref + i).style.display = "block";
		document.getElementById(hpref + i).className = "close";
    } else {
    document.getElementById(bpref + i).style.display = "none";
		document.getElementById(hpref + i).className = "open";
		}
	}
}

//// layer control for deliBox ////
function mdo(n){
var m=document.inquiry.deli.length - 0;
var j=n.value;
if(n.checked){
for(i=0;m>i;i++){
var k="deliArea"+i;
document.getElementById(k).style.display="none";
}
document.getElementById(j).style.display="block";
}
}

//// defaultformtext clear ////
function formClear(targetElement){
	if(targetElement.value == targetElement.defaultValue){
		targetElement.value = "";
	}
}

//// layer control for popup ////
function MM_openBrWindow(theURL,winName,features) {
  window.open(theURL,winName,features);
}

//// Bookmark ////
function addBookmark(title,url) {
    if (window.sidebar) {
        window.sidebar.addPanel(title, url,"");
    } else if( document.all ) {
        window.external.AddFavorite( url, title);
    } else if( window.opera && window.print ) {
        return true;
    }
}
