// lightview style pop up
var pid;
function hidePop() { document.getElementById('bopop').style.visibility = 'hidden';document.getElementById(pid).style.display = 'none';ie6Form('visible'); }
function showPop(nid) { 
	if (document.getElementById('bopop').style.visibility == 'visible') { hidePop(); }
	getPageSize();
	document.getElementById('fade').style.height=pageHeight;
	document.getElementById(nid).style.display = 'block';
	document.getElementById('bopop').style.visibility = 'visible';
	pid=nid;
	ie6Form('hidden'); 
} 
var pageWidth,pageHeight;
function getPageSize() {	        
    var xScroll, yScroll;	
	if (window.innerHeight && window.scrollMaxY) {	xScroll = window.innerWidth + window.scrollMaxX;yScroll = window.innerHeight + window.scrollMaxY; } 
	else if (document.body.scrollHeight > document.body.offsetHeight){ xScroll = document.body.scrollWidth;yScroll = document.body.scrollHeight; } 
	else { xScroll = document.body.offsetWidth;yScroll = document.body.offsetHeight; }	
	var windowWidth, windowHeight;	
	if (self.innerHeight) {	// all except Explorer
		if(document.documentElement.clientWidth){ windowWidth = document.documentElement.clientWidth; } 
		else { windowWidth = self.innerWidth;	}
		windowHeight = self.innerHeight;
	} 
	else if (document.documentElement && document.documentElement.clientHeight) { windowWidth = document.documentElement.clientWidth;windowHeight = document.documentElement.clientHeight; } 
	else if (document.body) { windowWidth = document.body.clientWidth;windowHeight = document.body.clientHeight; }		
	if(yScroll < windowHeight){	pageHeight = windowHeight; } else { pageHeight = yScroll; }
	if(xScroll < windowWidth){ 	pageWidth = xScroll; } else { pageWidth = windowWidth; }
	return [pageWidth,pageHeight];	
}

function ie6Form(state) {	
	if (document.all) {
		var version=/MSIE \d+.\d+/;var brwsr=navigator.appVersion.match(version);
		if ((""+brwsr).indexOf("6")>0) {
			var frmInput=new Array();frmInput=document.getElementsByTagName("input");var stop1=frmInput.length;
			for (var i=0;i<stop1;i++) { frmInput[i].style.visibility=state;	}
			var frmSelect=new Array();frmSelect=document.getElementsByTagName("select");var stop2=frmSelect.length;
			for (var i=0;i<stop2;i++) { frmSelect[i].style.visibility=state; }
			var frmTextarea=new Array();frmTextarea=document.getElementsByTagName("textarea");var stop3=frmTextarea.length;
			for (var i=0;i<stop3;i++) { frmTextarea[i].style.visibility=state; }
		}		
	}
	var flashBits=new Array();flashBits=document.getElementsByTagName("embed");var stopflash=flashBits.length;
	for (var i=0;i<stopflash;i++) { flashBits[i].style.visibility=state;	}
}
