//professional_site_parent.js
//Copyright (c) 2001 [and previous] Richard G. Mills  All rights reserved.
//##p============================================================================
//getappvers.js
//Get App Version and appVers
appname= navigator.appName;
appVers= parseInt(navigator.appVersion)
function getAppVersion() {
 appversion = navigator.appVersion;
 majorver = appversion.substring(0, 1);
 if ( (appname == "Netscape") && ( majorver >= 3 ) ) return 1;
 if ( (appname == "Microsoft Internet Explorer") && (majorver >= 4) ) return 1;
  return 0;
}
//##p============================================================================
//getappvers_popups.js
//pop-ups getappversion
function Is ()
{   // convert all characters to lowercase to simplify testing
    var agt=navigator.userAgent.toLowerCase()

    // *** BROWSER VERSION ***
    this.major = parseInt(navigator.appVersion)

    this.nav  = ((agt.indexOf('mozilla')!=-1) && ((agt.indexOf('spoofer')==-1)
                && (agt.indexOf('compatible') == -1)))
    this.nav4 = (this.nav && (this.major == 4))
    this.nav4up = this.nav && (this.major >= 4)

    this.ie   = (agt.indexOf("msie") != -1)
    this.ie4  = (this.ie && (this.major == 4))
    this.ie4up  = this.ie  && (this.major >= 4)
}
var is = new Is();
//##p============================================================================
//imageswitch.js
//mouseover image switching
function swtch(num, imgname) {
  if (getAppVersion()) {
  document[imgname].src = img[num].src;
}
}
//##p============================================================================
//createpopop.js
//create pop-up function
function createPopUp(id, width, message)
{
   var theString = '<STYLE TYPE="text/css">#'+id+'{width:'+width+';}</STYLE>';
   theString+='<DIV CLASS="popUp" id="'+id+'">'+message+'</DIV>';
   document.write(theString);
}
//#p============================================================================
//show pop-ups for links in Professional Site -- showpopup_cs.js
function showPopUp_cs(id, event)
{

	if (is.nav4up) {
                document.layers[id].left = event.pageX + 5;
                document.layers[id].top = event.pageY - 65;
		document.layers[id].visibility="show";
	}
        else if(appVers >= 4) {
                document.all[id].style.pixelLeft = (document.body.scrollLeft +event.clientX) + 5;
                document.all[id].style.pixelTop = (document.body.scrollTop + event.clientY) - 61;
		document.all[id].style.visibility="visible";
	}
		
}

