//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);
}


// Kullanıcı Menüsü By YaGMuR PreNSi
// Mod By YaGMuR PreNSi wWw.YaGMuRPreNSi.NeT/Forum
// Kaynak Alınan Site: http://www.howtocreate.co.uk/tutorials/javascript/browserwindow
var intUserID=0;
var strUserName='';
function ShowUserMenu(UserID, UserName){
	intUserID = UserID;
	strUserName = UserName;
	var intUserLeft = 0, intUserTop = 0, intWindowWidth = 0,  intWindowHeight = 0;
	//scroll
	if( typeof( window.pageYOffset ) == 'number' ) {
		//Netscape compliant
		intUserTop = window.pageYOffset;
		intUserLeft = window.pageXOffset;
	}
	else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
		//DOM compliant
		intUserTop = document.body.scrollTop;
		intUserLeft = document.body.scrollLeft;
	}
	else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
		//IE6 standards compliant mode
		intUserTop = document.documentElement.scrollTop;
		intUserLeft = document.documentElement.scrollLeft;
	}
	//window size
	if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		intWindowWidth = window.innerWidth;
		intWindowHeight = window.innerHeight;
	}
	else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		intWindowWidth = document.documentElement.clientWidth;
		intWindowHeight = document.documentElement.clientHeight;
	}
	else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		intWindowWidth = document.body.clientWidth;
		intWindowHeight = document.body.clientHeight;
	}

	//Menu
	if((intWindowWidth - 200)>(event.clientX + intUserLeft)){
		document.all.UserMenu.style.pixelLeft = event.clientX + intUserLeft;
	}
	else{
		document.all.UserMenu.style.pixelLeft = event.clientX + intUserLeft - 200;
	}
	document.all.UserMenu.style.pixelTop = event.clientY + intUserTop; 
	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;
}