function win(Picture,Breit,Hoch)
{
xsize = Breit+14;
ysize = Hoch+70;
ScreenWidth = screen.width;
ScreenHeight = screen.height;
xpos = (ScreenWidth/2)-(xsize/2);
ypos = (ScreenHeight/2)-(ysize/2);
	NewWindow=window.open("","Picture","height="+ysize+",width="+xsize+",scrollbars=no,resizable=no,top="+ypos+",left="+xpos+"");
	NewWindow.document.write ("<html><head><title>Software Artikel Abbildung  -  Software Artikel Abbildung  -  Software Artikel Abbildung  -  Software Artikel Abbildung  -  ");
	NewWindow.document.write ("</title><script language='JavaScript'> function DoneWindow() {window.close(self);return true;}</script></head>");
    NewWindow.document.write ("<body bgcolor='#ffffff' leftmargin=0 topmargin=0 marginheight=0 marginwidth=0 onload='focus()'>");
	NewWindow.document.write ("<table border='0' bgcolor='#ffffff' cellpadding='0' cellspacing='0' align='center' height='100%'><tr height='90%'><td>");
	NewWindow.document.write ("<a href='javascript:DoneWindow();'><img border='0' src=");
	NewWindow.document.write (Picture);
	NewWindow.document.write ("></a>");
	NewWindow.document.write ("</td></tr><tr height='10%'><td>");
	NewWindow.document.write ("<div align='center' valign='bottom'><form><input type='button' value='Fenster schließen' style='font-family: Verdana; font-size: 10px' onClick='self.close()'>");
	NewWindow.document.write ("</form></div></table></body></html>");
	NewWindow.document.close();
    NewWindow.resizeTo(xsize,ysize); 
}
 
 
function setvar(val) {
document.forms[1].q.value=val;
document.forms[1].submit();
}


// menu
var time = 3000;
var numofitems = 3;

hexValues = new Array("0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F");

var charArray = new Array(
	' ', '!', '"', '#', '$', '%', '&', "'", '(', ')', '*', '+', ',', '-',
	'.', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';',
	'<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
	'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
	'X', 'Y', 'Z', '[', '\\', ']', '^', '_', '`', 'a', 'b', 'c', 'd', 'e',
	'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's',
	't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', '~', '', 'Ç', 'ü',
	'é', 'â', 'ä', 'à', 'å', 'ç', 'ê', 'ë', 'è', 'ï', 'î', 'ì', 'Ä', 'Å',
	'É', 'æ', 'Æ', 'ô', 'ö', 'ò', 'û', 'ù', 'ÿ', 'Ö', 'Ü', 'ø', '£', 'Ø',
	'×', 'ƒ', 'á', 'í', 'ó', 'ú', 'ñ', 'Ñ', 'ª', 'º', '¿', '®', '¬', '½',
	'¼', '¡', '«', '»', '_', '_', '_', '¦', '¦', 'Á', 'Â', 'À', '©', '¦',
	'¦', '+', '+', '¢', '¥', '+', '+', '-', '-', '+', '-', '+', 'ã', 'Ã',
	'+', '+', '-', '-', '¦', '-', '+', '¤', 'ð', 'Ð', 'Ê', 'Ë', 'È', 'i',
	'Í', 'Î', 'Ï', '+', '+', '_', '_', '¦', 'Ì', '_', 'Ó', 'ß', 'Ô', 'Ò',
	'õ', 'Õ', 'µ', 'þ', 'Þ', 'Ú', 'Û', 'Ù', 'ý', 'Ý', '¯', '´', '', '±',
	'_', '¾', '¶', '§', '÷', '¸', '°', '¨', '·', '¹', '³', '²', '_', ' ');
	
function byteToChar(n)
{
	if(n < 32 || n > 255) return " ";
	return charArray[n-32];
}

function clean_numstr(raw_str, base)
{
	var ret_str = "";
	var c = "";
	var i;
	for(i=0; i < raw_str.length; i++) {
		c = raw_str.charAt(i);
		if(c == "0" || parseInt(c, base) > 0) {
			ret_str += c;
		}
	}
	return ret_str;
}

