function generateMouseEvent(e){
	event = e;
}

if (!document.all){
window.captureEvents(Event.MOUSEMOVE);
window.onmousemove=generateMouseEvent;
}

function showPopup(obj, move){
	obj = document.getElementById(obj);
	obj.style.visibility = 'visible';
	
	if (document.all){
		if (event && move){
			obj.style.pixelLeft = document.body.scrollLeft + event.clientX + 10;
			obj.style.pixelTop  = document.body.scrollTop + event.clientY - 3;
		}
	}else{
		if (event && move){
			obj.style.left = window.pageXOffset + event.clientX + 10;
			obj.style.top = window.pageYOffset + event.clientY - 3;
		}
	}	
}

function hidePopup(obj){
	obj = document.getElementById(obj);
	obj.style.visibility = 'hidden';
}

function showLayer(layer){
	layer = document.getElementById(layer);
	layer.style.visibility = 'visible';
}

function hideLayer(layer){
	layer = document.getElementById(layer);
	layer.style.visibility = 'hide';
}

function confirmMsg(){
    msg = "Are you sure?";
    return confirm(msg);
}

function popUpNew(URL) {
	window.open(URL, '_blank', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=600,height=500,left = 200,top = 100');
}

function popUp(URL) {
	window.open(URL, 'Popup', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=600,height=500,left = 200,top = 100');
}

function popUp1024(URL) {
	window.open(URL, 'Popup', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=1024,height=768,left=0,top=0');
}

function popUp800(URL) {
	window.open(URL, 'Popup', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=800,height=600,left=10,top=10');
}

function popUpSmall(URL) {
	window.open(URL, 'Popup', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=400,height=300,left = 200,top = 100');
}

function popUpUser(URL) {
	window.open(URL, 'UserInfo', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=650,height=500,left = 200,top = 100');
}

function popUpCom(URL) {
	window.open(URL, 'CommunityInfo', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=550,height=500,left=100,top = 100');
}

function popUpComment(URL) {
	window.open(URL, 'CommunityInfo', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=700,height=500,left=100,top = 100');
}

function CCA(CB){
	if (CB.checked)
		hL(CB);
	else
		dL(CB);
}

function CheckCom(CB){
	if (CB.checked)
		hLCC(CB);
	else
		dL(CB);
}

function CheckFile(CB){
	if (CB.checked)
		hLCF(CB);
	else
		dL(CB);
}

function CheckUser(CB){
	if (CB.checked)
		hLUser(CB);
	else
		dL(CB);
}

function hLUser(E){
	while (E.tagName!="TR"){
		E=E.parentNode;
	}
	E.className = "HighLightUser";
}

function hLCC(E){
	while (E.tagName!="TR"){
		E=E.parentNode;
	}
	E.className = "HighLight";
}

function hLCF(E){
	while (E.tagName!="TR"){
		E=E.parentNode;
	}
	E.className = "HighLightCheckFile";
}

function hL(E){
	while (E.tagName!="TR"){
		E=E.parentNode;
	}
	E.className = "HighLight";
}

function dL(E){
	while (E.tagName!="TR"){
		E=E.parentNode;		
	}
	E.className = "";
}
