function maske_go(id){
	var index;
	index=eval("this.document.dropdown" + id + ".list" + id + ".selectedIndex");
	self.location=eval("this.document.dropdown" + id + ".list" + id + ".options["+index+"].value");
	return false;
}

function maske_home(id){
        var index;
        index=eval("this.document.dropdown" + id + ".list" + id + ".selectedIndex");
        url=eval("this.document.dropdown" + id + ".list" + id + ".options["+index+"].value");
	window.open(url);
        return false;
}

function partnertest(id) {
        var index;
        index=eval("this.document.signtest.ptest.selectedIndex");	
	url = this.document.location.pathname;
	self.location= url + "?sid=" + id + "&type=Partnertest&sid2=" + index; 
}

function supersizeWin(path, name) {
        screenWidth = screen.availWidth;
        screenHeight = screen.availHeight;

        browser=navigator.userAgent;
        if ((browser.indexOf("MSIE")!=-1)) {
                width = screenWidth - 12;
                height = screenHeight - 40;
        } else {
                width = screenWidth;
                height = screenHeight;
        }
//      url = path + "/" + imageid + "_" + screenWidth + "x" + screenHeight + ".html";

        window.open(path+"?width="+width+"&height="+height,"Supersize","width=" + width + ",height=" + height + ",left=0,top=0,location=no,menubar=noscrollbars=auto,status=no,toolbar=no,resizable=yes");
        return false;
}


function open_win(url, name, param) {
        var win = window.open(url, name, param);
        win.focus();
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
	
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
	
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_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

/***
 * Javascript Flash Detection (14.02.2005)
 * (c) Oliver Nowak
 * http://www.deydesigns.com
 *
 *
 *
 * Nicht vergessen, credits where they are due.
 */

function flash_detection(required, max)
{
    var required_version = required;
    var max_version = max;
    var available_version = 0;


     if(typeof(navigator.plugins["Shockwave Flash"]) == "object")
    {
        var description = navigator.plugins["Shockwave Flash"].description;
        available_version = description.substr(16, (description.indexOf(".", 16) - 16));
    }
     else  if(typeof(ActiveXObject) == "function")
    {
         for(var i = 2; i < (max_version + 1); i ++)
        {
            try
            {
                 if(typeof(new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + i)) == "object")
                {
                    available_version = i;
                }
           }
           catch(error)
           {
           }
        }
    }
    return [available_version, required_version];
}


function ChangeColor(tag,nr,out) {
	for (i=1;i<=5;i++) {
		var myTag = document.getElementById(tag+'-'+i);
		if (myTag) {
			if (nr == i) {
				document.getElementById(tag+'-'+nr).style.border= 'solid 2px rgb(108,92,81)';
				if (out == '0') {
				document.getElementById(tag+'-'+nr).style.border= 'solid 2px rgb(195,193,180)';
				}
			}		
		} else break;
	}
}

function ChangeColor7(tag,nr,out) {
        for (i=1;i<=7;i++) {
                var myTag = document.getElementById(tag+'-'+i);
                if (myTag) {
                        if (nr == i) {
                                document.getElementById(tag+'-'+nr).style.border= 'solid 2px rgb(108,92,81)';
                                if (out == '0') {
                                document.getElementById(tag+'-'+nr).style.border= 'solid 2px rgb(195,193,180)';
                                }
                        }
                } else break;
        }
}


function changeWin ( url) {
	window.location.href = url;
}

function showIcon(status) {
	var myTag = document.getElementById('lupe');
	if (myTag) {
		document.getElementById('lupe').style.display= 'block';
		if (status == '0') document.getElementById('lupe').style.display= 'none';
	} 
}
