var isDrag=0;
var objectsname="";
var initialvisible =0;
function hiddendiv(divname, img_name) {
	isDrag = 0;
	if (document.getElementById(divname).style.visibility == "hidden") {
		document.getElementById(divname).style.visibility = "visible";
		document.getElementById(divname).style.position = "relative";
		document[img_name].src="images/chevronUp.gif";
	}
	else { 
		document.getElementById(divname).style.visibility = "hidden";
		document.getElementById(divname).style.position = "absolute";
		document[img_name].src="images/chevronDown.gif";
	}
}

function document_onmousedown(movediv){
	isDrag=1;
	objectsname = movediv;
}

function document_onmousemove(){
	if( isDrag ){
		document.getElementById(objectsname).style.position = "absolute";
		document.getElementById(objectsname).width = document.body.clientWidth - event.clientX;
		document.getElementById(objectsname).style.top=event.clientY;
		document.getElementById(objectsname).style.left=event.clientX;
	}
}

function document_onmouseup(){
	isDrag=0;
	objectsname = "";
}

function contentover(changecolordiv) {
	document.getElementById(changecolordiv).style.background = "#9A9A9A";
	document.getElementById(changecolordiv).style.color = "#FFFF99";
}

function contentout(changecolordiv) {
	document.getElementById(changecolordiv).style.background = "";
	document.getElementById(changecolordiv).style.color = "#000000";
//	contenttitle.innerText = "test";
}

function resizediv(resizedivname) {
	document.getElementById(resizedivname).height = document.body.clientWidth - 30;
	document.getElementById(resizedivname).height = document.body.clientHeight - 30;
	document.getElementById(resizedivname).style.left= "10";
	document.getElementById(resizedivname).style.right= "10";
	document.getElementById(resizedivname).style.top= "10";
	document.getElementById(resizedivname).style.top="32";
	document.getElementById(resizedivname).style.right= "50";
}

function clickmenu(Title, URL) {	
	contenttitle.innerText = Title;
	realURL = "" + URL;
	contentframe.location = realURL;	
}

function linkover(changecolordiv, titleString) {
	document.getElementById(changecolordiv).style.background = "#9A9A9A";
	document.getElementById(changecolordiv).style.color = "#FFFF99";
}

function linkout(changecolordiv, orgbg) {
	document.getElementById(changecolordiv).style.background = orgbg;
	document.getElementById(changecolordiv).style.color = "#000000";
}

function linkover2(changecolordiv, titleString) {
	document.getElementById(changecolordiv).style.background = "#9A9A9A";
	document.getElementById(changecolordiv).style.color = "#FFFF99";
	followcursor(titleString);
}

function linkout2(changecolordiv, orgbg) {
	document.getElementById(changecolordiv).style.background = orgbg;
	document.getElementById(changecolordiv).style.color = "#000000";
	initialvisible = 0;
	curscroll.style.visibility="hidden";
}

function followcursor(showString){
	if (initialvisible==0){
		curscroll.style.visibility="visible";
		initialvisible=1;
	}
	curscroll.innerHTML = '<TABLE bordercolordark=FFFFFF bordercolorlight=#336699 bgcolor=6699cc border=1 cellspacing=0><TR><TD><font color=white size=-1>' + showString + '</font></table>';
	curscroll.style.left=document.body.scrollLeft+event.clientX+10;
	curscroll.style.top=document.body.scrollTop+event.clientY+10;
}