function isIE() {
	if (navigator.appName.indexOf('Microsoft') != -1) return true;
	else return false;
} // end function

var gIsIE = isIE();

function hide(c) { 
	if (document.getElementById && document.getElementById(c)!= null) 
		node = document.getElementById(c).style.display='none'; 
	else if (document.layers && document.layers[c]!= null) 
		document.layers[c].display = 'none'; 
	else if (document.all) 
		document.all[c].style.display = 'none'; 
} 

function show(c) { 
	if (document.getElementById && document.getElementById(c)!= null) 
		node = document.getElementById(c).style.display=''; 
	else if (document.layers && document.layers[c]!= null) 
		document.layers[c].display = ''; 
	else if (document.all) 
		document.all[c].style.display = ''; 
}

function popImage(src) {
	var tmpImg = new Image;
	
	// OnLoad
	tmpImg.onload = function() {
		var h = gIsIE == true ? 57 : 47;
		win.resizeTo(tmpImg.width+tmpImg.vspace+5,tmpImg.height+tmpImg.hspace+h); 
		winBody.getElementById('mainImg').src = src;
	} // end function
	
	// OnError
	tmpImg.onerror = function() {
		alert("Sorry, but that current image is not available.  Please try back later.");
	} // end function

	// Open the window
	var win = window.open('','image_holder', 'scrollbars=no,resizeable=yes,menubar=no,statusbar=no,personalbar=no,toolbar=no,width=100,height=100');
	var winBody = win.document;
	winBody.write('<html><head><title>----------</title></head>');
	winBody.write('<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="#FFFFFF">');
	winBody.write('<div align="center">');
	winBody.write('<img src="images/ajax-loader.gif" border="0" id="mainImg" align="absmiddle" />');
	winBody.write('</div></body></html>');
	winBody.close();
	win.focus();
	
	// Try and load the source
	tmpImg.src = src;

} // end function

function popWindow(p,w,h) {
	if (w == null) w = 400;
	if (h == null) h = 400;
	// Open this window
	settings="scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes,width="+w+",height="+h;
	var win=window.open(p,"something",settings);
	win.focus();
}


