function dm(msgStr) {
  window.status = msgStr;
  document.status = true;
}

NS4 = document.layers;
if (NS4) {
origWidth = innerWidth;
origHeight = innerHeight;
}

function reDo() {
 if (innerWidth != origWidth || innerHeight != origHeight)
 location.reload();
}
		
if (NS4) {onresize = reDo();}

var newWin=null;
function openWinDIY(url,w,h,winName,scr){   
  if (document.images)
  newWin=window.open(url,winName,'top=0,left=0,width='+w+',height='+h+',scrollbars='+scr+',location=0,status=0,menubar=0,toolbar=0,resizable=yes');
  if(jsvers > 1.0){setTimeout('newWin.focus();',250);}
}

var newWin=null;
function openFixedWin(url,w,h,winName,scr){   
  if (document.images)
  newWin=window.open(url,winName,'top=0,left=0,width='+w+',height='+h+',scrollbars='+scr+',location=0,status=0,menubar=0,toolbar=0,resizable=no');
  if(jsvers > 1.0){setTimeout('newWin.focus();',250);}
}

var calendarWindow=null;
function openCalendar(url,h,scr,winName){   
  if (document.images)
  calendarWindow=window.open(url,winName,'top=0,left=0,width=700,height='+h+',scrollbars='+scr+',location=0,status=0,menubar=0,toolbar=0,resizable=yes');
  if(jsvers > 1.0){setTimeout('calendarWindow.focus();',250);}
}

var profileWindow=null;
function openProfile(url,h,scr,winName){   
  if (document.images)
  profileWindow=window.open(url,winName,'top=0,left=0,width=620,height='+h+',scrollbars='+scr+',location=0,status=0,menubar=0,toolbar=0,resizable=yes');
  if(jsvers > 1.0){setTimeout('profileWindow.focus();',250);}
}

var galleryWin=null;
function openGallery(url,h){   
  if (document.images)
  galleryWin=window.open(url,'galleryWindow','top=0,left=0,width=400,height='+h+',scrollbars=no,location=0,status=1,menubar=0,toolbar=0,resizable=yes');
  if(jsvers > 1.0){setTimeout('galleryWin.focus();',250);}
}

var newWin01=null;
function openWin01(url){   
  if (document.images)
  newWin01=window.open(url,'surestartremote','top=0,left=0,width=660,height=460,scrollbars=yes,location=1,status=1,menubar=1,toolbar=0,resizable=yes');
  if(jsvers > 1.0){setTimeout('newWin01.focus();',250);}
}

var newWin02=null;
function openWin02(url,winName){   
  if (document.images)
  newWin02=window.open(url,winName,'top=0,left=0,width=660,height=460,scrollbars=yes,location=1,status=1,menubar=1,toolbar=0,resizable=yes');
  if(jsvers > 1.0)
  {
  setTimeout('newWin02.focus();',250);
  }
}

var newWin03=null;
function openWin03(url,winName,features){
  newWin03=window.open(url,winName,features);
  if(jsvers > 1.0)
  {
  setTimeout('newWin03.focus();',250);
  }
}

