///////////////////////////////////////////////////////////
// Author   : Viget Labs - PC
// Created  : 
// Revised  :
// Notes    : key javascript files
///////////////////////////////////////////////////////////

<!--

function MM_swapImgRestore() { //v3.0

  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;

}



function MM_preloadImages() { //v3.0

  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}

}



function MM_findObj(n, d) { //v4.0

  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {

    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];

  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);

  if(!x && document.getElementById) x=document.getElementById(n); return x;

}



function MM_swapImage() { //v3.0

  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)

   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}

}

function popupEmail(title,URL) 
{ 
  window.open("popupEmail.cfm?emailPageTitle="+title+"&emailPageURL="+URL, "windowEmail", "width=540,height=500,location=no,status=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes"); 
}


function popupSite(fileName)
{
  window.open(fileName,
              "windowPassword",
              "width=800,height=600,status=no,menubar=yes,toolbar=yes,scrollbars=no,resizable=yes");
}

function popupPhoto(pId, sImg, sWidth, sHeight)
{
  if (!sWidth )
    sWidth = '600';
  if (!sHeight)
    sHeight = '600';
//  alert ('width='+sWidth+" height="+sHeight);
  url= 'popup-photo.cfm?aid='+pId+'&img='+sImg;
//  alert(url);
  window.open(url,
              "windowPhoto",
              "width="+sWidth+",height="+sHeight+",status=no,menubar=yes,toolbar=yes,resizable=yes,scrollbars=yes");
}

function popupVideo(pId)
{
  url= 'popup-video.cfm?aid='+pId;
//  alert(url);
  window.open(url,
              "windowPlayer",
              "width=500,height=500,status=no,menubar=yes,toolbar=yes,resizable=yes,scrollbars=yes");
}

function GoURL(s) {
	var d = s.options[s.selectedIndex].value;
	window.location.href = d;
	s.selectedindex = 0;}
	
function open_win(URL,winname,ats){
	window.open(URL,winname,ats,"false");}
	
function confirm_delete(){
var agree=confirm("Are you sure you wish to delete this item?");
if (agree)
	return true ;
else
	return false ;
}

function popupRelatedHotTopics(iID, rType) 
{
  url = 'popup-hottopics.cfm?id='+iID+'&rtype='+rType;
//  alert(url);
  window.open(url,
              "windowHotTopics",
              "width=700,height=600,status=no,menubar=yes,toolbar=yes,resizable=yes,scrollbars=yes");
}

function popupRelatedContent(cType, iID, rType) 
{
  url = 'popup-content.cfm?id='+iID+'&ctype='+cType+'&rtype='+rType;
//  alert(url);
  window.open(url,
              "windowContent",
              "width=700,height=600,status=no,menubar=yes,toolbar=yes,resizable=yes,scrollbars=yes");

}

function popupRelatedEvents(iID, rType) 
{
  url = 'popup-events.cfm?id='+iID+'&rtype='+rType;
//  alert(url);
  window.open(url,
              "windowEvents",
              "width=700,height=600,status=no,menubar=yes,toolbar=yes,resizable=yes,scrollbars=yes");

}

function popupRelatedPeople(cType, iID, rType) 
{
  url = 'popup-people.cfm?id='+iID+'&ctype='+cType+'&rtype='+rType;
//  alert(url);
  window.open(url,
              "windowPeople",
              "width=700,height=600,status=no,menubar=yes,toolbar=yes,resizable=yes,scrollbars=yes");

}


function popupRelatedLinks(iID, rType) 
{
  url = 'popup-links.cfm?id='+iID+'&rtype='+rType;
//  alert(url);
  window.open(url,
              "windowLinks",
              "width=700,height=600,status=no,menubar=yes,toolbar=yes,resizable=yes,scrollbars=yes");

}

function popupRelatedMedia(iID, rType, mType) 
{
  url = 'popup-media.cfm?id='+iID+'&rtype='+rType+'&mType='+mType;
//  alert(url);
  window.open(url,
              "windowMedia",
              "width=700,height=600,status=no,menubar=yes,toolbar=yes,resizable=yes,scrollbars=yes");

}

function popupFeatureLibrary(sThumb) 
{
  url = 'popup-feature_lib.cfm?featuredThumb='+sThumb;
//  alert(url);
  window.open(url,
              "windowFeatLib",
              "width=500,height=600,status=no,menubar=yes,toolbar=yes,resizable=yes,scrollbars=yes");

}

function popupRelatedFeatures(iID, rType) 
{
  url = 'popup-features.cfm?id='+iID+'&rtype='+rType;
//  alert(url);
  window.open(url,
              "windowFeatures",
              "width=700,height=600,status=no,menubar=yes,toolbar=yes,resizable=yes,scrollbars=yes");
}

function popupUploadTool(sOldImg, sCallingFunc) 
{
//  alert('OldImg: '+ sOldImg);
  url = 'upload-simple.cfm?oldImgName='+sOldImg+'&callingFunc='+sCallingFunc;
//  alert(url);
  window.open(url,
              "winUpload",
              "height=400,width=400,scrollbars=yes,status=no,menubar=yes,toolbar=yes,resizable=yes");
}

function popupRequestPubs()
{
  url = 'files/orderform.htm';
  window.open(url,
              'winPubsForm',
              'height=600,width=800,resizable=yes,scrollbars=yes,toolbar=yes,location=no,menubar=yes');
}

function popupAdminPlayer(sFilename, mType) 
{
  url = 'popup-player.cfm?filename='+sFilename+'&mType='+mType;
//  alert(url);
  window.open(url,
              "windowMediaPlayer",
              "width=625,height=400,status=no,menubar=yes,toolbar=yes,resizable=yes,scrollbars=yes");

}

// This player is called from the transcripts page to display & play an audio track
function popupAudioPlayer(sID) 
{
  url = 'popupAudio.cfm?id='+sID;
//  alert(url);
  window.open(url,
              "windowAudioPlayer",
              "width=500,height=400,status=no,menubar=yes,toolbar=yes,resizable=yes,scrollbars=yes");

}
-->