function MM_openBrWindow(theURL,winName,features) { //v2.0

 child =  window.open(theURL,winName,features);

 if( self.focus ) child.focus();

  return false;

}



function MM_BeWindow(theURL,winName,features) { //v2.0

 bchild =  window.open(theURL,winName,features);

 if( self.focus ) bchild.focus();



}



function MM_openChatWindow(theURL,winName,features) { //v2.0

chat =  window.open(theURL,winName,features);	 

if( self.focus ) 

 	chat.focus();

return false;

}





function OpenWindow(strZiel, strName, intWidth)

{	// If txteintag has a value, the lookup window starts in month of the date 

    

    if ((document.getElementById("wysiwyg").termin.value != " ") && (document.getElementById("wysiwyg").termin.value != "") && (strName == "Auswahl1"))

    {	

		var elemente = document.getElementById("wysiwyg").termin.value.split(".");

		var intMonth = elemente[1];

		var intYear = elemente[2];

		strZiel = strZiel + "&year=" + intYear + "&month=" + intMonth;

    }



    

    Test = window.open(strZiel, strName, 'width='+intWidth+',height=150,scrollbars=no,resizable=yes');

	if( self.focus ) Test.focus();

    if (document.all)

	{

		var ClickX = window.event.x;

		var ClickY = window.event.y;

		if (navigator.appVersion.indexOf("MSIE 5")>0 )

		{

			Test.moveTo(ClickX+window.screenLeft+5, ClickY+window.screenTop-50);

		}

	}



}



function OpenWindow2(strZiel,  strName, intWidth)

{	// If txteintag has a value, the lookup window starts in month of the date 

    var intBreite = '300';

    var intHoehe = '300';	

	

    if ((document.getElementById("wysiwyg").vtermin.value != " ") && (document.getElementById("wysiwyg").vtermin.value != "") && (strName == "Auswahlv"))

    {	

		var elemente = document.getElementById("wysiwyg").vtermin.value.split(".");

		var intMonth = elemente[1];

		var intYear = elemente[2];

		strZiel = strZiel + "&year=" + intYear + "&month=" + intMonth;

		intHoehe = '150';

		intBreite = intWidth;

    }



    

    Test = window.open(strZiel, strName, 'width='+intBreite+',height='+intHoehe+',scrollbars=yes,resizable=yes');

	if( self.focus ) Test.focus();

    if (document.all)

	{

		var ClickX = window.event.x;

		var ClickY = window.event.y;

		if (navigator.appVersion.indexOf("MSIE 5")>0 )

		{

			Test.moveTo(ClickX+window.screenLeft+5, ClickY+window.screenTop-50);

		}

	}



}

/* $Id: vso.js,v 1.8 2004/11/11 09:31:19 Kurowski_Be Exp $ */





/**

 * Displays an confirmation box beforme to submit a "DROP/DELETE/ALTER" query.

 * This function is called while clicking links

 *

 * @param   object   the link

 * @param   object   the sql query to submit

 *

 * @return  boolean  whether to run the query or not

 */





/**

 * This array is used to remember mark status of rows in browse mode

 */

var marked_row = new Array;





/**

 * Sets/unsets the pointer and marker in browse mode

 *

 * @param   object    the table row

 * @param   interger  the row number

 * @param   string    the action calling this script (over, out or click)

 * @param   string    the default background color

 * @param   string    the color to use for mouseover

 * @param   string    the color to use for marking a row

 *

 * @return  boolean  whether pointer is set or not

 */

function setPointer(theRow, theRowNum, theAction, theDefaultColor, thePointerColor, theMarkColor)