var newWin01=null;
function openWindow(url){   
  if (document.images)
  newWin01=window.open(url,'remote','top=0,left=0,width=660,height=460,scrollbars=yes,location=1,status=1,menubar=1,toolbar=0,resizable=yes');
  if(jsvers > 1.0){setTimeout('newWin01.focus();',250);}
}

    var shockmodetest = '<script language=javascript><!-- ';
    shockmodetest += 'function checkForShockwave() {';
    shockmodetest += '	navigator.plugins.refresh();';
    shockmodetest += '	if ( navigator.plugins["Shockwave for Director"] ){';
    shockmodetest += '		parent.location.reload();';
    shockmodetest += '	} else {';
    shockmodetest += '		setTimeout( "checkForShockwave()", 1000 );';
    shockmodetest += '	}';
    shockmodetest += '}';
    shockmodetest += 'var ShockMode = 0;';
    shockmodetest += 'if (navigator.mimeTypes && navigator.mimeTypes["application/x-director"] ';
    shockmodetest += '&& navigator.mimeTypes["application/x-director"].enabledPlugin) { ';
    shockmodetest += '	if (navigator.plugins && navigator.plugins["Shockwave for Director"] ';
    shockmodetest += ' && (versionIndex = navigator.plugins["Shockwave for Director"].description.indexOf(".")) != - 1) {';
    shockmodetest += '		var versionString = navigator.plugins["Shockwave for Director"].description.substring(versionIndex-1, versionIndex);';
    shockmodetest += '		versionIndex = parseInt( versionString );';
    shockmodetest += '		if ( versionIndex >= 6 )';
    shockmodetest += '			ShockMode = 1;';
    shockmodetest += '	}';
    shockmodetest += '}';
    shockmodetest += 'if (!ShockMode && navigator.appName && navigator.appName.indexOf("Netscape") != - 1 && ';
    shockmodetest += ' navigator.appVersion.indexOf("4.") != - 1';
    shockmodetest += '&& navigator.javaEnabled() && netscape.softupdate.Trigger.UpdateEnabled() && ';
    shockmodetest += ' document.cookie.indexOf("StartedShockwaveInstall") == -1) {';
    shockmodetest += '	var jarPath = new String("");';
    shockmodetest += '	if (navigator.platform.indexOf("Win32") >= 0 )';
    shockmodetest += '		jarPath = "http://download.macromedia.com/pub/shockwave/jars/english/silentdir32.jar"';
    shockmodetest += '	else if (navigator.platform.indexOf("Win16") >= 0 )';
    shockmodetest += '		jarPath = "http://download.macromedia.com/pub/shockwave/jars/english/silentdir16.jar"';
    shockmodetest += '	else if (navigator.platform.indexOf("MacPPC") >= 0 )';
    shockmodetest += '		jarPath = "http://download.macromedia.com/pub/shockwave/jars/english/silentdirppc.jar"';
    shockmodetest += '	if (jarPath.length) {';
    shockmodetest += '		netscape.softupdate.Trigger.StartSoftwareUpdate (jarPath, netscape.softupdate.Trigger.FORCE_MODE);';
    shockmodetest += '		document.cookie=\'StartedShockwaveInstall;path=/;\'';
    shockmodetest += '		setTimeout("checkForShockwave()", 1000);';
    shockmodetest += '	}';
    shockmodetest += '}';
    shockmodetest += '//--></script>';

function openFwin(winTitle,bgcol,path,swf,w,h,swlvconnect,winName) {
    var winFeatures='width='+(w+10)+',height='+(h+10)+',dependent,left=0,top=0';
    newwin=window.open('',winName,winFeatures);
    if(jsvers>1.0){setTimeout('newwin.focus();',250);}
    var doc=newwin.document; 
    doc.open('text/html','replace');
    var sMarkup = '<html><head><title>'+winTitle+'</title></head><body bgcolor=';
    sMarkup += '"#'+bgcol+'" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">';
    sMarkup += '<div align="center"><table cellspacing="1" cellpadding="1" border="0" height="100%" width="100%">';
    sMarkup += '<tr><td align="center" valign="middle"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
    sMarkup += 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" ';
    sMarkup += 'id='+swf+' width='+w+'  height='+h+'><param name=movie value="'+path+swf+'.swf">';
    sMarkup += '<param name=quality value=high><param name=bgcolor value=#'+bgcol+'>';
    sMarkup += '<embed src="'+path+swf+'.swf" name="'+swf+'" swliveconnect='+swlvconnect+' quality=high ';
    sMarkup += 'bgcolor=#'+bgcol+' width='+w+' height='+h+' type="application/x-shockwave-flash" ';
    sMarkup += 'pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">';
    sMarkup += '</embed></object></td></tr></table></div></body></html>';
    doc.write(sMarkup);
    doc.close();
}

function openSWwin(winTitle,bgcol,path,dcr,w,h,swlvconnect,winName) {
    var winFeatures='width='+(w+10)+',height='+(h+10)+',dependent,left=0,top=0';
    newwin=window.open('',winName,winFeatures);
    if(jsvers>1.0){setTimeout('newwin.focus();',250);}
    var doc=newwin.document; 
    doc.open('text/html','replace');
    var sMarkup = '<html><head><title>'+winTitle+'</title></head><body bgcolor=';
    sMarkup += '"#'+bgcol+'" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">';
    sMarkup += '<div align="center"><table cellspacing="1" cellpadding="1" border="0" height="100%" width="100%">';
    sMarkup += '<tr><td align="center" valign="middle"><object classid="clsid:166B1BCA-3F9C-11CF-8075-444553540000" ';
    sMarkup += 'codebase="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=6,0,0,0" ';
    sMarkup += 'id='+dcr+' width='+w+'  height='+h+'><param name=src value="'+path+dcr+'.dcr">'+shockmodetest+'';
    sMarkup += '<embed src="'+path+dcr+'.dcr" name="'+dcr+'" swliveconnect='+swlvconnect+' width='+w+' height='+h+' ';
    sMarkup += 'type="application/x-director" ';
    sMarkup += 'pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveDirector">';
    sMarkup += '</embed></object></td></tr></table></div></body></html>';
    doc.write(sMarkup);
    doc.close();
}

