// Codebase

// Variablen
// Slider
var Slider = new Array();
var SliderCount = 0;

var CJPath = 'http://www.cachejudge.com/index.php/';
var CJImagePath = 'http://www.cachejudge.com/';

var CJGMap_Icon = CJImagePath + 'templates/basic/images/oth/gmaps_marker.png';
var CJGMap_Shadow = CJImagePath + 'templates/basic/images/oth/gmaps_marker_schatten.png';
var CJGMap_Transparent = CJImagePath + 'templates/basic/images/oth/gmaps_marker_trick.png';
var CJGMap_UserIcon = CJImagePath + 'templates/basic/images/oth/gmaps_userpos.png';

// Standardfunktionen
function d(){
	return;
}

function kc(code){
	try{
		if(code.keyCode){
			return code.keyCode;
		}
		if(code.which){
			return code.which;
		}
	}catch(e){
		return code.keyCode;
	}	
}

function toXML(content){
	try{
		var xml = (new DOMParser()).parseFromString(content, "text/xml");
	}
	catch(e){
		var xml = new ActiveXObject("Microsoft.XMLDOM");
		xml.async = "false";
		xml.loadXML(content);
	}
	
	return xml;
}

function ViewTutorialPane(module, lnk){
	try{
		var tut = new CJDSlide('Tutorial', {
			Title: 'Hilfe gefällig?', 
			TitleClass: '',
			Content: 'Man kann hier doch einiges machen, oder? Damit lassen wir Dich natürlich nicht im Regen stehen. <br />Wenn du möchtest, kannst Du dir unser Tutorial mit Video zu dieser Seite anschauen. <br /><br />Klar kannst Du hier alles auch auf eigene Faust erkunden. ;)<br /><br /><input type="button" id="TutGo" class="fomularfeld" value=":: Zum Tutorial">&nbsp;&nbsp;&nbsp;<input type="button" id="TutClose" class="fomularfeld" value=":: Nö, passt schon!">',
			ContentClass: 'TutBox',
			Height: 300,
			Duration: 1,
			Draggable: false,
			Image: null,
			WhiteBack: true,
			ImageClass: '',
			EndPos: ((window.getHeight()/2)-150)
		});
		
		tut.Display('top');
		// ajax
		
		var TutViewed = new CJAjax(CJPath + 'basic/ajax/',
		{
			OnFailure: null,
			OnComplete: null,
			OnTrue: null,
			OnFalse: null
		});
		
		$('TutClose').addEvent('click', function(){
			tut.Hide();
		});
		
		$('TutGo').addEvent('click', function(){
			location.href=lnk;
		});

		TutViewed.AddParameter('call', 'TutorialViewed');
		TutViewed.AddParameter('module', module);
		TutViewed.CallFull();
		
		
	}
	catch(e){
	}
}


