// filename: cole_gen.js
// All JavaScript functions needed for the BINE website
// Distributed under the terms of the GNU Library General Public License
// version 1.01 - 2002-02-05
// please document *any* changes exactly!
// author: rmanderbach@3w4u.de

// window.onerror = null

// makeArray() - make new arrays with image objects
function makeArray(n) {
	this.length = n + 1
	for (var i = 1; i<=n; i++) {
		this[i] = new Image()
		}
	return this
	}
	
function pageInit(){
	is = new BrowserCheck();
	}

// form handling with js	
function formSubmit(layername,formname) {
	if (is.ns4) document[layername].document.forms[formname].submit()
	else if (is.ie || is.dom) document.forms[formname].submit()
	}

function formReset(layername,formname) {
	if (is.ns4) document[layername].document.forms[formname].reset()
	else if (is.ie || is.dom) document.forms[formname].reset()
	}

function msOver(num) {
	if (is.ns4 && (num=="0")) document["homeContent"].document.images["weiterbutton"].src = over.src
	if (is.ns4 && (num=="1")) document["genContent"].document.images["weiterbutton"].src = over.src
	else if (is.ie || is.dom) document.images["weiterbutton"].src = over.src;
	}

function msOut(num) {
	if (is.ns4 && (num=="0")) document["homeContent"].document.images["weiterbutton"].src = normal.src
	if (is.ns4 && (num=="1")) document["genContent"].document.images["weiterbutton"].src = normal.src
	else if (is.ie || is.dom) document.images["weiterbutton"].src = normal.src;
	}
	
// popup window
function windowOpener(winUrl,winWidth,winHeight,winName,winX,winY,winScrollbars,winLocation,winStatus,winPersonalbar,winResizable,winToolbar,winMenubar,winDependent,winDirectories) {
	var windowName = ""
	// set defaults
	if (!winName) winName = 'popupWindow'
	if (!winX) winX = 10
	if (!winY) winY = 10
	if (!winScrollbars) winScrollbars = "yes"
	if (!winLocation) winLocation = "no"
	if (!winStatus) winStatus = "no"
	if (!winPersonalbar) winPersonalbar = "no"
	if (!winResizable) winResizable = "no"
	if (!winToolbar) winToolbar = "no"
	if (!winMenubar) winMenubar = "yes"
	if (!winDependent) winDependent = "no"
	if (!winDirectories) winDirectories = "no"
	// open pop-up window
	eval(winName +  '= window.open(winUrl,winName,"width=' + winWidth + ",height=" + winHeight + ",left=" + winX + ",top=" + winY + ",screenX=" + winX + ",screenY=" + winY + ",scrollbars=" + winScrollbars + ",location=" + winLocation + ",status=" + winStatus + ",personalbar=" + winPersonalbar + ",resizable=" + winResizable + ",toolbar=" + winToolbar + ",menubar=" + winMenubar + ",dependent=" + winDependent + ",directories=" + winDirectories + '")') // deleted quotes around winName
	eval(winName).focus();
	}
	
// images for rollover send button

normal = new Image(); normal.src = "img/gen_arrow_right_yellow.gif";
over = new Image(); over.src = "img/gen_arrow_right_blue.gif"