var launchPicWin=null;
var thePic = new Image();
function launchPic(winTitle,path,thePic,width,height,winName) {
  var winFeatures='width='+(width+10)+',height='+(height+10)+',dependent,left=0,top=0';
  launchPicWin=window.open('',winName,winFeatures);
  if(jsvers>1.0){setTimeout('launchPicWin.focus();',250);}
  var doc=launchPicWin.document; 
  doc.open('text/html','replace');
  var sMarkup = '<html><head><title>'+winTitle+'</title></head>';
  sMarkup += '<body bgcolor="#ffffff" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">';
  sMarkup += '<div align="center"><table cellspacing="0" cellpadding="0" border="0" height="100%" width="100%">';
  sMarkup += '<tr><td align="center" valign="middle"><img src="'+path+thePic+'" width="'+width+'" height="'+height+'">';
  sMarkup += '</td></tr></table></div></body></html>';
  doc.write(sMarkup);
  doc.close();
}

var newwin=null;
var pic = new Image();
function launchFullPic(pic,width,height,path,winTitle,isCap,cap,isCredit,photographer,winName,imgFolderPath) {
  if (navigator.appVersion.lastIndexOf('Mac') != -1) {var winFeatures='width='+(width+10)+',height='+(height+32)+',dependent,left=0,top=0';}
  else {var winFeatures='width='+(width+10)+',height='+(height+40)+',dependent,left=0,top=0';}
  newwin=window.open('',winName,winFeatures);
  if(jsvers>1.0){setTimeout('newwin.focus();',250);}
  var doc=newwin.document; 
  doc.open('text/html','replace');
  var sMarkup='<html><head><title>'+winTitle+'<'+'/title><'+'/head>';
  sMarkup+='<style type="text/css"><!--';
  sMarkup+='td {font-family:Arial, Helvetica, sans-serif;font-size:11px;}';
  sMarkup+='td.theCap {background-color:#000000;color:#ffffff;padding-left:4px;}';
  sMarkup+='td.theCredit {background-color:#000000;color:#ffffff;text-align:right;}';
  if (isCap=="2"){
    sMarkup+='td.theCap {background-color:#ffffff;color:#000000;padding-left:4px;}';
    sMarkup+='td.theCredit {background-color:#ffffff;color:#000000;text-align:right;}';
  }
  sMarkup+='//--><'+'/style>';
  sMarkup+='<body bgcolor="#'+winBgndColor+'" topmargin="9" leftmargin="0" marginheight="9" marginwidth="0">';
  sMarkup+='<div align="center"><table cellspacing="0" cellpadding="1" border="0" bgcolor="#'+winBorderColor+'"><tr><td align="center" valign="middle">';
  sMarkup+='<div align="center"><table cellspacing="0" cellpadding="0" border="0" width="'+width+'"><tr><td align="center" valign="middle" colspan="2">';
  sMarkup+='<img src="'+path+pic+'" width="'+width+'" height="'+height+'" vspace="0"><'+'/td><'+'/tr>';
  var theColspan=2;
  if (isCap>0){
    if (isCredit>0){theColspan=1};
    sMarkup+='<tr><td colspan="2" bgcolor="#'+winBorderColor+'"><img src="'+imgFolderPath+'spacer.gif" width="10" height="1" vspace="0"><'+'/td><'+'/tr>';
    sMarkup+='<tr><td colspan="2" class="theCap"><img src="'+imgFolderPath+'spacer.gif" width="10" height="2" vspace="0"><'+'/td><'+'/tr>';
    sMarkup+='<tr><td valign="top" class="theCap" nowrap colspan="'+theColspan+'"';
    if (isCredit==0){sMarkup+=' align="center"';}
    sMarkup+='>&nbsp;'+cap+'<'+'/td>';
  }
  if (isCredit>0){sMarkup+='<td valign="top" class="theCredit" nowrap align="right">Photo: '+photographer+'&nbsp;<'+'/td>';}
  sMarkup+='<'+'/tr>';
  sMarkup+='<tr><td colspan="2" class="theCap"><img src="'+imgFolderPath+'spacer.gif" width="10" height="2" vspace="0"><'+'/td><'+'/tr>';
  sMarkup+='<'+'/table><'+'/div>';
  sMarkup+='<'+'/td><'+'/tr><'+'/table><'+'/div>';
  sMarkup+='<'+'/body><'+'/html>';
  doc.write(sMarkup);
  doc.close();
}

