<!--
var chatinit;


function popup(url,w,h) {

  PlayWindow = window.open(url, "PlayWD", "width=" + w + ",height=" + h + ",status=yes,scrollbars=yes,resizable=yes, menubar=no,location=no,toolbar=no,status=no");
  if (PlayWindow) PlayWindow.focus();

  //return false;
}   

/*
function playClose() {
  var PlayWindow  = window.open("" , "PlayWD" , "");
  if (PlayWindow) PlayWindow.close();
}
*/

function GetProfil(w,h,id) {



  h = h - 20; var x=0, y=0, parameter="";
  if (w < screen.availWidth || h < screen.availHeight) {
    x = (screen.availWidth - w - 12) / 2;
    y = (screen.availHeight - h - 104) / 2;
    if (window.opera) y = 0; // Opera positioniert unter den Symbolleisten
    if (x<0 || y<0) { x=0; y=0; }
    else parameter = "width=" + w + ",height=" + h + ",";
  }
  parameter += "left=" + x + ",top=" + y;
  parameter += ",menubar=no,location=no,toolbar=no,status=no";
  parameter += ",resizable=no,scrollbars=yes";
  
  var Profil = window.open("/user_show.php?userid="+id,"PopUpProfil",parameter);
  if (Profil) Profil.focus();
  

 
}


function SysUPr(id, option) {

  var w = 800;
  var h = 560;

  h = h - 20; var x=0, y=0, parameter="";
  if (w < screen.availWidth || h < screen.availHeight) {
    x = (screen.availWidth - w - 12) / 2;
    y = (screen.availHeight - h - 104) / 2;
    if (window.opera) y = 0; // Opera positioniert unter den Symbolleisten
    if (x<0 || y<0) { x=0; y=0; }
    else parameter = "width=" + w + ",height=" + h + ",";
  }
  parameter += "left=" + x + ",top=" + y;
  parameter += ",menubar=no,location=no,toolbar=no,status=no";
  parameter += ",resizable=no,scrollbars=yes";
  
  var Profil = window.open("/user_show.php?userid=" + id + "&opt="+option,"PopUpProfil",parameter);
  if (Profil) Profil.focus();
  
 
}






function GetStartProv(hash) {

   var w = 620;
   var h = 400;
	

	
  h = h - 20; var x=0, y=0, parameter="";
  if (w < screen.availWidth || h < screen.availHeight) {
    x = (screen.availWidth - w - 12) / 2;
    y = (screen.availHeight - h - 104) / 2;
    if (window.opera) y = 0; // Opera positioniert unter den Symbolleisten
    if (x<0 || y<0) { x=0; y=0; }
    else parameter = "width=" + w + ",height=" + h + ",";
  }
  parameter += "left=" + x + ",top=" + y;
  parameter += ",menubar=no,location=no,toolbar=no,status=no";
  parameter += ",resizable=no,scrollbars=yes";
  var StartPrv = window.open("/user_sys_startseite.php?hash="+hash,"StartProv",parameter);
  if (StartPrv) StartPrv.focus();
  
  playClose();

}



wmtt = null;
document.onmousemove = updateWMTT;
function updateWMTT(e) {
	x = (document.all) ? window.event.x + document.body.scrollLeft : e.pageX;
	y = (document.all) ? window.event.y + document.body.scrollTop  : e.pageY;
	if (wmtt != null) {
		wmtt.style.left = (x + 20) + "px";
		wmtt.style.top 	= (y + 20) + "px";
	}
}
function showWMTT(id) {
	wmtt = document.getElementById('UserInfo');
	wmtt.style.display = "block";
	UserInfoLoad(id);
}
function hideWMTT() {
	wmtt.style.display = "none";
	wmtt.innerHTML = 'Profil wird geladen...';
}
function UserInfoLoad(id)
{
   var e = document.createElement("script");
   e.src = "/user_show_pr.js.php?userid="+id;
   e.type="text/javascript";
   document.getElementsByTagName("head")[0].appendChild(e);
}


/* MEMBERS */

function mrb_getprof(id) {
	GetProfil(800,560,id);
}

function mrb_userbystate(state) {
	document.location="/?geschlecht=egal&altervon=&alterbis=&bundesland="+state+"&benutzername=&Submit=Suchen&params=members";
}


function mrb_lastmedia(mediaid) {
	window.open("/media/"+mediaid+"/1.html");
}


/* STARTSEITEN TIMER */


	function restartclock(time) {
	
		now_time = time;
		countdown_start();
			
	}
	
	
	function stopclock() {
		if(timerRunning) {
			clearTimeout(timerID);
			timerRunning = false;
		}
	}

	function startclock() {
		stopclock();
		showtime();
	}
	function showtime() {
	
		if(now_time == 0){

		document.getElementById('stopuhr').style.color = '#339900';
		document.getElementById('stopuhr').innerHTML = '<a href="#" onClick="javascript:GetStartProv(\'' + trackcode + '\')"><u>Go !</u></a>';
					
		} else {

		now_time = now_time - 1;
		var elapsedSecs = now_time; //nowSecs - startSecs;

		var hours = Math.floor( elapsedSecs / 3600 );
		elapsedSecs = elapsedSecs - (hours*3600);

		var minutes = 	Math.floor( elapsedSecs / 60 );
		elapsedSecs = elapsedSecs - (minutes*60);

		var seconds = elapsedSecs;

		var timeValue = "" + hours;
		timeValue  += ((minutes < 10) ? ":0" : ":") + minutes;
		timeValue  += ((seconds < 10) ? ":0" : ":") + seconds;

		// Update display
		document.getElementById('stopuhr').innerHTML = timeValue;
		document.getElementById('stopuhr').style.color = '#000000';
		timerID = setTimeout("showtime()",1000);
		timerRunning = true;

		}
	}
	function countdown_start() {

		startclock();
	}


