var imgs = new Array(
	'/images/thumb1.jpg',
	'/images/thumb2.jpg',
	'/images/thumb3.jpg',
	'/images/thumb4.jpg',
	'/images/thumb5.jpg',
	'/images/thumb6.jpg'
);
var noImgs = imgs.length;
var imgNo = Math.round(Math.random()*(noImgs-1));

function showImage(){
	document.write('<img src="'+imgs[imgNo]+'" />');
}

function popup(page) {
	this.open(page, "CtrlWindow", "status=no,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,width=700,height=614");
	return false;
}

var url = window.location.href;
if(url.indexOf('print') != -1) {
	var i, a;
	for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
		if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("media") ) {
			if(a.getAttribute("media") == "print") {
				a.setAttribute("media",'all');
			} else {
				//a.disabled = true;
			}
		}
	}
}


function ezcolrow(el) {
	var ele = document.getElementById(el);
	for(x = 1; x < ele.rows.length; x++) {
		ele.rows[x].style.height = "20px"
		if (x%2 == 0) {
			ele.rows[x].style.backgroundColor = "#EBF1E4";
		} else {
			ele.rows[x].style.backgroundColor = "#FFFFFF";
		}
	}
}


function currentURL() {
	return location.href;
}

function updatePrintURL(el) {
	var url = currentURL();
	url += (url.indexOf("?") != -1) ? '&print' : '?print' ;
	el.setAttribute("href",url);
}
