/* navigation script programmed by www.fastforward.ch websolutions will scheidegger will@fastforward.ch, feel free to use this script as long as you include this credit */

// browser and plug-in check
var browserCheck = (((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 3 )) || ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 )));
var flashCheck = 0;
if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) {
	if (navigator.plugins && navigator.plugins["Shockwave Flash"])
		flashCheck = 1;
}

var imgDir = '/images/nav/';
var imgPre = 'nav_';
var imgExt = '.gif';
var activeImg;	// kennzeichnet den "aktuellen" navigationsknopf

// preloading ab hier...
var images = new Array;
var test = 0;
for (i=0; i<imgNames.length; i++) {
	images[i] = new Array;	// 2-dimensionales Array (Bild, Bildtyp)
	images[i][0] = new Image();
	images[i][0].src = imgDir + imgPre + imgNames[i] + '_out' + imgExt;
	if (images[i][0]) test++;
	images[i][1] = new Image();
	images[i][1].src = imgDir + imgPre + imgNames[i] + '_over' + imgExt;
	if (images[i][1]) test++;
	images[i][2] = new Image();
	images[i][2].src = imgDir + imgPre + imgNames[i] + '_click' + imgExt;
	if (images[i][2]) test++;
}

function swappImage(imgID, imgType) {
	if (browserCheck) {
		if (imgType==0) {
			if (imgID==activeImg) {
				// nicht austauschen!
			} else {
				eval('self.document.images.m' + imgID + '.src="' + imgDir + imgPre + imgNames[imgID] + '_out' + imgExt+ '"');
			}
		} else if (imgType==1) {
			if (imgID==activeImg) {
				// nicht austauschen!
			} else {
				eval('self.document.images.m' + imgID + '.src="' + imgDir + imgPre + imgNames[imgID] + '_over' + imgExt+ '"');
			}
		} else {
			if (imgID==activeImg) {
				// nicht austauschen!
			} else {
				eval('self.document.images.m' + imgID + '.src="' + imgDir + imgPre + imgNames[imgID] + '_click' + imgExt+ '"');
			}
		}
    }
}

function popUp(newurl, width, height) {
	var options = "toolbar=no,location=no,directories=no,status=no,scrollbars=yes,hscroll=no, resizable=no,copyhistory=no,height=" + height + ",width=" + width;
	newWindow = window.open(newurl,'note',options);
}

/*function password(){
	Ret=prompt('Enter the password',"");
	if(Ret=="wwsa1997"){
		location='/e/dealers_access/login/';
	}else{
		alert("Wrong password! Please try again or contact Wenger Watch S.A. to obtain a valid password.")
	}
}*/
