var popUpWin=0;


function sh_popup(URLStr,widthw,heightw)
{
  var width=(widthw>0) ? widthw:380;
  var height=(heightw>0) ? heightw:470;
  var left = parseInt((screen.availWidth/2) - (width/2));
  var top = parseInt((screen.availHeight/2) - (height/2));

  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = open(URLStr+'?popup', 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

 
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

var preloadFlag = false;

function popImage(imageURL,imgTitle) {
	imageURL=location.protocol+'//'+location.host+imageURL;
	var defWidth=0.75*screen.availWidth;
	var defHeight=0.75*screen.availHeight;
	var defWidth1=10;
	var defHeight1=10;
	var f="width="+defWidth1+",height="+defHeight1;	
	f+=",left="+((screen.availWidth-defWidth)/2)+",scrollbars=yes,resizable=yes,top="+((screen.availHeight-defHeight)/2);
	imgWin=window.open('about:blank','',f);
	imDoc=imgWin.document;
	with (imDoc) {
		writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
		writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
		writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
		writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
		writeln('width=100-(document.body.clientWidth-document.images[0].width);if (width>0.75*screen.availWidth) width=0.75*screen.availWidth;');
		writeln('height=100-(document.body.clientHeight-document.images[0].height);if (height>0.75*screen.availHeight) height=0.75*screen.availHeight;');
		writeln('window.resizeTo(width,height);}');writeln('else {');       
		writeln('window.innerWidth=document.images["George"].width<0.75*screen.availWidth ? document.images["George"].width:0.75*screen.availWidth;');
		writeln('window.innerHeight=document.images["George"].height<0.75*screen.availHeight ? document.images["George"].height:0.75*screen.availHeight;}}');
		writeln('function doTitle(){document.title="'+imgTitle+'";}');
		writeln('function resize(img){if (img.width > 800) img.width = 800;}');
		writeln('</sc'+'ript>');
		writeln('</head><body bgcolor="#FFFFFF" onload="reSizeToImage();doTitle();self.focus()">')
		writeln('<img name="George" src='+imageURL+' onload="resize(this)" style="display:block"></body></html>');
		
		close();
	}
}


function sitemap_open(img, id){
	if (document.getElementById(id).style['display']=='block'){
		document.getElementById(id).style['display']='none';
		img.src='/images/index/plus.gif';
	}
	else{		
		document.getElementById(id).style['display']='block';
		img.src='/images/index/minus.gif';
	}	
}


//-------------------------------------------

var Browser = {
    IE:     !!(window.attachEvent && !window.opera),
    Opera:  !!window.opera,
    WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1,
    Gecko:  navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1,
    MobileSafari: !!navigator.userAgent.match(/Apple.*Mobile.*Safari/)
}


function fixPNG(element){
	if (/MSIE (5\.5|6).+Win/.test(navigator.userAgent))	{
		var src;
		if (element.tagName=='IMG') {
			if (/\.png$/.test(element.src))	{
				if (element.className != "alpha"){				
					element.width = element.clientWidth;
					element.height = element.clientHeight;
					//src = element.src;
					//element.src = "/images/x.gif";
					element.className = "alpha";
				}
			}
		}
		else{
			src = element.currentStyle.backgroundImage.match(/url\("(.+\.png)"\)/i);
			if (src){
				element.width = element.clientWidth;
				element.height = element.clientHeight;
				src = src[1]; 
				element.runtimeStyle.backgroundImage="none"; 
			}
		}
		
		if (src) element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "',sizingMethod='crop')";
	}
}


function qF(id){
	if(!document.getElementById(id))
		return;
		
	var qf = document.getElementById(id);
	qf.firstChild.style.visibility = "hidden";
	
	qf.onmouseover=function(){
		this.className+="_a";
		this.firstChild.style.display = "block";
		this.firstChild.style.visibility = "visible";

	}
	
	qf.onmouseout=function() {
		this.className=this.className.replace(new RegExp("_a"), "");
		this.firstChild.style.display = "none";
	}
	
	qf.onclick=function() {
		if(Browser.Gecko){
			this.className=this.className.replace(new RegExp("_a"), "");
			this.firstChild.style.visibility = "hidden";
		}
	}
}

function qfover(id, src){	
	id.childNodes[0].src = '/images/gf_de/'+src+'_a.png'; 
	id.childNodes[1].src = '/images/splash/qfbulla.png';
	
}

function qfout(id, src){
	id.childNodes[0].src = '/images/gf_de/'+src+'.png'; 
	id.childNodes[1].src = '/images/splash/qfbull.png';
	
}

function qf1over(id, src){	
	id.childNodes[0].src = '/images/gf_de/'+src+'_a.png';
}

function qf1out(id, src){
	id.childNodes[0].src = '/images/gf_de/'+src+'.png';;
}

function m1over(id, src){
	id.childNodes[0].src = src;
	id.childNodes[1].src = '/images/index/menu2sep_a.gif';
	
}

function m1out(id, src){
	id.childNodes[0].src = src;
	id.childNodes[1].src = '/images/index/menu2sep.gif';
}

