//neu by nex


var nav=navigator.appName;
var ver=navigator.appVersion;
var dom=document.getElementById? true:false;
var ie=(ver.indexOf("MSIE")>-1)? true:false;
var ie4=(document.all && !dom)? true:false;
var ns=(nav.indexOf("Netscape")>-1)? true:false;
var ns4=(ns && (parseFloat(ver)> 4.00) && !dom)? true:false; 
var op=((nav.indexOf("Opera")>-1) && (parseFloat(ver)> 5.00) && dom)? true:false;
var old=(!dom && !ie4 && !ns4) ? true:false;

//
// Javascript Error Trap
//
function errMsg(msg, url, line) {
    if (url) msg +="\n\nUrl: ["+url+"]";
    if (line) msg +="\nLine: ["+line+"]";
 //   alert("dhtml-lib::Error Trap \n\n"+msg);
    }
window.onerror=errMsg;

//
// alertStatus() :: Javascript Status Alert
//
function alertStatus(){
    var str='Your browser claims to be:\n\n';
    str+='Client: '+nav+'\n';
    str+='Version: '+ver+'\n';
    str+='Monitor Resolution: '+screen.width+'x'+screen.height+'px\n';
    str+='Color Depth: '+Math.pow(2,screen.colorDepth)+' - '+screen.colorDepth+'bit\n';
    if (!old) {
        str+='Active Window: '+getWindowWidth()+'x'+getWindowHeight()+' px\n';
        str+='Scroller: '+getScrollX()+'x'+getScrollY()+' px\n';
        if (mouseX||mouseY) str+='Mouse Position: '+mouseX+'x'+mouseY+' px\n';
        else str+='Mouse Capture Event is not started\n';
        }
    str+='++++++++++++++++++++++++++++\n';
    if(ie)str+='Internet Explorer\n';
    if(ie4)str+='IE4 - document.all\n';
    if(ns)str+='Netscape Navigator\n';
    if(ns4)str+='Netscape v4.x\n';
    if(op)str+='Opera\n';
    if(old)str+='No support by this library!!\n';
    if(dom)str+='DOM Support (Document Object Model)\n';
    str+='++++++++++++++++++++++++++++\n';
    alert(str);
    }

if (old) alertStatus();

//
//  IE_push support for IE - Original at javascript.faqts.com
//
if (Array.prototype && !Array.prototype.push)  Array.prototype.push = IE_push;

function IE_push () {
  for (var a = 0; a < arguments.length; a++)   this[this.length] = arguments[a];
  return this.length;
  } 

function hover(id,url,win) {
    if (old) return;
    if (!win) win=self;
	var obj=win.document.images[id];
	if (!obj) return errMsg("hover: Image ["+id+"] is not found!");
	obj.src=url;
	}

function wPop(url,specs){
    if (old) return;
	if (!specs) specs="width="+getWindowWidth()*0.8+",height="+getWindowHeight()*0.8+",scrollbars=1,resizable=1";
	var wp=window.open(url,"wPop",specs);
	wp.focus();
	}

function getCookie(name) {
	var re = new RegExp(name + "=([^;]+)");
	var value = re.exec(document.cookie);
	return (value != null) ? unescape(value[1]) : null;
	}

function setCookie(name,value,days,path,ask) {
    if (old) return;
	var cookie = name + "=" + escape(value);
	if (!path) path="/";
	cookie += "; path="+path;
	if (days) {
    	var today = new Date();
		var exp = new Date(today.getTime() + days * 24 * 60 * 60 * 1000);
	    cookie += "; expires=" + exp.toGMTString();
	    }
	if (ask) {
	    if(confirm("Javascript Library will try to set a Cookie.\nCookie: "+cookie+"\n\nAre you sure?"))
	        document.cookie=cookie;
	    } 
	else document.cookie=cookie;
	}

function getScrollX(win) {
    if (old) return null;
	if (!win) win=self;
	if (ie) return win.document.body.scrollLeft;
	else if (ns || dom) return win.pageXOffset;
	}

function getScrollY(win) {
    if (old) return null;
	if (!win) win=self;
	if (ie) return win.document.body.scrollTop;
	else if (ns || dom) return win.pageYOffset;
	}

function getWindowWidth(win) {
    if (old) return null;
	if (!win) win=self;
	if (ie) return win.document.body.clientWidth;
	else if ( ns || dom) return win.innerWidth;
	}

function getWindowHeight(win) {
    if (old) return null;
	if (!win) win=self;
	if (ie) return win.document.body.clientHeight;
	else if (ns || dom) return win.innerHeight;
	}

function setWindow(w,h, win) {
    if (old) return;
	if (!win) win=self;
	win.resizeTo(w,h);
	}

function setWindowMin(win) {
    if (old) return;
	if (!win) win=self;
	//win.resizeTo(0,0);
	}


function setWindowMax(win) {
    if (old) return;
	if (!win) win=self;
	win.moveTo(0,0)
	win.resizeTo(screen.availWidth,screen.availHeight);
	}

