/*
 * Allgemeine Funktionen
 *
 * Lars Vogel
 * 2008-02-05
 *
 */
 
 
 
 /*
 * Funktio Landkreise Imagemap Bilderwechsel
 *
 * Lars Vogel
 * 2008-01-29
 *
 */
 
 
function changeDisplay(nr) {
	// Bilder
    var gallery = new Array();
	gallery[0] = "fileadmin/templates/images/regionalkarte/ns/lk_00.jpg";
	gallery[1] = "fileadmin/templates/images/regionalkarte/ns/lk_02_cux.jpg";
	gallery[2] = "fileadmin/templates/images/regionalkarte/ns/lk_03_osterholz.jpg";
	gallery[3] = "fileadmin/templates/images/regionalkarte/ns/lk_04_verden.jpg";
	gallery[4] = "fileadmin/templates/images/regionalkarte/ns/lk_05_rotenburg.jpg";
	gallery[5] = "fileadmin/templates/images/regionalkarte/ns/lk_11_lueneburg.jpg";
	gallery[6] = "fileadmin/templates/images/regionalkarte/ns/lk_12_luechow.jpg";
	gallery[7] = "fileadmin/templates/images/regionalkarte/ns/lk_13_uelzen.jpg";
	gallery[8] = "fileadmin/templates/images/regionalkarte/ns/lk_14_celle.jpg";
	gallery[9] = "fileadmin/templates/images/regionalkarte/ns/lk_15_soltau.jpg";
	gallery[10] = "fileadmin/templates/images/regionalkarte/ns/lk_16_harburg.jpg";
	gallery[11] = "fileadmin/templates/images/regionalkarte/ns/lk_21_hannover.jpg";
	gallery[12] = "fileadmin/templates/images/regionalkarte/ns/lk_22_hameln.jpg";
	gallery[13] = "fileadmin/templates/images/regionalkarte/ns/lk_23_schaumburg.jpg";
	gallery[14] = "fileadmin/templates/images/regionalkarte/ns/lk_24_nienburg.jpg";
	gallery[15] = "fileadmin/templates/images/regionalkarte/ns/lk_25_diepholz.jpg";
	gallery[16] = "fileadmin/templates/images/regionalkarte/ns/lk_31_hildesheim.jpg";
	gallery[17] = "fileadmin/templates/images/regionalkarte/ns/lk_32_holzminden.jpg";
	gallery[18] = "fileadmin/templates/images/regionalkarte/ns/lk_33_northeim.jpg";
	gallery[19] = "fileadmin/templates/images/regionalkarte/ns/lk_34_osterroamharz.jpg";
	gallery[20] = "fileadmin/templates/images/regionalkarte/ns/lk_35_goettingen.jpg";
	gallery[21] = "fileadmin/templates/images/regionalkarte/ns/lk_41_braunschweig.jpg";
	gallery[22] = "fileadmin/templates/images/regionalkarte/ns/lk_42_salzgitter.jpg";
	gallery[23] = "fileadmin/templates/images/regionalkarte/ns/lk_43_goslar.jpg";
	gallery[24] = "fileadmin/templates/images/regionalkarte/ns/lk_44_wolfenbuettel.jpg";
	gallery[25] = "fileadmin/templates/images/regionalkarte/ns/lk_45_peine.jpg";
	gallery[26] = "fileadmin/templates/images/regionalkarte/ns/lk_46_gifhorn.jpg";
	gallery[27] = "fileadmin/templates/images/regionalkarte/ns/lk_47_wolfsburg.jpg";
	gallery[28] = "fileadmin/templates/images/regionalkarte/ns/lk_48_helmstedt.jpg";
	gallery[29] = "fileadmin/templates/images/regionalkarte/ns/lk_01_stade.jpg";

	
	
	self.document.lk_img.src = gallery[nr];
	
}
 




/**
 *  Dreamweaver
 *
 *
 */
function MM_showHideLayers() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
 
 
/**
 * 
 * Tabellen-Background einfärben
 *
 */

