// JScript source code

var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
var videopopup_w = 340;
var videopopup_h = 260;


function printpreview(site) {
	printversion = window.open(site,'printversion','width=675,height=550,resizeable=yes,scrollbars=yes,menubar=yes,toolbar=yes');
}

function showroom(site) {
	showroom = window.open(site,'showroom','width=675,height=550,resizeable=yes,scrollbars=no,menubar=no,toolbar=no');
}

function openWin(file){
 if (file.indexOf('.jpg') != -1 || file.indexOf('.gif') != -1 || file.indexOf('.png') != -1) {
    newwindow = window.open(file, "newwindow", optionsPopup); 
 }
 else if (file.indexOf('.flv') != -1) {
  var url = '/includes/videoplayer/popupplaying.php?file=' + file;	
  video=window.open(url,'video','width='+videopopup_w+',height='+videopopup_h+',resizable,status=no, toolbar=no, menubar=no, scrollbars=no, location=no, top='+(screen.availWidth - videopopup_w)/2+', left='+(screen.availHeight - videopopup_h)/2+'');
  video.moveTo((screen.availWidth - videopopup_w)/2,(screen.availHeight - videopopup_h)/2);
  video.focus();	 
 }
 else if (file.indexOf('.mp3') != -1) {
  var url = '/41B/media/audios/audio_popup_playing.php?file=' + file;	
  audio=window.open(url,'audio','width=210,height=110,noresize,status=no, toolbar=no, menubar=no, scrollbars=no, location=no, top=5, left=5');
  //audiopopup.moveTo((screen.availWidth - videopopup_w)/2,(screen.availHeight - videopopup_h)/2);
  audio.focus();	 
 } 
 else if (file.indexOf('/bilder/ssp/index.php') != -1 || file.indexOf('/bilder/ssp/#') != -1) {
  var url = file;		 
  ssp=window.open(file,'ssp','width=815,height=540, resizable, status=no, toolbar=no, menubar=no, scrollbars=no, location=no');
  ssp.focus();
 } 
 else
   newwindow = window.open(file, "newwindow", "scrollbars=yes,resizable=yes,menubar=yes,location=no,width=600,height=480");
}

// Verarbeiten der FSCommand-Meldungen im Flash-Film popupplaying (Video)
function popupplaying_DoFSCommand(command, args) {
	alert("Test");
	var popupplayingObj = isInternetExplorer ? document.all.popupplaying : document.popupplaying;
	// Geben Sie hier Ihren Code ein.
	if (command == "resize") {
 	  if (args == "fullscreen") {
		  window.moveTo(0,0);
		  window.resizeTo(screen.availWidth, screen.availHeight);
	  }
	  else if (args == "normal") {
		  window.resizeTo(videopopup_w, videopopup_h+40);		  
		  window.moveTo((screen.availWidth - videopopup_w)/2,(screen.availHeight - videopopup_h)/2);		  
	  }
	}
	//
}
// Hook für Internet Explorer.
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub video_popup_playing_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call video_popup_playing_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}
//-->