//
// Mouse capture defaults
// This is an example, you can use the default handler 
// or write your own :-)

var mouseX=0;
var mouseY=0;
var mouseShow=false;
var mouseHandler=null;
var isHandler=false;
var oWin=null; 

function getMouseMove(evt) {
    if (old) return;
	if (ns) { mouseX=evt.pageX;	mouseY=evt.pageY; }
	else if (ie||op) {	mouseX=oWin.event.clientX; mouseY=oWin.event.clientY; }
	else if (dom){ mouseX=oWin.evt.clientX;	mouseY=oWin.evt.clientY;	}
	else { mouseX = mouseY = 0; }
	if (mouseShow) oWin.status="Capture Mouse Move Event at : "+mouseX+" x "+mouseY;
	if (isHandler) mouseHandler(mouseX,mouseY);
	}

function startMouseCapture(show,win,handler) {
    if (old) return;
    if (!win) win=self;
    if (ie && oWin) stopMouseCapture(oWin); 
    else if (ns && oWin) oWin.status="";
    oWin=win;
    if (show) mouseShow=true;
    if (ns4) win.document.captureEvents(Event.MOUSEMOVE);
    if (handler) { mouseHandler=handler; isHandler=true; }
    win.document.onmousemove=getMouseMove;
    }

function stopMouseCapture(win) {
    if (old) return;
    win=(!ns && oWin)? oWin : (!win)? self : win;
    if (oWin && mouseShow) oWin.status="";
	win.document.onmousemove=null; 
    }
// end of Mouse capture
//

function writeLayer(id,txt,win) {
    if (old) return;
    if(!win) win=self;
	obj=win.getLayer(id);
	if (ns4){
		obj.document.open();
		obj.document.write(txt);
		obj.document.close();
		}else{
		obj.innerHTML=txt;
		}
	}

function showLayer(id,win) {
    if (old) return;
    if(!win) win=self;
	obj=win.getLayer(id);
	if (ns4) obj.style=obj;
	obj.style.visibility="visible";
	}

function hideLayer(id,win) {
    if (old) return;
    if(!win) win=self;
	obj=win.getLayer(id);
	if (ns4) obj.style=obj;
	obj.style.visibility="hidden";
	}

function isVisible(id,win) {
    if (old) return null;
    if(!win) win=self;
	obj=win.getLayer(id);
	if (ns4) obj.style=obj;
	var vis=obj.style.visibility.toLowerCase();
	return (vis=="visible")? true : false;
	}

function moveLayer(id,x,y,win) {
    if (old) return;
    if(!win) win=self;
	obj=win.getLayer(id);
	if (ns4) obj.moveTo(x,y);
	else if (ie||dom){
		obj.style.left = x + "px";
		obj.style.top = y + "px";
		}
	}

function moveLayerBy(id,x,y,win) {
    if (old) return;
    if(!win) win=self;
	obj=win.getLayer(id);
	if (ns4) obj.style=obj;
	var _x=parseInt(obj.style.left);
	var _y=parseInt(obj.style.top);
	moveLayer(id, _x+x, _y+y, win);
	}

function setTrans(id,val,win) {
    if (old||ns4) return;
    if(!win) win=self;
    val=(!val||val<0)? 0:(val>100)? 100 : val;
    obj=win.getLayer(id);
    if (ns && dom) obj.style.MozOpacity=val/100;
    else obj.style.filter="alpha(opacity="+val+")";
    }

function getLayerWidth(id,win) {
    if (old) return null;
    if(!win) win=self;
	obj=win.getLayer(id);
	if(ns4) return obj.clip.width;
	else if(ie) return obj.clientWidth;
	else if(dom) return obj.offsetWidth;
	}
function getLayerHeight(id,win) {
    if (old) return null;
    if(!win) win=self;
	obj=win.getLayer(id);
	if(ns4) return obj.clip.height;
	else if(ie) return obj.clientHeight;
	else if(dom) return obj.offsetHeight;
	}

function getLayerTop(id,win) {
    if (old) return null;
    if(!win) win=self;
    obj=win.getLayer(id);
    if(ns4) obj.style=obj;
    return obj.style.top;
    }

function getLayerLeft(id,win) {
    if (old) return null;
    if(!win) win=self;
    obj=win.getLayer(id);
    if(ns4) obj.style=obj;
    return obj.style.left;
    }

function getLayer(id) {
	if (ns4) return getNS4Layer(id);
	else if (ie4) return document.all[id];
	else if (dom) return document.getElementById(id);
	return null;
	}

function getNS4Layer(id) {
	var i, ii, layer, layerin;
  	for (i = 0; i < document.layers.length; i++) {
		layer = document.layers[i];
    	if (layer.name == id) return layer;
		if (layer.document.layers.length > 0) {
		  	for (ii = 0; ii < layer.document.layers.length; ii++) {
	  			layerin = layer.document.layers[ii];
				if (layerin.name == id) return layerin;
				}
			}
	    }
	return null;
    }
