isMac = (navigator.appVersion.indexOf("Mac")!=-1) ? true : false;
NS4 = (document.layers) ? true : false;
IEmac = ((document.all)&&(isMac)) ? true : false;
IE4plus = (document.all) ? true : false;
IE4 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 4.")!=-1)) ? true : false;
IE5 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 5.")!=-1)) ? true : false;
ver4 = (NS4 || IE4plus) ? true : false;
NS6 = (!document.layers) && ((navigator.userAgent.indexOf('Netscape')!=-1) || (navigator.userAgent.indexOf('Mozilla')!=-1) || (navigator.userAgent.indexOf('Firefox')!=-1))?true:false;

var _wa = "";

function echo_Param(formObj){
var result, tab = "";
for (var i in formObj) {result += "." + i + " = " + formObj[i] + " | ";}
alert(result);}

function dr_tree(obj, limit, step){
var result = "";
for(i = 0; i < obj.length; i++){
result += obj.childNodes[i].nodeName+"<br>";
if(limit > step+1 && obj.childNodes[i].length > 0){
result += dr_tree(obj.childNodes[i], limit, step+1);
}}
alert(result);}

function brname(Xname){
if(IE4plus){return top.document.all[Xname];}
else if(NS4){return top.document[Xname];}
else if(NS6){return top.document.getElementById(Xname);}}

function init(){
_wa = "http://"+top.location.host;
}

function zoom(id, w, h){
document.body.style.overflow = "hidden";
ab = brname("Zoom");
ab.style.display = "block";
ab.style.top = document.body.scrollTop+"px";
ab = brname("ZoomImage");
ab.style.left = ((document.body.clientWidth - w - 20)/2)+"px";
ab.style.top = (document.body.scrollTop+((document.body.clientHeight - h - 40)/2))+"px";
ab.innerHTML = '<img src="'+id+'" width="'+w+'" height="'+h+'"><a href="#" onclick="closeZoom(); return false;">close</a>';
ab.style.display = "block";
}

function zoomer(id, w, h, t){
document.body.style.overflow = "hidden";
ab = brname("Zoom");
ab.style.display = "block";
ab.style.top = document.body.scrollTop+"px";
ab = brname("ZoomImage");
ab.style.left = ((document.body.clientWidth - w - 20)/2)+"px";
ab.style.top = (document.body.scrollTop+((document.body.clientHeight - h - 40)/2))+"px";
ab.innerHTML = '<img src="'+id+'" width="'+w+'" height="'+h+'"><blockquote>'+t+'</blockquote><a href="#" onclick="closeZoom(); return false;">close</a>';
ab.style.display = "block";
}

function closeZoom(){
ab = brname("Zoom");
ab.style.display = "none";
ab = brname("ZoomImage");
ab.style.display = "none";
document.body.style.overflow = "auto";
}

onload = init;