function showPopupImgWindow(im,w,h,alt){
	imgwindow = window.open('',"_blank","resizable=no,menubar=no,status=no,top=30,left=100;scrollbars=no,width="+w+",height="+h);
	imgwindow.document.open("text/html");
	imgwindow.document.writeln('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>'+alt+'<\/title><style type="text/css" title="">* {padding:0;margin:0;background:#fff;}<\/style><\/head>');
	imgwindow.document.writeln('<body onBlur="self.close()"><div onclick="self.close();"><img src="'+im+'" width="'+w+'" height="'+h+'" alt="'+alt+'" border="0" align="left" \/><\/div><\/body><\/html>');
	imgwindow.document.close();
	imgwindow.focus();
}

function showPopupContWindow(txt,w,h,alt){
	imgwindow = window.open('',"_blank","resizable=no,menubar=no,status=no,top=30,left=100;scrollbars=no,width="+w+",height="+h);
	imgwindow.document.open("text/html");
	imgwindow.document.writeln('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>'+alt+'<\/title><style type="text/css">body {padding:10px;margin:0;background:#fff;}<\/style><\/head>');
	imgwindow.document.writeln('<body>'+txt+'<\/div><\/body><\/html>');
	imgwindow.document.close();
	imgwindow.focus();
}

function showPopupWindow(path,w,h){
	win = window.open(path,"_blank","resize=yes,resizable=yes,menubar=no,status=no,top=30,left=100,scrollbars=yes,width="+w+",height="+h);
	win.focus();
}

function getElementbyClass(ro, cln){
var tmp=new Array();
var inc=0;
for (i=0; i<ro.length; i++){
	if (ro[i].className==cln) tmp[inc++]=ro[i]}return tmp
}

window.onload = function() {
	if (!document.getElementsByTagName) return false;
	var elms = document.getElementsByTagName('a');
	cl=getElementbyClass(elms, 'popup');
	for (var i = 0; i < cl.length; i++) {
		cl[i].onclick = function() {showPopupImgWindow(this.getAttribute("href"),this.getAttribute("w"),this.getAttribute("h"));return false;}
	}
}

function pch(img) {
if ( document.images ) {
	document.images['gp'].src = img;
}}

function addFilter(form,url){var el,res='';for(var i=0;i<form.elements.length;i++){el=form.elements[i];if(el.nodeName.toLowerCase()=="input"&&el.type.toLowerCase()=="checkbox"){if(el.name=="ch[]"&&el.checked==true)res=res+el.value}}res=((res=="")?1234:res);document.location.replace(url+res+'/');return false}
function showHideDiv (id){var el=document.getElementById(id);if(el.offsetHeight){jQuery(el).hide('normal');}else{jQuery(el).show('normal');}}
function slideHideDiv (id){var el=document.getElementById(id);if(el.offsetHeight){jQuery(el).hide();}else{jQuery(el).slideDown('slow');}}

function getSelVal(dos) {var z = 0;for (var i = 0; i < dos.options.length; i++)if (dos.options[i].selected)z = dos.options[i].value;return z;}