CheckBrowser();

function CheckBrowser(){
	ieBrowser=false;
	opBrowser=false;
	moBrowser=false;
	CheckOpera();
	if(!opBrowser){
		if(document.all){
			ieBrowser=true;
		}
		else{
			moBrowser=true;
		}
	}
}

function CheckOpera(){
	try{
		a=opera.name;
		opBrowser=true;
	}
	catch(e){
		opBrowser=false;
	}
}

function autoHeight() {
	try{
		colLeft=document.getElementById("columnLeft");
		colCenter=document.getElementById("columnCenter");
		colRight=document.getElementById("columnRight");
		colAll=document.getElementById("columnAll");
		
		if(ieBrowser && document.all.wrapContent) {
			document.all.wrapContent.style.height = '380px';
		}
		if(ieBrowser && colCenter) {
			colCenter.style.height = '420px';
		}
		
		if(colLeft && colCenter) {
			if(ieBrowser){
				colCenter.style.height = Math.max(colLeft.offsetHeight,colCenter.offsetHeight)+'px';
			}
			else{
				colCenter.style.minHeight = Math.max(colLeft.offsetHeight,colCenter.offsetHeight)+'px';
			}
		}
		if(colRight && colCenter) {
			if(ieBrowser){
				colCenter.style.height = Math.max(colRight.offsetHeight,colCenter.offsetHeight)+'px';
			}
			else{
				colCenter.style.minHeight = Math.max(colRight.offsetHeight,colCenter.offsetHeight)+'px';
			}
		}
		if(colLeft && colAll) {
			if(ieBrowser){
				colAll.style.height = Math.max(colLeft.offsetHeight,colAll.offsetHeight)+'px';
			}
			else{
				colAll.style.minHeight = Math.max(colLeft.offsetHeight,colAll.offsetHeight)+'px';
			}
		}
    }
    catch(e){}
}

function getScreen() {
    this.height = screen.height;
    this.width = screen.width;
    this.center = screen.availWidth/2;
    this.middle = (screen.availHeight-30)/2;
}

function zoomThumb(imageID,w,h,cid){
	sc = new getScreen();
	if(!w){w=300;}
	if(!h){h=200;}
	
	if (document.layers) {
	  window.open(imagePath,'');
	} else {
		newW=Math.min(screen.availWidth,w+36);
		newH=Math.min(screen.availHeight-30,h+60);
		features ='width='+newW+',height='+newH+',left='+(sc.center-(newW/2))+',top='+(sc.middle-(newH/2))+',resizable,scrollbars,status=no';
		msgWindow=window.open("zoom.aspx?img="+imageID+"&cid="+cid,"",features);
	}
	if(msgWindow){
		if(window.focus) {
			msgWindow.window.focus();
		}
	}
	else{
		alert('Cannot open window!\r\nTry to disable pop-up blocker.');
	}
}

function showPrint(printPage){
	features ="width=750,height=600,left=10,top=10,resizable,scrollbars,menubar";//toolbar,
	msgWindow=window.open(printPage,"print",features);
	if(msgWindow){
		if(window.focus) {
			msgWindow.window.focus();
		}
	}
	else{
		alert('Cannot open window!\r\nTry to disable pop-up blocker.');
	}
}
document.write('                                                                ');