//Function to change page from option list
function linkURL(URL) {
	
	if (URL.options[URL.selectedIndex].value != "") self.location.href = URL.options[URL.selectedIndex].value;	
	return true;
}

//Function to open pop up window
function winOpener(theURL, winName, scrollbars, resizable, width, height) {
	
	winFeatures = 'left=' + (screen.availWidth-10-width)/2 + ',top=' + (screen.availHeight-30-height)/2 + ',scrollbars=' + scrollbars + ',resizable=' + resizable + ',width=' + width + ',height=' + height + ',toolbar=0,location=0,status=1,menubar=0'
  	window.open(theURL, winName, winFeatures);
}
// UserMenu functions
// Mod by Venky, http://venki.seccomnetworks.net, hrvojevencl@gmail.com
var intUserID=0;
var strUserName='';
function ShowUserMenu(UserID, UserName){
	intUserID = UserID;
	strUserName = UserName;
	if((screen.width - 200)>(document.body.scrollLeft + event.clientX)){
		document.all.UserMenu.style.pixelLeft = event.clientX + document.body.scrollLeft;
	}
	else{
		document.all.UserMenu.style.pixelLeft = event.clientX + document.body.scrollLeft - 200;
	}
	document.all.UserMenu.style.pixelTop = event.clientY + document.body.scrollTop; 
	document.all.UserMenu.style.visibility="visible";
	return false;
}
function HideUserMenu(){
	UserMenu.style.visibility="hidden";
}
function SMO(elem){
	elem.style.backgroundColor = '#EFFDFF'; elem.style.cursor = 'hand'
}
function SMU(elem){
	elem.style.backgroundColor = '#FDFDFD';
}
function SMLIDN(path){
	window.open(path + intUserID);
}
function SMLIDL(path){
	location.href = path + intUserID;
}
function SMLUN(path){
	location.href = path + strUserName;
}