function getElementBackgroundOver(element) {

	var app = navigator.appName;
	if (app.indexOf('MSIE')) {
		var ver = parseFloat(navigator.appVersion.slice(navigator.appVersion.indexOf("MSIE")+4,navigator.appVersion.indexOf("MSIE")+8));	
	}
	//alert(ver);
   
   		
       if (app.indexOf('Microsoft') != -1 && ver < 7) {
	       //alert (app+" ich bin drin");
	       //self.document.getElementById(element).runtimeStyle.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fileadmin/templates/images/overlay_act.png', sizingMethod='scale')";
		   self.document.getElementById(element).style.backgroundColor = "#608f58";
	   } else {
		   self.document.getElementById(element).style.backgroundColor = "transparent";
	       self.document.getElementById(element).style.backgroundImage="url(fileadmin/templates/images/overlay_act.png)";
	   }
	   
	   //self.document.getElementById(element).style.backgroundColor="#608f58";
	   self.document.getElementById(element+"_txt").style.color="#fff";
	
}
function getElementBackgroundOut(element) {
	
	var app = navigator.appName;
	if (app.indexOf('MSIE')) {
		var ver = parseFloat(navigator.appVersion.slice(navigator.appVersion.indexOf("MSIE")+4,navigator.appVersion.indexOf("MSIE")+8));	
	}
	
       if (app.indexOf('Microsoft') != -1 && ver < 7) {
	       //alert (app+" ich bin drin");
	       //self.document.getElementById(element).runtimeStyle.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fileadmin/templates/images/overlay_ped.png', sizingMethod='scale')";
		    self.document.getElementById(element).style.backgroundColor = "#e6ded8";
	   } else {
		   self.document.getElementById(element).style.backgroundColor = "transparent";
	       self.document.getElementById(element).style.backgroundImage="url(fileadmin/templates/images/overlay_ped.png)";
	   }
	  
	  //self.document.getElementById(element).style.backgroundColor="#f1e4cc";
	  self.document.getElementById(element+"_txt").style.color="#5a2b0f";
	

}

/* Url aufrufen */
function getUrl(url) {
	window.location.href = url;
}

/* Element einfärben */
function getCellOver(element, color) {

	//alert("licht an: "+status);
    self.document.getElementById(element).style.backgroundColor="#"+color+"";
	self.document.getElementById(element).style.cursor="pointer";

}
function getCellOut(element, color) {

	//alert("licht an: "+status);
    self.document.getElementById(element).style.backgroundColor="#"+color+""; 
}


/* Tabellen-Border einfärben */
function getElementBorderOver(element, color) {
	self.document.getElementById(element).style.border="1px solid " +color;
}
function getElementBorderOut(element, color) {

    self.document.getElementById(element).style.border="1px solid "+color;
}




// Pop Up Fenster oeffnen
function fenster(link,id,w,h) {
	//window.open(name,id,'width='+w+',height='+h);
	window.open(link, id,"resizable=no,scrollbars=no,locationbar=no,menuebar=no,status=yes,height="+h+",width="+w+", top="+((screen.height/2)-(h/1.5))+", screenY="+((screen.height/2)-(h/1.5))+", left="+((screen.width/2)-(+w/2))+",screenX="+((screen.width/2)-(+w/2)));
}


/**
 *  Pop Up Fenster Werbung oeffnen
 *
 *
 */

function windowAd(link,id,w,h) {
	//window.open(name,id,'width='+w+',height='+h);
	window.open(link, id,"resizable=no,scrollbars=no,locationbar=no,menuebar=no,status=no,height="+h+",width="+w+", top="+((screen.height/2)-(h/1.5))+", screenY="+((screen.height/2)-(h/1.5))+", left="+((screen.width/2)-(+w/2))+",screenX="+((screen.width/2)-(+w/2)));
}


//Pop-UP Fenster 
function popUp(link, name) {
    var w  = 540;
	var h = 700;
	//alert("top="+((screen.height/2)-(h/1.5))+", left="+((screen.width/2)-(+w/2))+"");
 	if (link!=null && name!=null) {
	    window.open(link, name,"resizable=no,scrollbars=yes,locationbar=no,menuebar=no,status=no,height="+h+",width="+w+", top="+((screen.height/2)-(h/1))+", screenY="+((screen.height/2)-(h/1.5))+", left="+((screen.width/2)-(+w/2))+",screenX="+((screen.width/2)-(+w/2)));
		//window.open(link, name,"resizable=no,scrollbars=yes,locationbar=no,menuebar=no,status=no, height="+height+", width="+width+",left="((screen.width/2-(width/2))",top="((screen.height/2)-(height/1.5)));
	} else {
    	// DEBUG
		alert("Link oder Fensternahme fehlt");
	}
}