//-------------------------------------------------------------------------
// DSC - Description Javascript - Dynamic PopUp
// Requares dhtml-lib.js > 09.2003
//-------------------------------------------------------------------------
// Author: Panos Galanis  <pg@iap.de>
// Stand: 17.Sep.2003
//
//-------------------------------------------------------------------------
// Edit Values by your needs!
//-------------------------------------------------------------------------

var posX=16;			      	// Positioning DSC from X-mouse
var posY=10;			      	// Positioning DSC from Y-mouse
var tablewidth=200;			// DSC - Width
var tableborder=1;			// DSC - Border in px
var tablepadding=3;			// DSC - Table Padding in px
var tablespacing=0;			// DSC - Border Space in px
var tablecolor="#f6f6f6";		// DSC - Background Color
var tabletitlecolor="#7684DD";		// DSC - Title Background Color
var tablebordercolor="#767676";		//1E1D57 DSC - Border Color
var fontface="Verdana, Arial";		// DSC - Family Font
var fontsize=10;			// DSC - Font Size in pixels
var fontcolor="#000000";		// DSC - Font Color
var fonttitlecolor="#616171";		// DSC - Title Font Color
var fonttitlebold=true;			// DSC - Title Bold
var on=true;				// DSC - ON or OFF
var dofade=true;			// DSC - Fade Effect for IE, Ns6 & Mozilla!
var stable=true;			// DSC - Stable after PopUp !
var maxopac=90;				// DSC - Maximum Layer Opacity !

//-------------------------------------------------------------------------
// Dont Edit Under This .... only if you know what you are doing
//-------------------------------------------------------------------------
var dscheight,wx,wy,nox,noy;
var isloaded=false;
var ishover=false;
var ismoved=false;
var ieop=0;
var op_id=0;

// WIDTH='+tablewidth+'
function showD(text,title){
    if(isloaded && text && on){
		ishover=true;
		var out='';
		if(ns4) out+='<table width=0 cellspacing=0 cellpadding='+tableborder+' bgcolor='+tablebordercolor+'><tr><td>';
		out+='<TABLE WIDTH='+tablewidth+' BORDER=0 CELLPADDING='+tablepadding+' CELLSPACING='+tablespacing;
		if(!ns4) out+=' style="border: '+tableborder+'px #767676 solid">';
		if(ns4) out+='>';
		if(title){
			out+='<tr><td nowrap="nowrap" style="color:'+fonttitlecolor+';background:#fff url(http://geocaster.com/images/sub_bg.jpg) repeat-x top left;"><span style="padding:0;margin:0;font-weight:bold; font-family:'+fontface+'; font-size:'+fontsize+'px; color:'+fonttitlecolor+'">';
			if(fonttitlebold){out+=''+title+'';}else{out+=title;}
			out+='</span></td></tr>';
			}
		out+='<tr><TD BGCOLOR='+tablecolor+'><font style="font-family:'+fontface+'; font-size:'+fontsize+'px; color:'+fontcolor+'">';
		out+=text;
		out+='</FONT></TD></TR></TABLE>';
		if(ns4) out+='</td></tr></table>';
		writeLayer("dsc",out);
		dscheight=getLayerHeight("dsc");
   	  	wx=getWindowWidth();
		wy=getWindowHeight();
   		nox=tablewidth+tablepadding+tablespacing+30;
   		noy=dscheight+tablepadding+tablespacing+15;
		if(!ns4 && dofade){	ieop=0;	incropacity();	}
		}
	}

function hideD(){
    if(isloaded){
    	if(dofade)clearTimeout(op_id);
    	hideLayer("dsc");
    	ishover=false;
    	ismoved=false;
    	}
    }

function incropacity(){
    if(ieop<maxopac){
    	ieop+=10;
    	setTrans("dsc",ieop);
    	op_id=setTimeout('incropacity()', 30);
    	}else{
    	clearTimeout(op_id);
    	}
    }

function moveobj(x,y){
	if(isloaded && ishover && on){
		fixy=getScrollY();
		fixx=getScrollX();
		if (ie) {
		    if (x+nox >= wx) x=x-nox;
		    if (y+noy >= wy) y=y-noy;
		    }else{
		    if (x+nox-fixx >= wx) x=x-nox;
		    if (y+noy-fixy >= wy) y=y-noy;
		    fixy=0; fixx=0;
		    }
		if (!ismoved) moveLayer("dsc",x+posX+fixx,y+posY+fixy);
		if (stable) ismoved=true;
 		if (!isVisible("dsc")) showLayer("dsc");
		}
	}

if (ns4) document.write("<layer name='dsc' visibility='hidden' z-index='99'></layer>");
else if (!old) document.write("<div id='dsc' style='position:absolute; visibility:hidden; z-index:99;'></div>");
startMouseCapture(false,self,moveobj);
isloaded=true;