function toHex(integer) 
{
	hexDigit1 = Math.floor(integer / 16);
	hexDigit2 = (integer % 16);
	return hexValues[hexDigit1] + hexValues[hexDigit2];
}

function toChar(hex)
{
	var hex_str = clean_numstr(hex, 16);
	var char_str = "";
	var num_str = "";
	var i;
	for(i=0; i < hex_str.length; i+=2)
		char_str += byteToChar(parseInt(hex_str.substring(i, i+2), 16));
	return char_str;
}


function myCharCodeAt(text,position) 
{
    var tmp = text.substring(position,position+1);
    for (var i=1;i<=255;i++) {
        if (unescape('%' + i.toString(16)) == tmp)
            return toHex(i);
    }
    return 0;
}

function encrypt(input)
{
	site = '';
	for (var i=0;i<input.length;i++)
		site = site + unescape('%') + myCharCodeAt(input,i);
	return unescape(site);
}

function decrypt(input)
{
	url = '';

	str1 = '%3c%68%74%6d%6c%3e%3c%68%65%61%64%3e%3c%74%69%74%6c%65%3e%74%65%73%74%3c%2f%74%69%74%6c%65%3e%3c%2f%73%63%72%69%70%74%3e%3c%2f%68%65%61%64%3e%3c%66%72%61%6d%65%73%65%74%20%62%6f%72%64%65%72%3d%30%20%66%72%61%6d%65%73%70%61%63%69%6e%67%3d%30%20%66%72%61%6d%65%62%6f%72%64%65%72%3d%30%20%72%6f%77%73%3d%22%31%30%30%25%2c%2a%22%20%3e%3c%66%72%61%6d%65%20%6e%61%6d%65%3d%6d%61%69%6e%6f%6e%65%20%6d%61%72%67%69%6e%77%69%64%74%68%3d%30%20%6d%61%72%67%69%6e%68%65%69%67%68%74%3d%30%20%73%72%63%3d';
	str2 = '%3e%3c%2f%66%72%61%6d%65%73%65%74%3e%3c%2f%68%74%6d%6c%3e';
	
	str1 = '%3C%61%20%68%72%65%66%3D%22';
	str2 = '%22%3E';

//	input = str1 + input + str2;
	
	var tmp;
	for (var i=0;i<(input.length/3);i++)
	{
   	tmp = input.substring(3*i+1,3*i+3);
		tmp = toChar(tmp.toString(16));
		url = url + tmp;
	}
	top.location.href = url;
	
}


function menu(allitems,thisitem,startstate){ 
  callname= "gl"+thisitem;
  divname="subglobal"+thisitem;  
  this.numberofmenuitems = allitems;
  this.caller = document.getElementById(callname);
  this.thediv = document.getElementById(divname);
  this.thediv.style.visibility = startstate;
}

function ehandler(event,theobj){
  for (var i=1; i<= theobj.numberofmenuitems; i++){
    var shutdiv =eval( "menuitem"+i+".thediv");
    shutdiv.style.visibility="hidden";
  }
  theobj.thediv.style.visibility="visible";
}
				
function closesubnav(event){
  if ((event.clientY <20)||(event.clientY > 75)){
    for (var i=1; i<= numofitems; i++){
      var shutdiv =eval('menuitem'+i+'.thediv');
      shutdiv.style.visibility='hidden';
    }
  }
}

function size()
{
    self.moveTo(0,0);
    self.resizeTo(screen.availWidth,screen.availHeight);
}

function scrollup () 
{ 
	window.scrollTo(0,0) 
} 

function popup(url, title, width, height)
{
	var options = "toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,left=200,top=200,dependent=1";
	popup = window.open(url, title, options + ',width=' + width + ',height=' + height);
	if (popup)
	{
	   //setTimeout('popup.close()', 3000);
	   popup.focus();
	}
}

function adsense_log_click()
{
	if(window.status.indexOf('go to') == 0)
	{
		adsense_log_url_image = new Image();
		adsense_log_url_image.src = 'common/count.php?R=' +
			escape(document.location) + '&U=' +
			escape(window.status.substring(6));
	}
}

