﻿// flash.js 1.0 06.04.2006
//
// Copyright (c) 2006 Carsten Manshusen Softwareentwicklung. All Rights Reserved.
//
// History: 06.04.2006 mac Erzeugung

// Flash-Control erzeugen
function CreateFlashControl(mediaFile, title, width, height) {
  document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
    + ' codebase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"'
    + ' title="' + title + '" width="' + width + '" height="' + height + '">'
    + '<param name="movie" value="' + mediaFile + '" />'
    + '<param name="quality" value="high" />'
    + '<embed src="' + mediaFile + '" quality="high"'
    + ' pluginspage="http://www.macromedia.com/go/getflashplayer"'
    + ' type="application/x-shockwave-flash"'
    + ' width="' + width + '" height="' + height + '"></embed></object>');
}


function maximizeWin()

{
	window.moveTo(0, 0);
	window.resizeTo(screen.width, screen.height);
}



var siteWin = null;

function launchSiteWin(URL, windowName, windowWidth, windowHeight, scrollbars)
{
	var xposition = 400; 
	var yposition = 300;
    if ((parseInt(navigator.appVersion) >= 4 )) {
        xposition = (screen.width - windowWidth) / 2;
        yposition = (screen.height - windowHeight) / 2;
    }

	if (!scrollbars) var scrollbars = 0;

    var args = "width=" + windowWidth + ","

	    	+ "height=" + windowHeight + ","
	    	+ "location=0,"
		    + "menubar=0,"
		    + "scrollbars=" + scrollbars + ","
		    + "status=0,"
		    + "titlebar=0,"
		    + "hotkeys=0,"
		    + "screenx=" + xposition + ","  // NN Only
		    + "screeny=" + yposition + ","  // NN Only
		    + "left=" + xposition + ","     // IE Only
		    + "top=" + yposition;           // IE Only

		

	if (siteWin != null && !siteWin.closed) {
		siteWin.close();
	}

	siteWin = window.open(URL, windowName, args);

	// window.open('haupt_test.html','jasmin','width=800,height=600,resizable=no,scrollbars=no,toolbar=no,directories=no,status=no');

	siteWin.focus();
}



function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function openBrWindow(theURL, winName, features) {
  var brWin = window.open(theURL,winName,features);
  brWin.focus();
}
