function ReadStyleCookie(){
	var arrStyles = new Array();
	var arrStylesIE = new Array();
	var arrStylesIELegacy = new Array();
	arrStyles[0] = "";
	arrStyles[1] = '<link rel="stylesheet" type="text/css" href="http://www.torrent-universe.com/torrentuniverse/css/technologiesdark.css"/>';
	arrStylesIE[0] = "";
	arrStylesIE[1] = '<link rel="stylesheet" type="text/css" href="http://www.torrent-universe.com/torrentuniverse/css/technologiesdarkie.css"/>';
	arrStylesIELegacy[0] = "";
	arrStylesIELegacy[1] = '<link rel="stylesheet" type="text/css" href="http://www.torrent-universe.com/torrentuniverse/css/technologiesdarkielegacy.css"/>';
	var strCookieValue = GetStyleCookie();
	document.write(arrStyles[strCookieValue]);
	if(document.all){
		if(navigator.platform.indexOf("Win") != -1){
			document.write(arrStylesIE[strCookieValue]);
			if(!document.namespaces){
				document.write(arrStylesIELegacy[strCookieValue]);				
			}
		}
	}
}
function ReadDisabilityCookie(){
	var arrStyles = new Array();
	arrStyles[0] = "";
	arrStyles[1] = '<link rel="stylesheet" type="text/css" href="http://www.torrent-universe.com/torrentuniverse/css/disability.css"/>';
	var strCookieValue = GetDisabilityCookie();
	document.write(arrStyles[strCookieValue]);
}
function GetStyleCookie(){
	return GetCookieByName("style");
}
function GetDisabilityCookie(){
	return GetCookieByName("disability");
}
function GetCookieByName(CookieName){
	var strCookie = document.cookie;
	var intPos = strCookie.indexOf(CookieName + "=");
	var strCookieValue = 0;
	if(intPos != -1){
		strCookieValue = strCookie.substr(intPos + CookieName.length + 1, 1); 
	}
	return strCookieValue;
}
function SwitchCookie(CookieName){
	var strCookieValue = GetCookieByName(CookieName);
	var strNewCookieValue = 0;
	if(strCookieValue == 0){strNewCookieValue = 1;}
	document.cookie = CookieName + "=" + strNewCookieValue;
}
function SetStyleCookie(){
	SwitchCookie("style");
}
function SetDisabilityCookie(){
	SwitchCookie("disability");
}
function ResizeWindow(Width, Height){
	Width	= parseInt(Width);
	Height	= parseInt(Height);
	if(isNaN(Width) == true | isNaN(Height) == true){
		return;
	};
	Width	= Width - (window.screen.width - window.screen.availWidth);
	Height	= Height - (window.screen.height - window.screen.availHeight);
	Width	= Math.abs(Width);
	Height	= Math.abs(Height);
	try{window.moveTo(0, window.screen.availHeight - Height);}catch(objError){};
	window.resizeTo(Width, Height);
}
function PositionWindow(Vertical, Horizontal){
	var Width;
	var Height;
	var x;
	var y;
	switch(Horizontal){
		case "left" :
			Width = (window.screen.availWidth)/2;
			x = 0;
			break;
		case "right" :
			Width = (window.screen.availWidth)/2;
			x = Width;
			break;
		default :
			Width = window.screen.availWidth;
			x = 0;
			break;
	}
	switch(Vertical){
		case "top" :
			Height	= (window.screen.availHeight)/2;
			y = 0;
			break;
		case "bottom" :
			Height	= (window.screen.availHeight)/2;
			y = Height;
			break;
		default:
			Height = window.screen.availHeight;
			y = 0;
			break;
	}
	try{window.resizeTo(Width, Height);}catch(objError){};
	try{window.moveTo(x, y);}catch(objError){};
}
function ToogleResizeButtons(){
	if(!document.getElementById){return;}
	var elResizeButtons = document.getElementById("ResizeButtons");
	if(elResizeButtons == null){return;}
	if(elResizeButtons.style.display != "block"){
		elResizeButtons.style.display = "block";
	}else{
		elResizeButtons.style.display = "none";
	}
}