function MachakFull(Ie,other){
//Copyright © 1999 m.milicevic machakjoe@netscape.net jjooee@tip.nl
x=screen.availWidth;
y=screen.availHeight;
target = parseFloat(navigator.appVersion.substring(navigator.appVersion.indexOf('.')-1,navigator.appVersion.length));
if((navigator.appVersion.indexOf("Mac")!=-1) &&(navigator.userAgent.indexOf("MSIE")!=-1) &&(parseInt(navigator.appVersion)==4))
window.open(other,"sub",'scrollbars=yes');
if (target >= 4){
	if (navigator.appName=="Netscape") {
	    var MachakFull=window.open(other,"MachakFull",'scrollbars=yes','width='+x+',height='+y+',top=0,left=0');
		MachakFull.moveTo(0,0);
		MachakFull.resizeTo(x,y);
	}
	if (navigator.appName=="Microsoft Internet Explorer")
		window.open(Ie,"MachakFull","fullscreen=yes");
	} else window.open(other,"sub",'scrollbars=yes');
}

function openWindow( myurl, my_width, my_height) {
	/* USAGE: 
	<a href="javascript: openWindow('popupURL.html','width','height');"></a>
	*/
	if (navigator.appName == "Netscape" && navigator.appVersion<=5) {
		new_window = window.open("",
		        "newWindow",
		        "resizable=0,toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,copyhistory=0,innerWidth="+my_width+",innerHeight="+my_height);
	} else {
		new_window = window.open("",
		        "newWindow",
		        "resizable=0,toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,copyhistory=0,width="+my_width+",height="+my_height);
	}
	new_window.location = myurl;
	new_window.focus();
}

function WM_imageSwap(daImage, daSrc){
	var objStr,obj;
	/*
	WM_imageSwap()
	Changes the source of an image.
	
	Source: Webmonkey Code Library
	(http://www.hotwired.com/webmonkey/javascript/code_library/)
	
	Author: Shvatz
	Author Email: shvatz@wired.com
	
	Usage: WM_imageSwap(originalImage, 'newSourceUrl');
	
	Requires: WM_preloadImages() (optional, but recommended)
	Thanks to Ken Sundermeyer (ksundermeyer@macromedia.com) for his help
	with variables in ie3 for the mac. 
	*/
	// Check to make sure that images are supported in the DOM.
	if(document.images){
		// Check to see whether you are using a name, number, or object
		if (typeof(daImage) == 'string') {
			// This whole objStr nonesense is here solely to gain compatability
			// with ie3 for the mac.
			objStr = 'document.' + daImage;
			obj = eval(objStr);
			obj.src = daSrc;
		} else if ((typeof(daImage) == 'object') && daImage && daImage.src) {
			daImage.src = daSrc;
		}
	}
}

function WM_preloadImages() {
	/*
	WM_preloadImages()
	Loads images into the browser's cache for later use.
	
	Source: Webmonkey Code Library
	(http://www.hotwired.com/webmonkey/javascript/code_library/)
	
	Author: Nadav Savio
	Author Email: nadav@wired.com
	
	Usage: WM_preloadImages('image 1 URL', 'image 2 URL', 'image 3 URL', ...);
	*/
	// Don't bother if there's no document.images
	if (document.images) {
		if (typeof(document.WM) == 'undefined'){
			document.WM = new Object();
		}
		document.WM.loadedImages = new Array();
		// Loop through all the arguments.
		var argLength = WM_preloadImages.arguments.length;
		for(arg=0;arg<argLength;arg++) {
			// For each arg, create a new image.
			document.WM.loadedImages[arg] = new Image();
			// Then set the source of that image to the current argument.
			document.WM.loadedImages[arg].src = WM_preloadImages.arguments[arg];
		}
	}
}

