
var type, x, y;

function getBrowser(){
	if (navigator.userAgent.indexOf("Opera")!=-1 && document.getElementById) type = "OP";
	if (document.all) type = "IE";
	if (document.layers) type = "NN";
	if (!document.all && document.getElementById) type = "MO";

	if (type == "NN") {
		document.captureEvents(Event.MOUSEMOVE);
		document.onmousemove = grabXY;
	} else {
		document.onmousemove = grabXY;
	}
}

function grabXY(ev) {
	if (type == "IE") {
		x = event.x;
		y = event.y;
	}
	if (type == "MO" || type == "OP" || type == "NN") {
		x = ev.pageX;
		y = ev.pageX;
	}
}

function ShowLayer(id, action){

	if (type == "IE") {
//		document.all[id].style.left = 20+x;
//		document.all[id].style.top  = 20+y;
		eval("document.all." + id + ".style.visibility='" + action + "'");
	}
	if (type == "NN") eval("document." + id + ".visibility='" + action + "'");
	if (type == "MO" || type == "OP") {
//		document.getElementById(id).style.left = 20 + x;
//		document.getElementById(id).style.top  = 20 + y;
		eval("document.getElementById('" + id + "').style.visibility='" + action + "'");
	}
}

function ChangeLayerBgColor(id, color){
	if (type == "IE") document.all[id].style.backgroundColor = color;
	if (type == "NN") document.layer['id'].bgColor = color;
	if (type == "MO" || type == "OP")
		document.getElementById(id).style.backgroundColor = color;
}

function ChangeContent(id, str) {
	if (type == "IE") {
		document.all[id].innerHTML = str;
	}
	if (type == "NN") {
		document.layers[id].document.open();
		document.layers[id].document.write(str);
		document.layers[id].document.close();
	}
	if (type == "MO" || type == "OP") {
		document.getElementById(id).innerHTML = str;
	}
}

function openWhoisUanic(nic) {
    window.open("/uanic.php?uanic=" + nic, 'window', 'width=600,height=400,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes');
}

function openWhoisDomain(dom) {
    window.open("/whois.php?domain=" + dom, 'window', 'width=500,height=600,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes');
}

function openHelp(help) {
    window.open("/help.php?" + help , 'window', 'width=400,height=400,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes');
}
function openWhoisEppContact(nic) {
    contactWindow=window.open("/actualization/whois_contact.php?contact=" + nic, 'window', 'width=600,height=400,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes');contactWindow.focus();
}

function openWhoisEppDomain(dom) {
    domWindow=window.open("/actualization/whois_domain.php?domain=" + dom, 'window', 'width=600,height=600,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes');domWindow.focus();
}
function openWhoisEppReg(alias) {
    regWindow=window.open("/actualization/whois_reg.php?reg=" + alias, 'window', 'width=600,height=600,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes');regWindow.focus();
}