function showPopUp2_cs(id, event)
{

	if (is.nav4up) {
                document.layers[id].left = event.pageX + 45;
                document.layers[id].top = event.pageY - 40;
		document.layers[id].visibility="show";
	}
        else if(appVers >= 4) {
                document.all[id].style.pixelLeft = (document.body.scrollLeft +event.clientX) + 45;
                document.all[id].style.pixelTop = (document.body.scrollTop + event.clientY) - 36;
		document.all[id].style.visibility="visible";
	}
		
}
//##p============================================================================
//hidepopup.js
//hide pop-up function
function hidePopUp(id)
{
if (appVers >= 4)
   is.nav4up ? document.layers[id].visibility="hide" : document.all[id].style.visibility="hidden";
}
if (appVers < 4) event="";
//p============================================================================
//define watermark and email pop-ups -- definepopup_cs.js
function definePopUp()
{
//   createPopUp("watermark",68, "<a href='../'><img src='../images/static/millstmwatermark.gif' width=68 height=78 border=0></a>");
//   createPopUp("watermark",68, "<a href='../'><img src='../images/static/millstmwatermark-gray.gif' width=68 height=78 border=0></a>");
//   createPopUp("watermark",68, "<a href='../'><img src='../images/static/millstmwatermark-gray2.gif' width=68 height=78 border=0></a>");
//   createPopUp("watermark",68, "<a href='../'><img src='../images/static/millstmwatermark-white2.gif' width=68 height=78 border=0></a>");
//   createPopUp("watermark",68, "<a href='../'><img src='../images/static/millstmwatermark-red.gif' width=68 height=78 border=0></a>");
   if (appname != "Netscape")
     createPopUp("watermark",68, "<a href='mailto:WebmasterMills/cslogo@ThinkMills.com'><img src='../images/static/millstmwatermark-white2.gif' width=68 height=78 border=0 Name='Watermark' onMouseOver=swtch('3','Watermark') onMouseOut=swtch('2','Watermark') alt='e-mail Think Mills here!'></a>");
   else
     {
     createPopUp("watermark",68, "<a href='mailto:WebmasterMills/cslogo@ThinkMills.com' onMouseOver=overMouse()><img src='../images/static/millstmwatermark-white2.gif' width=68 height=78 border=0 alt='e-mail Think Mills here!'></a>");
     createPopUp("watermark3",68, "<a href='mailto:WebmasterMills/cslogo@ThinkMills.com' onMouseOver=showPopUp('watermark2') onMouseOut=outMouse()><img src='../images/static/pixel.gif' width=68 height=78 border=0 alt='e-mail Think Mills here!'></a>");
     createPopUp("watermark2",68, "<a href='mailto:WebmasterMills/cslogo@ThinkMills.com' onMouseOut=outMouse()><img src='../images/animated/watermark-rotate-red.gif' width=68 height=78 border=0 alt='e-mail Think Mills here!'></a>");
     }
//   createPopUp("watermark2",68, "<a href='mailto:WebmasterMills/cslogo@ThinkMills.com' onMouseOver=swtch('3','watermark') onMouseOut=swtch('2','watermark')><img src='../images/static/pixel.gif' width=68 height=78 border=1 Name='Watermark' onMouseOver=swtch('3','Watermark') onMouseOut=swtch('2','Watermark')></a>");
//end define watermark and email pop-ups
//POP-UPS FOR PROFESSIONAL SITE "OTHER" LINKS
   createPopUp("games",130, "<img src=../images/pop_ups/games.gif align=left>");
   createPopUp("piano",130, "<img src=../images/pop_ups/piano.gif align=left>");
   createPopUp("comics",130, "<img src=../images/pop_ups/bracket.gif align=left hspace=0><img src=../images/pop_ups/blmnjump_transparent.gif align=left hspace=0>");
   createPopUp("bio",130, "<img src=../images/pop_ups/bio.gif>");
   createPopUp("poetry",130, "<img src=../images/pop_ups/bracket.gif align=left hspace=0><img src=../images/pop_ups/poetrytrain.gif>");
   createPopUp("movies",130, "<img src=../images/pop_ups/bracket.gif align=left hspace=0><img src=../images/pop_ups/movies.gif>");
   createPopUp("quick",130, "<img src=../images/pop_ups/bracket.gif align=left hspace=0><img src=../images/pop_ups/quickclips.gif align=left hspace=0>");
   createPopUp("cards",130, "<img src=../images/pop_ups/bracket.gif align=left hspace=0><img src=../images/pop_ups/greetingcards.gif align=left hspace=0>");
   createPopUp("browser",245, "<img src=../images/pop_ups/browser.gif width=30 height=31 border=1 align=left> <small><B><font color=darkblue>Requires an up-to-date browser, preferably Internet Explorer; otherwise, Firefox/Netscape/Mozilla</font></B></small>");
   createPopUp("monitor",222, "<img src=../images/animated/monitor2.gif width=41 height=38 border=0 align=left> <small><B><font color=darkblue>Best viewed at 800x600 res. with highest color setting available (tested at 24 bit)</font></B></small>");

}

//onResize gosub required by NS (but must include IE)
resizeEvent=0
function resizeEvents() {
    {
    if (appname=="Netscape" && resizeEvent==1) window.location.reload()
    if (appname!="Netscape") showPopUp('watermark', event)
    resizeEvent=1
    }
}
//end onResize gosub required by NS (but must include IE)
//p============================================================================
//imageswitch_csimgscrc_index.js (c) Richard G. Mills 2000 All rights reserved.
//for MillsTM logo watermark and revolving e-mail for professional_site.html

//mouseover image switching in watermark and button row

img1="../images/static/millstmwatermark-white2.gif"

