function popup (url, name, scroll, resize, width, height) {
	window.open(url, name,"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars="+scroll+",resizable="+resize+",width="+width+",height="+height);		
}

function rollSetup() {
	var img, hover, norm, down
	for (var i = 0; (img = document.images[i]); i++) {
		if (img.getAttribute) {

			norm = img.getAttribute("src");
			hover = img.getAttribute("hsrc");
			down = img.getAttribute("dsrc");

			if (norm != "" && norm != null) {
				img.n = new Image();
				img.n.src = img.src;
			
				if (hover != "" && hover != null) {
					img.h = new Image();
					img.h.src = hover;
					img.onmouseover = rollSwapOn
					img.onmouseout  = rollSwapOff
				}

				if (down != "" && down != null) {
					img.d = new Image();
					img.d.src = down;
					img.onmousedown = rollSwapDown
				}
			}
		}
	}
}

function rollSwapOn() {
	this.src = this.h.src;
}

function rollSwapOff() {
	this.src  = this.n.src;
}

function rollSwapDown() {
	this.src  = this.d.src;
	this.temp = typeof(document.onmouseup) != 'undefined' && typeof(document.onmouseup) != 'unknown' ? document.onmouseup : "";
	rollSwapUp.img = this;
	document.onmouseup = rollSwapUp;
}

function rollSwapUp() {
	var ths = rollSwapUp.img;
	ths.src = ths.norm.src;
	if (ths.temp) document.onmouseup = ths.temp;
}

function privacy () {
	window.open('privacy.php','privacy','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=0,width=525,height=500,top=50,left=50');
}

function openAdmin () {
	window.open('admin.php','admin','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=0,width=525,height=500,top=50,left=50');
}

function set (element) {
	if (element.value == "Your email address") {
		element.value = "";
	}
}

var os;
		
os = navigator.userAgent;
		
function printWin() {
	if (os.lastIndexOf("Win")!=-1) {
		window.print();
	} else {
		alert("To print this page click on File -> Print");
	}
}