/* Mitgliederübersich  Navigation rechts */

function NVAktBar(ShowBar) {

	document.getElementById('NvContentTop').style.display = "none";
	document.getElementById('NvContentNew').style.display = "none";
	document.getElementById('NvContentLoginM').style.display = "none";
	document.getElementById('NvContentLoginW').style.display = "none";
	document.getElementById('NvContentPlay').style.display = "none";
	
	document.getElementById(ShowBar).style.display = "block";

}



/* NAvigation */


var currentElement = "";

function ViewSubNavigation(element) {

		if(element == 'close' && currentElement != "") {
		
			$('NvOverlayBG').hide();
			$(currentElement).hide();
			currentElement = "";
		
		} else {

			if(currentElement!="") { 
				$('NvOverlayBG').hide();
				$(currentElement).hide();
				currentElement = "";
			}
			
			if($(element)) currentElement = $(element).getAttribute("subNvElement");
			if(!$(currentElement) || currentElement == "") currentElement ="";
		
			
			if(currentElement != "") {	
				pos = Position.positionedOffset(element);
				$(currentElement).setStyle({"position":"absolute", 
							"z-index":"1000", 
							"top": (20+ pos[1]) + "px", 
							"left":pos[0] + "px"
							});
	
				$(currentElement).show();
				$('NvOverlayBG').show();
				$("NvOverlayBG").onmouseover = function () { ViewSubNavigation('close'); } 
			}
			
		}

}

currentSubNavigationElement = "";
currentSubNavigationElementHref = "";

function ViewSubNavigation2(thisel, subobj) {
	

	pos = Position.positionedOffset(thisel);
	size = $(thisel).getDimensions(); 
	$(subobj).setStyle({"position":"absolute", 
							"z-index":"1000", 
							"top": pos[1] + "px", 
							"left":pos[0] + "px",
							"width": size.width + "px"
							});
	currentSubNavigationElementHref = thisel.href;
	//$(subobj).onclick = function () { document.location.href = currentSubNavigationElementHref; } 
	$(subobj).show();
	
	currentSubNavigationElement = subobj;
	
	$('NvOverlayBG').show();
	$("NvOverlayBG").onmouseover = function () { 
			if(currentSubNavigationElement!="") {
			
				$(currentSubNavigationElement).hide();
				$('NvOverlayBG').hide();
				currentSubNavigationElement = "";
			}
		} 
	
	
}


  // Startseite Slider für blöcke



	function init_startseite_infoslider() {
		
		// Load Shopping

		new Ajax.Updater('mb_shopping', '/gamestore/promotion.php?layout=2&num=5');
		

		slideelements  = $('mini_mainbody_navigation').getElementsByTagName("a");
		sub_nv_element_list = new Array();
		
		for (var i=0; i<slideelements.length; i++) {
			element = $(slideelements[i]);
			sub_nv_element_list[i] = element.getAttribute("rel");
			element.onmouseover = function () { 
									hidden_all_sub_nv_elements();
									$(this).setStyle({"fontWeight":"bold", "color":"#000000"});
									$(this.getAttribute("rel")).show(); 
								}
		}
		
		// FIRST 
		$(sub_nv_element_list[0]).show();
		$(slideelements[0]).setStyle({"fontWeight":"bold", "color":"#000000"});
	
	}
	
	function hidden_all_sub_nv_elements() {
		for (var i=0; i<slideelements.length; i++) { $(slideelements[i]).setStyle({"fontWeight":"normal", "color":"#0000FF"}); }
		for (var i=0; i<sub_nv_element_list.length; i++) { $(sub_nv_element_list[i]).hide(); }
	}
	




function chatInit(iframecode) {	

	chatinit = iframecode;

	if(!readCookie("disabled_chat")) {
		document.write("<div id=ChatContainer>" + iframecode + "</div>");
		$('ChatOffLink').innerHTML = "Chat deaktivieren";
		$('ChatOffLink').href = "javascript:chatOFF()";
	} else {
		document.write("<div id=ChatContainer></div>");
		$('ChatOffLink').innerHTML = "Chat aktivieren";
		$('ChatOffLink').href = "javascript:chatON()";
	}
	
}



function chatON() {
	
	eraseCookie("disabled_chat");
	$('ChatContainer').innerHTML = chatinit;
	$('ChatOffLink').innerHTML = "Chat deaktivieren";
	$('ChatOffLink').href = "javascript:chatOFF()";
	
}



function chatOFF() {
	
	createCookie("disabled_chat", 1, 60);
	$('ChatContainer').innerHTML = "";
	$('ChatOffLink').innerHTML = "Chat aktivieren";
	$('ChatOffLink').href = "javascript:chatON()";
	
}



function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function eraseCookie(name) {
	createCookie(name,"",-1);
}



function addBookmark(title,url) {
if (window.sidebar) { 
window.sidebar.addPanel(title, url,"http://www.spielesite.com"); 
} else if( document.all ) {
window.external.AddFavorite( url, title);
} else if( window.opera && window.print ) {
return true;
}
}


// -->
