<!--
// Automatischer Linker
function LinkIt(target,MAC,more){
	//alert(more);
	//Zuerst Checken ob der Wert MORE gesetzt wurde, wenn nicht dann ist ein normaler Link
	if(more==0 && MAC!=0){
		location.href=target+'.php?mac='+MAC;
	}else if(more==0 && MAC==0){
	// beides 0 ist,dann äusser adresse
		location.href=target;
	}else{
	// Wenn doch, dann kommt noch was
		location.href=target+'.php?mac='+MAC+'&'+more;
	}
}
// Over Effekt für MainFunktions
function OverCap(LinkObject)	{
	LinkObject.style.background='rgb(180,0,0)';
	LinkObject.style.border='solid';
	LinkObject.style.borderWidth='1px';
	LinkObject.style.borderColor='rgb(0,0,0)';
}
// Out Effekt für MainFunktions
function OffCap(LinkObject)	{
	LinkObject.style.background='#702222';
	LinkObject.style.border='solid';
	LinkObject.style.borderWidth='1px';
	LinkObject.style.borderColor='rgb(0,0,0)';

}
// Over Effekt für LoginRes
function OverCapLR(LinkObject)	{
	LinkObject.style.background='rgb(180,0,0)';
	LinkObject.style.border='solid';
	LinkObject.style.borderWidth='1px';
	LinkObject.style.borderColor='rgb(0,0,0)';
}
// Out Effekt für LoginRes
function OffCapLR(LinkObject)	{
	LinkObject.style.background='';
	LinkObject.style.border='solid';
	LinkObject.style.borderWidth='1px';
	LinkObject.style.borderColor='rgb(0,0,0)';
}
// Value in LoginFields löschen
function ClearLFieldUN(ART){
	if(ART=="username"){
		document.LoginForm.username.value="";
	}else if(ART=="userpass"){
		document.LoginForm.userpass.value="";
	}
}
// Öffnet die Mechdetailanzeige als Popup
function startMechInfo(id){
	window.open ("http://ebt.trueborn.net/battlemechs_info.php?id=" + id,"Mechanzeige", "scrollbars=yes, resizable=yes, height=600, width=670");
}
// ButtonBar - Steuert die grafische Topnavi
function changeTabState(TAB, mstate){
	if(document.getElementById('selectedTab').value != TAB){
		document.getElementById(TAB).src = mstate ? "cengfx/TAB_" + TAB + "_ON.gif" : "cengfx/TAB_" + TAB + "_OFF.gif";
	}
}
// Sperrte den selektierten Tab
function selectTab(TAB){
	document.getElementById('selectedTab').value = TAB;
}
// Conventionslayer setzen!
function setSideTabPositions(){
	if(document.getElementById('SETCONTAB')){
		availableWidth = document.body.clientWidth;
		availableSpace = Math.round((availableWidth-750)/2);
		check4Negats = availableSpace.toString();
		if(check4Negats.indexOf('-') == "-1" && document.getElementById('SETCONTAB').value == "yes"){
			document.getElementById('SIDETABS').style.left = availableWidth-availableSpace;
  			document.getElementById('SIDETABS').style.top = 136;
  			document.getElementById('SIDETABS').style.visibility = "visible";
  		} else {
			document.getElementById('SIDETABS').style.left = 0;
  			document.getElementById('SIDETABS').style.top = 0;
			document.getElementById('SIDETABS').style.visibility = "hidden";
		}
	}
}

// BILDER VORLADEN
TAB_START_ON = new Image();
TAB_START_ON.src = "conventions/TAB_START_ON.gif";

TAB_START_ON = new Image();
TAB_START_ON.src = "cengfx/TAB_START_ON.gif";

TAB_CHAPTER_ON = new Image();
TAB_CHAPTER_ON.src = "cengfx/TAB_CHAPTER_ON.gif";

TAB_REGELN_ON = new Image();
TAB_REGELN_ON.src = "cengfx/TAB_REGELN_ON.gif";

TAB_KONTAKT_ON = new Image();
TAB_KONTAKT_ON.src = "cengfx/TAB_KONTAKT_ON.gif";

TAB_ANMELDEN_ON = new Image();
TAB_ANMELDEN_ON.src = "cengfx/TAB_ANMELDEN_ON.gif";

TAB_HPGSTATION_ON = new Image();
TAB_HPGSTATION_ON.src = "cengfx/TAB_HPGSTATION_ON.gif";

LOGINBAR = new Image();
LOGINBAR.src = "cengfx/LOGINBAR.gif";

//TAB_ _ON = new Image();
//.src = "cenfgx/.gif";

function openLeague(id) {
	window.open('or_leagues_print.php?id='+id,'Bündniss','width=600,height=700,scrollbars=1');
}

function openContract(id) {
	window.open('or_contracts_print.php?id='+id,'Vertrag','width=600,height=700,scrollbars=1');
}
