
agt=navigator.userAgent.toLowerCase();
ie=(document.all) ? 1:0
	ie4=(agt.indexOf('msie 4')!=-1) ? 1:0
	ie5=(agt.indexOf('msie 5')!=-1) ? 1:0
	ns4=(document.layers && parseInt(navigator.appVersion)>=4) ? 1:0

latest=(document.getElementById) ? 1:0
	opera=(agt.indexOf("opera")!=-1) ? 1:0
	gecko=(agt.indexOf("gecko")!=-1) ? 1:0
   ie55=(agt.indexOf("msie 5.5")!=-1) ? 1:0
   ie6=(agt.indexOf("msie 6")!=-1) ? 1:0
   ie7=(agt.indexOf("msie 7")!=-1) ? 1:0

	win=( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) )
	mac=(agt.indexOf("mac")!=-1);
   imgs=(document.images) ? 1:0

//browser vars
ie = ie4 || ie5 || ie6 || ie7;
ns = (ns4)?1:0
best=(latest)?1:0

function fixpng(_el){
      var img = _el
      var imgName = img.src.toUpperCase()
      if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
      {
         var imgID = (img.id) ? "id='" + img.id + "' " : ""
         var imgClass = (img.className) ? "class='" + img.className + "' " : ""
         var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
         var imgStyle = "display:inline-block;" + img.style.cssText 
         if (img.align == "left") imgStyle = "float:left;" + imgStyle
         if (img.align == "right") imgStyle = "float:right;" + imgStyle
         if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
         var strNewHTML = "<span " + imgID + imgClass + imgTitle
         + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
         + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
         + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
         img.outerHTML = strNewHTML
			}
}

function showmedia(_id,_w,_h){
	window.open('photo_view.asp?id='+_id,'_blank','toolbars=0,scrollbars=0,width='+_w+',height='+_h)
}

function showmediapress(_id,_w,_h){
	window.open('photo_view_press.asp?id='+_id,'_blank','toolbars=0,scrollbars=0,width='+_w+',height='+_h)
}