
//---------------------------------------------------------
// popup for popup images, called from any image
// takes image path as argument and returns a html page with that image.
// supporting cgi file: /cgi-bin/pop_image.cgi
var Pwin
function popImage(name) { 
	var p = "http://triplearadio.com/cgi-bin/pop_image.cgi?image=" + name;
Pwin = window.open(p,'Pwin','width=450,height=460,scrollbars=0,resizable=no,toolbar=no,top=100,left=100');
this.Pwin.focus(); 
}

//-------------------------------------------------------
// Legacy popup for image click to enlarge
// for Netscape 3+ and IE 4+

// --------------------- global variables
var pic = null
var popImg = null  
var picTitle = null
var imgCount = 0
var imgWinName = "popImg"
var priorPic = new Array()
var noPic = 0

function winOpen(){
  if(popImg != null){ 
    if(popImg.closed != true) return true; else return false
    }  
  else
    return false
}

function ImgPopUp(picName,winTitle,winWidth,winHeight){
// -- If existing pic with same name, pop it up
// -- else create new window & pop it up

  if(pic == picName && winOpen()){
    popImg.focus()
    }
  else{

// -- close any pop up windows now open 
  if (navigator.appName != "Microsoft Internet Explorer" 
      || parseInt(navigator.appVersion) >=4) //do not close if early IE
    if(popImg != null) if(!popImg.closed) popImg.close() 

// -- build new pop up window
    pic = picName
    picTitle = winTitle
    imgWinName = "popImg" + imgCount++ //unique name for each pop-up window
    popImg = window.open("",imgWinName,
             "toolbar=no,scrollbars=no,resizable=no,width=" 
	+ winWidth + ",height=" + winHeight)
   var outStr = '<HTML><HEAD><TITLE>' + picTitle + '</TITLE></HEAD>'
   outStr += '<BODY background=' + pic + '></BODY></HTML>'

   popImg.document.open()
   popImg.document.write(outStr)
   popImg.document.close()
   }
}
//-------------------------------------------------------
		
//------------------------------------------------------------------------
// findDom js required for showBanner()

var isDHTML = 0; 
var isLayers = 0;
var isAll = 0;
var isID = 0;

if (document.getElementById) {isID = 1; isDHTML = 1;}
else {
browserVersion = parseInt(navigator.appVersion);
if ((navigator.appName.indexOf('Netscape') != -1) && (browserVersion == 4)) {isLayers = 1; isDHTML = 1;}
else {
if (document.all) {isAll = 1; isDHTML = 1;}
}}

function findDOM(objectID,withStyle) {
var menuArea = "menuArea";
	if (withStyle == 1) {
		if (isID) { return (document.getElementById(objectID).style) ; }
		else { 
			if (isAll) { return (document.all[objectID].style); }
		else {
			if (isLayers) { return (document.layers[menuArea].layers[objectID]); }
		};}
	}
	else {
		if (isID) { return (document.getElementById(objectID)) ; }
		else { 
			if (isAll) { return (document.all[objectID]); }
		else {
			if (isLayers) { return (document.layers[menuArea].layers[objectID]); }
		};}
	}
}
//----------------------------------------------