{

    var theCells = null;



    // 1. Pointer and mark feature are disabled or the browser can't get the

    //    row -> exits

    if ((thePointerColor == '' && theMarkColor == '')

        || typeof(theRow.style) == 'undefined') {

        return false;

    }



    // 2. Gets the current row and exits if the browser can't get it

    if (typeof(document.getElementsByTagName) != 'undefined') {

        theCells = theRow.getElementsByTagName('td');

    }

    else if (typeof(theRow.cells) != 'undefined') {

        theCells = theRow.cells;

    }

    else {

        return false;

    }



    // 3. Gets the current color...

    var rowCellsCnt  = theCells.length;

    var domDetect    = null;

    var currentColor = null;

    var newColor     = null;

    // 3.1 ... with DOM compatible browsers except Opera that does not return

    //         valid values with "getAttribute"

    if (typeof(window.opera) == 'undefined'

        && typeof(theCells[0].getAttribute) != 'undefined') {

        currentColor = theCells[0].getAttribute('bgcolor');

        domDetect    = true;

    }

    // 3.2 ... with other browsers

    else {

        currentColor = theCells[0].style.backgroundColor;

        domDetect    = false;

    } // end 3



    // 4. Defines the new color

    // 4.1 Current color is the default one

    if (currentColor == ''

        || currentColor.toLowerCase() == theDefaultColor.toLowerCase()) {

        if (theAction == 'over' && thePointerColor != '') {

            newColor              = thePointerColor;

        }

        else if (theAction == 'click' && theMarkColor != '') {

            newColor              = theMarkColor;

            marked_row[theRowNum] = true;

        }

    }

    // 4.1.2 Current color is the pointer one

    else if (currentColor.toLowerCase() == thePointerColor.toLowerCase()

             && (typeof(marked_row[theRowNum]) == 'undefined' || !marked_row[theRowNum])) {

        if (theAction == 'out') {

            newColor              = theDefaultColor;

        }

        else if (theAction == 'click' && theMarkColor != '') {

            newColor              = theMarkColor;

            marked_row[theRowNum] = true;

        }

    }

    // 4.1.3 Current color is the marker one

    else if (currentColor.toLowerCase() == theMarkColor.toLowerCase()) {

        if (theAction == 'click') {

            newColor              = (thePointerColor != '')

                                  ? thePointerColor

                                  : theDefaultColor;

            marked_row[theRowNum] = (typeof(marked_row[theRowNum]) == 'undefined' || !marked_row[theRowNum])

                                  ? true

                                  : null;

        }

    } // end 4



    // 5. Sets the new color...

    if (newColor) {

        var c = null;

        // 5.1 ... with DOM compatible browsers except Opera

        if (domDetect) {

            for (c = 0; c < rowCellsCnt; c++) {

                theCells[c].setAttribute('bgcolor', newColor, 0);

            } // end for

        }

        // 5.2 ... with other browsers

        else {

            for (c = 0; c < rowCellsCnt; c++) {

                theCells[c].style.backgroundColor = newColor;

            }

        }

    } // end 5



    return true;

} // end of the 'setPointer()' function





function MM_findObj(n, d) { //v4.01

  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {

    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];

  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);

  if(!x && d.getElementById) x=d.getElementById(n); return x;

}



function MM_changeProp(objName,x,theProp,theValue) { //v6.0

  var obj = MM_findObj(objName);

  if (obj && (theProp.indexOf("style.")==-1 || obj.style)){

    if (theValue == true || theValue == false)

      eval("obj."+theProp+"="+theValue);

    else eval("obj."+theProp+"='"+theValue+"'");

  }

}



var editor = null;

function initEditor() {

  editor = new HTMLArea("body");

  editor.config.pageStyle = "@import url(http://online.verbundstudium.de/phorum_addon/vso_ta.css);";

  setTimeout(function() {

    editor.generate();

  }, 500);

  return false;

}



function insertHTML() {

  var html = prompt("Enter some HTML code here");

  if (html) {

    editor.insertHTML(html);

  }

}

function highlight() {

  editor.surroundHTML('<span style="background-color: yellow">', '</span>');

}





var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;

function Film42_DoFSCommand(command, args) {

  var jetzt = new Date();

  var Film42Obj = InternetExplorer ? Film42 : document.Film42;

  //

  	if (command == "chat") {

//		alert(args);

		neu = window.open("http://online.verbundstudium.de/"+args,'oregano_popup','scrollbars=yes,resizable=yes,width=610,height=550');

		neu.focus();

	}

	if (command == "box") {

		alert("VS:online ("+jetzt.getHours()+":"+jetzt.getMinutes()+"Uhr) : Benutzer(in) "+args+" hat Sie zum Chat eingeladen. \nKlicken Sie in der Menüleiste von VS:online auf 'Chatfenster öffnen' um in den Chat zu gelangen.\n\n\n\nWenn Sie ungestört arbeiten möchten, ohne dass andere Benutzer die Möglichkeit haben Sie einzuladen, klicken Sie auf das bunte Icon neben 'Chat'. Das Icon wird dann grau dargestellt, was bedeutet, dass Sie für andere Benutzer nicht mehr erreichbar sind. \nVS:online merkt sich diese Einstellung bis Sie sie wieder umstellen.");

	}

}



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 Film42_FSCommand(ByVal command, ByVal args)\n');

	document.write('  call Film42_DoFSCommand(command, args)\n');

	document.write('end sub\n');

	document.write('</SCRIPT\> \n');

}

