/*

iomarket.js    v. 1.00

copyright (c) 2000-2005 io-market ag
created 07.07.2005 by io-market ag (web: http://www.io-market.com)
last modified: 07.07.2005


license:

this library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License (LGPL) as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

this library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details on the GNU Lesser General Public License,
see http://www.gnu.org/copyleft/lesser.html

*/

w = window, d = document, mon = (screen) ? screen : false, isit = new String(d.location);

var dd_u = "undefined";

n = navigator.userAgent.toLowerCase();
op = !!(window.opera && document.getElementById);
ie = !!(n.indexOf("msie") >= 0 && document.all && !op);

function io_DD() {
	this.n = navigator.userAgent.toLowerCase();
	this.db = (document.compatMode && document.compatMode.toLowerCase() != "backcompat")?
		document.documentElement
		: (document.body || null);
	this.op = !!(window.opera && document.getElementById);
	this.op6 = !!(this.op && !(this.db && this.db.innerHTML));
	if (this.op && !this.op6) document.onmousedown = new Function('e',
		'if (((e = e || window.event).target || e.srcElement).tagName == "IMAGE") return false;');
	this.ie = !!(this.n.indexOf("msie") >= 0 && document.all && this.db && !this.op);
	this.iemac = !!(this.ie && this.n.indexOf("mac") >= 0);
	this.ie4 = !!(this.ie && !document.getElementById);
	this.n4 = !!(document.layers && typeof document.classes != dd_u);
	this.n6 = !!(typeof window.getComputedStyle != dd_u && typeof document.createRange != dd_u);
	this.w3c = !!(!this.op && !this.ie && !this.n6 && document.getElementById);
	this.ce = !!(document.captureEvents && document.releaseEvents);
}
dd = new io_DD();

// open new window
function io_PopUp(qry, winNam, ww, wh, argRes, argSbar, argStt) {	// popup-fenster
	if (!argRes) {argRes = "yes";}
	if (!argSbar) {argSbar = "yes";}
	if (!argStt) {argStt = "no";}
	var winArgs = "width="+ww+",height="+wh+",scrollbars="+argSbar+",resizable="+argRes+",status="+argStt;
	winArgs = winArgs + ",dependent=yes,dialog=yes,minimizable=no,modal=yes,alwaysRaised=yes";
	var winUrl = (!qry)? d.gloURL+"/popup.cfm" : d.gloURL+"/popup.cfm?"+qry;
	winPop = window.open(winUrl,winNam,winArgs);
	if (winPop) {winPop.focus();winPop.dialogArguments = winArgs;}
}

// delete cookie
function io_ClearCookie(cookieName) {
	var now = new Date();
	yesterday = new Date(now.getTime() - 1000 * 60 * 60 * 24);
	io_SetCookie(cookieName, 'cookieValue', yesterday);
}
// set cookie
function io_SetCookie(cookieName, cookieValue, expires, path, domain, secure) {
	document.cookie =
		escape(cookieName) + '=' + escape(cookieValue)
		+ (expires ? '; expires=' + expires.toGMTString() : '')
		+ (path ? '; path=' + path : '')
		+ (domain ? '; domain=' + domain : '')
		+ (secure ? '; secure' : '');
}
// get cookie
function io_GetCookie(cookieName) {
	var cookieValue = '';
	var posName = document.cookie.indexOf(escape(cookieName) + '=');
	if (posName != -1) {
		var posValue = posName + (escape(cookieName) + '=').length;
		var endPos = document.cookie.indexOf(';', posValue);
		if (endPos != -1) cookieValue = unescape(document.cookie.substring(posValue, endPos));
		else cookieValue = unescape(document.cookie.substring(posValue));
	}
	return (cookieValue);
}

function io_SearchObj(n, d) 
{
	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=io_SearchObj(n,d.layers[i].document);
	if(!x && document.getElementById) x=document.getElementById(n); return x;
}
function io_PreloadImg() 
{
	var d=document; if(d.images){ if(!d.das_p) d.das_p=new Array();
	var i,j=document.das_p.length,a=io_PreloadImg.arguments; for(i=0; i<a.length; i++)	
	if (a[i].indexOf("#")!=0){document.das_p[j]=new Image; document.das_p[j++].src=a[i]; }}
}

function io_ChangeImg() 
{
	var i,j=0,x,a=io_ChangeImg.arguments; document.das_sr=new Array; for(i=0;i<a.length;i++)
	if ((x=io_SearchObj(a[i]))!=null){document.das_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+1];}
}

function io_RestoreImg() 
{
	var i,x,a=document.das_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function io_IsArray(arr) {
	if (arr.constructor.toString().indexOf("Array") == -1) {
		ret = false;
	} else {
		ret = true;	
	}
	return ret;
}