// JavaScript Document
// livinglemon.com | http://www.livinglemon.com

// History-Back-Funktion
function tmt_winHistory(id,s){
	var d=eval(id)==null||eval(id+".closed");
	if(!d){eval(id+".history.go("+s+")");}
}


// Bilder vorausladen
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}


// Neues Browserfenster öffnen
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


// Browserfenster schliessen
function tmt_winControl(id,c){ 
	var d=eval(id)==null||eval(id+".closed");
	if(!d){eval(id+"."+c);}
}



// PopUp-Meldung
function MM_popupMsg(msg) { //v1.0
  alert(msg);
}


//reloads the window if Nav4 resized
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


/*>

© jörg mehlmann 2006

//_______________________________________________________________________________________________________

parameter formats :

path:String(path/filename.swf)
id:String(id & name)
version:Number(5 | 6 | 7 | 8)
width:Number(movie width)
height:Number(movie height)

//_______________________________________________________________________________________________________

optional parameters:

quality:String(low | medium | high | autolow | autohigh | best)			[default:high]
scaleMode:String(exactFit | showAll | noBorder | noScale)				[default:showAll]
menu:Boolean(true | false)									[default:true] 
wmode:String(Window | Opaque | Transparent)						[default:Window] [object tag only]
bgcolor:String(#ffffff)											[default:no defaults] 
value:String(myURL=http://weblogs.macromedia.com/ | myValue=10)	[default:no defaults] 

//_______________________________________________________________________________________________________

examples optional parameters:

flashObject('./flash/FileCenter.swf', 'FileCenter', '750', '320');						[all optional parameters set default]
flashObject('./flash/FileCenter.swf', 'FileCenter', '750', '320', 'best');					[quality set best]
flashObject('./flash/FileCenter.swf', 'FileCenter', '750', '320', '', 'noScale');				[scaleMode set noScale]
flashObject('./flash/FileCenter.swf', 'FileCenter', '750', '320', '', '', 'false');				[menu set false]
flashObject('./flash/FileCenter.swf', 'FileCenter', '750', '320', '', '', '', 'Transparent'); 		[wmode set transparent]
flashObject('./flash/FileCenter.swf', 'FileCenter', '750', '320', '', '', '', '', '#ffffff'); 			[bgcolor set white]
flashObject('./flash/FileCenter.swf', 'FileCenter', '750', '320', '', '', '', '', '', 'myValue=10');	[FlashVars set myValue=10]

//_______________________________________________________________________________________________________

example function call in html body:

<script type="text/javascript">

	flashObject('./flash/FileCenter.swf', 'FileCenter', '8', '750', '320', 'best')

</script>

//_______________________________________________________________________________________________________

<*/

flashObject = function(path, id, version, width, height, quality, scaleMode, menu, wmode, bgcolor, value){

	var flashObjectTag = '';
	
	flashObjectTag = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ';
	flashObjectTag += 'codebase="http://fpdownload.macromedia.com/pub/shockwave/';
	flashObjectTag += 'cabs/flash/swflash.cab#version=' + version + ',0,0,0" ';
	flashObjectTag += 'width="' + width + '" height="' + height + '" id="' + id + '" align="middle">';
	
		flashObjectTag += '<param name="allowScriptAccess" value="sameDomain" />';
		flashObjectTag += '<param name="play" value="true" />';
		flashObjectTag += '<param name="loop" value="false" />';
		flashObjectTag += '<param name="movie" value="' + path + '" />';
		
		if(value){
			flashObjectTag += '<param name="FlashVars" value="' + value + '" />';
			var embedFlashvars = 'FlashVars="' + value + '"';
		}
		if(quality){
			flashObjectTag += '<param name="quality" value="' + quality + '" />';
			var embedQuality = ' quality="' + quality + '"';
		}
		if(scaleMode){
			flashObjectTag += '<param name="scale" value="' + scaleMode + '" />';
			var embedScale = ' scale="' + scaleMode + '"';
		}
		if(wmode){
			flashObjectTag += '<param name="wmode" value="' + wmode + '" />';
			var embedWmode = ' wmode="' + wmode + '"';
		}
		if(bgcolor){
			flashObjectTag += '<param name="bgcolor" value="' + bgcolor + '" />';
			var embedBgcolor = ' bgcolor="' + bgcolor + '"';
		}
		
		flashObjectTag += '<embed src="' + path + '"' + embedFlashvars + embedQuality;
		flashObjectTag += embedScale + embedWmode + embedBgcolor + '" width="';
		flashObjectTag += width + '" height="' + height + '" name="' + id + '" align="middle"';
		flashObjectTag += 'allowScriptAccess="sameDomain" type="application/x-shockwave-flash"';
		flashObjectTag += 'pluginspage="http://www.macromedia.com/go/getflashplayer" play="true" loop="false" />';
	
	flashObjectTag += '</object>';
				
	document.write(flashObjectTag);	

};

//_______________________________________________________________________________________________________

function jsPopUp(str){
	
	if(str == 'rtl'){
		var windowLeft = 100;
		var windowTop = 100;
		
		var windowHeight = 366;
		
	}else{
	
		var windowLeft = 550;
		var windowTop = 100;
		
		var windowHeight = 359;
	
	}
	
	var popUp = 'pop' + str;
	var fileLoc = '/cms/upload/videos/html/' + str + '.html';
		
	popUp = window.open(fileLoc, 'Panel' + str, 'width=400,height=' + windowHeight + ',left=' + windowLeft + ',top=' + windowTop + ',toolbar=0,status=0,scrollbars=0,resizable=0,menubar=0,location=0');

	popUp.status='FBM';
};
