function thisMovie(movieName) {
    if (navigator.appName.indexOf("Microsoft") != -1) {
        return window[movieName]
    } else {
        return document[movieName]
    }
}

function openBirdiebook(pageID){
	//alert('openBirdiebook: ' + pageID);
	lang = MyGetParam('en');
	top.frames.birdiebook.location.href = "/index.php?id="+ pageID + "&L=" + lang;
}

function gotoHole(holeID) {
	//alert( "gotoHole" + holeID);
    thisMovie("externalInterfaceExample").gotoHole(holeID);
} 


function getPageId(){
	if( document.location.href.indexOf("?") > 0 ){
		var RQStr = document.location.href.substring(document.location.href.indexOf("?")+1,document.location.href.length);
		var RQArray = RQStr.split("&");
		var RQArray2;
		for( i=0; i<RQArray.length; i++ ){
			/********uncomment if you pass strings without quotations Start********/
			//RQArray[i] = RQArray[i].replace('=','=\'');
			//RQArray[i] = RQArray[i] + "'";
			/********uncomment if you pass strings without quotations End********/
			//eval(RQArray[i]);
			RQArray2 = RQArray[i].split("=");
		}
		return RQArray2[1];
	}
	
}

function MyGetParam(param) {
	var url = String(window.location);
	//alert(url);
	//Es gibt Parameter 
	var undef = url.split("/");
	//alert( undef );
	for(i = 0; i <= undef.length; i++) {
		//alert( undef[i] );
		if( undef[i] == 'de' ) {
			return "0";
		}else if( undef[i] == 'en' ){
			return "1";
		}
	}
}