﻿<!--
	/* ------------------------------------------- 
	Scripting & Programming
	Mathis Burkart
	Platzhalter.ch
	mburkart@platzhalter.ch
	------------------------------------------- */

var today = new Date(); 
var zero_date = new Date(0,0,0); 
today.setTime(today.getTime() - zero_date.getTime()); 
var cookie_expire_date = new Date(today.getTime() + (8 * 7 * 86400000)); 

function setCookie(nav,subnav) { 
	var name = 'nav_cookie';
	var value = nav+'/'+subnav;
	var expires = new Date(today.getTime() + (8 * 7 * 86400000)); 
	var path = '/';
	var domain = '';
	var secure = '';
    var cookieString = name + "=" +escape(value) + 
       ( (expires) ? ";expires=" + expires.toGMTString() : "") + 
       ( (path) ? ";path=" + path : "") + 
       ( (domain) ? ";domain=" + domain : "") + 
       ( (secure) ? ";secure" : ""); 
    document.cookie = cookieString; 
}

	
if(!click_img) {
	var click_img = 0;
}

if (!countStart) {
	var countStart = 1;
}
if (!withNr) {
	var withNr = 0;
}
if (!color) {
	var color = "";
	
}

		function nav_rollover(imgNr,color) {
			if(click_img != imgNr) {
				if (!color) color ="";
				var imageName = 'navImg' +  imgNr;
				if(color == "") {
					if(withNr == 0) {
						var SwappImage = img_path + navImgName + '_on.gif';
					} else {
						var SwappImage = img_path + navImgName + imgNr + '_on.gif';
					}	
					//alert("color : " + SwappImage);
				} else {
					if(withNr == 0) {
						var SwappImage = img_path + navImgName + color +"_"+ '_on.gif';
					} else {
						var SwappImage = img_path + navImgName + color +"_"+ imgNr + '_on.gif';
					}	
					//alert("no color : " + SwappImage);
				}
				document.images[imageName].src = SwappImage;
				if(document.getElementById) {
					try{
						var infoText = "linktitle" + imgNr;
  						document.getElementById(infoText).style.visibility = "visible";
  					} catch(e) {
  					} finally {
  					}
  				}
			}
			
		}
		
		function nav_rollout(imgNr,color) {
			if(click_img != imgNr) {	
				if (!color) color ="";
				var imageName = 'navImg' +  imgNr;
				if(color == "") {
					if(withNr == 0) {
						var SwappImage = img_path + navImgName + '.gif';
					} else {
						var SwappImage = img_path + navImgName + imgNr + '.gif';
					}	
				} else {
					if(withNr == 0) {
						var SwappImage = img_path + navImgName + color +"_"+ '.gif';
					} else {
						var SwappImage = img_path + navImgName + color +"_"+ imgNr + '.gif';
					}	
				}
				document.images[imageName].src = SwappImage;
				if(document.getElementById) {
					try{
						var infoText = "linktitle" + imgNr;
  						document.getElementById(infoText).style.visibility = "hidden";
  					} catch(e) {
  					} finally {
  					}
  				}
			}
		}	
		
		function nav_click(imgNr,color) {
			click_img = imgNr;
			setbgColor(color); // nav hintergrundfarbe ndern
			nav_reset(imgNr,color);
			if(document.getElementById) {
				try{
					var infoText = "linktitle" + imgNr;
  					document.getElementById(infoText).style.visibility = "hidden";
  				} catch(e) {
  				} finally {
  				}
  			}
		}
		
		function nav_reset(imgNr,color) {
			for(i= countStart;i <= nav_img; i++) {
				var imageName = 'navImg' +  i;
					if(withNr == 0) {
						var SwappImage = img_path + navImgName + '.gif';
					} else {
						var SwappImage = img_path + navImgName + i + '.gif';
					}	
				if(i != click_img) {
					document.images[imageName].src = SwappImage;
				}
			}
		}
		
		
		function setbgColor(color) {
			if(top.frames.length > 0) {
				if (!color) { color ="";}
				if(color != "") {
					document.bgColor = "#" + color;
				} else {
					document.bgColor = "#ffffff";
				}
			}
		}
		
// ----------------- rollover / rollout / reset navigation	
		
				function subnav_rollover(imgNr,color) {
			if(subclick_img != imgNr) {
				var imageName = 'subNavImg' +  imgNr;
				if (!color) color ="";
				if(color == "") {
					var SwappImage = subimg_path + subNavImgName + '_on.gif';
				} else {
					var SwappImage = subimg_path + color +"_"+ subNavImgName + '_on.gif';
				}
				document.images[imageName].src = SwappImage;
			}
			
		}
		
		function subnav_rollout(imgNr,color) {
			if(subclick_img != imgNr) {	
				var imageName = 'subNavImg' +  imgNr;
				if (!color) color ="";
				if(color == "") {
					var SwappImage = subimg_path + subNavImgName + '.gif';
				} else {
					var SwappImage = subimg_path + color +"_"+ subNavImgName + '.gif';
				}
				document.images[imageName].src = SwappImage;
			}
		}
//-->