imgsrc = new Array();
imgsrc[3] = "../images/animated/watermark-rotate-red.gif";
imgsrc[2] = img1;
imgsrc[4] = "../images/animated/rainbow-boxes-blue-business.gif";
imgsrc[5] = "../images/static/rainbow-boxes-blue-business2.gif";
imgsrc[6] = "../images/animated/rainbow-boxes-blue-education.gif";
imgsrc[7] = "../images/static/rainbow-boxes-blue-education2.gif";
imgsrc[8] = "../images/animated/rainbow-boxes-blue-stories&essays.gif";
imgsrc[9] = "../images/static/rainbow-boxes-blue-stories&essays2.gif";
imgsrc[10] = "../images/animated/rainbow-boxes-blue-webdesign.gif";
imgsrc[11] = "../images/static/rainbow-boxes-blue-webdesign2.gif";
imgsrc[12] = "../images/animated/rainbow-boxes-blue-resume.gif";
imgsrc[13] = "../images/static/rainbow-boxes-blue-resume2.gif";
imgsrc[14] = "../images/animated/rainbow-boxes-blue-website2.gif";
imgsrc[15] = "../images/static/rainbow-boxes-blue-website2.gif";
//end mouseover image switching in watermark
//##p============================================================================
//imageswitch_newarray.js
//image switching new array
if (getAppVersion()) {
  img = new Array();
  for (i = 0; i < imgsrc.length; i++) {
 img[i] = new Image();
 img[i].src = imgsrc[i];
  }
}
//##p============================================================================
//logoh2o_email.js (c) Richard G. Mills 1999 All rights reserved.
//MillsTM logo watermark and revolving e-mail

//REQUIRES logoh2o_style.js HERE AS INSERT
//REQUIRES getappvers.js HERE 
//REQUIRES getappvers_popups.js HERE 
//REQUIRES imageswitch.js (or imageswitch_index.js) HERE 
//REQUIRES createpopup.js HERE 
//REQUIRES hidepopup.js HERE 
//REQUIRES definepopup_[type or use].js HERE
//REQUIRES imageswitch_imgsrc_[type or use].js HERE
//REQUIRES imageswitch_newarray.js HERE
//REQUIRES logoh2oeright_insert.js or logoh2oeleft_insert.js (in head AFTER
//                                                              this script)
//REQUIRES ALSO--
//   onResize="resizeEvents()" CLASS="isTip" onLoad="showPopUp('watermark', event)" onBlur="showPopUp('watermark', event)" onFocus="showPopUp('watermark', event)" onMouseOver="showPopUp('watermark', event)"
//                 --IN BODY TAG
//REQUIRES ALSO ITEM AT PAGE BOTTOM (SEE THIS PAGE BOTTOM)

//mouseover/mouseout functions for NS logo2email 
function overMouse() {
  overMouseOn = "true";
  showPopUp('watermark3');
  showPopUp('watermark2');
  hidePopUp('watermark');
}

function outMouse() {
hidePopUp('watermark3');
hidePopUp('watermark2');
overMouseOn = "false";
}
//end mouseover/mouseout functions for NS logo2email 

//timer to reset watermark after scroll if no mouse overs
overMouseOn="false"
var y = 5
var x = y
function startClock()
{
   x = x-1
      if (x == -1)
      {
      if (appname != "Netscape") showPopUp('watermark', event)
      else if (overMouseOn=="false")
        {
        hidePopUp('watermark')
        showPopUp('watermark')
        }
      x = y
      startClock()
      }
   else
      {
      timerID = setTimeout("startClock()", 1000)
      }
}
//end timer to reset watermark
//REQUIRES logoh2o_bottom_script.js AT END OF PAGE 
//#p============================================================================
//logoh2oeright_insert.js (c) Richard G. Mills 1999 All rights reserved.
//for MillsTM logo watermark and revolving e-mail

//logoh2oeright_insert.js
//show watermark on lower right corner

//show pop-up2 function required by NS
function showPopUp2(id, event)
{
   if (is.nav4up)
     {
thislayer=document.layers[id]
      document.layers[id].left = innerWidth + pageXOffset -84;
      document.layers[id].top = innerHeight + pageYOffset -192;
		document.layers[id].visibility="show";
     }
}
//end show pop-up2 function required by NS 

//show pop-up function
function showPopUp(id, event)
{
   if (is.nav4up)
     {
thislayer=document.layers[id]
      document.layers[id].left = innerWidth + pageXOffset -84;
      document.layers[id].top = innerHeight + pageYOffset -96;
		document.layers[id].visibility="show";
     }

    else if(appVers >= 4)
     {
      document.all[id].style.pixelLeft = (document.body.scrollLeft + document.body.clientWidth) -68; // + 460;
      document.all[id].style.pixelTop = (document.body.scrollTop + document.body.clientHeight)-78; // + 270;
		document.all[id].style.visibility="visible";
     }
}
//end show pop-up function
//============================================================================
