// ################################
// Random Image on Refresh http://javascript.internet.com/image-effects/random-image-script.html
// ================================

// Set up the image files to be used.
var SamMED = new Array() // do not change this
var SamSML = new Array() // do not change this

// To add more image files, continue with the
// pattern below, adding to the array. Rememeber
// to increment the SamMED[x] index!

//==== MED Pics Of Sam =====

SamMED[0] = '/images/photos/sam/SuitHead_MED.gif'
//SamMED[1] = '/images/photos/sam/Tanktop_MED.jpg'
//SamMED[2] = '/images/photos/sam/casual_standing_smiling_MED.jpg'
//SamMED[3] = '/images/photos/sam/SuitHead_med.gif'
//SamMED[4] = '/images/photos/sam/white_seated_cool_MED.jpg'

//==== SML Pics Of Sam =====

SamSML[0] = '/images/photos/sam/SuitHead_sml2.gif'
//SamSML[1] = '/images/photos/sam/Tanktop_SML.gif'
//SamSML[2] = '/images/photos/sam/casual_standing_smiling_SML.jpg'
//SamSML[3] = '/images/photos/sam/SuitHead_sml2.gif'
//SamSML[4] = '/images/photos/sam/white_seated_cool_SML.jpg'

// ======================================
// do not change anything below this line
// ======================================

//==== MED Pics Of Sam =====
var j = 0
var p = SamMED.length;

var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = SamMED[i]
}

var whichImage = Math.round(Math.random()*(p-1));
function showSamMED(){
document.write('<img src="'+SamMED[whichImage]+'">');
}

//==== SML Pics Of Sam =====
var j = 0
var p = SamSML.length;

var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = SamSML[i]
}

var whichImage = Math.round(Math.random()*(p-1));
function showSamSML(){
document.write('<img src="'+SamSML[whichImage]+'">');
}

//-->



// ################################
// POP UP AUTO CENTER http://www.dynamicdrive.com/dynamicindex8/popwin.htm
// ================================
	var win=null;
	function NewWindow(mypage,myname,w,h,scroll,pos){
	if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
	if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
	else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
	settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes';
	win=window.open(mypage,myname,settings);}

// this one is resizable
	var win=null;
	function NewWindowOrder(mypage,myname,w,h,scroll,pos){
	if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
	if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
	else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
	settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=yes,menubar=no,toolbar=no,resizable=no';
	win=window.open(mypage,myname,settings);}

// This is a general one used in the menu navigator. Goes something like this:
// href="javascript:popWindow('http://www.miracleburn.com/gc/guarantee.htm','guarantee','scrollbars=yes,resizable=yes,width=550,height=400')"
// or for DHTML menu, use javascript:popWindow('link.html','pop','scrollbars=yes,resizable=yes,width=600,height=500')

	function popWindow(theURL,winName,features) { //v2.0
	  window.open(theURL,winName,features);
	}

// ################################
// bookmark a page
// used at http://www.webmd.com/
// specific script at http://a876.g.akamai.net/7/876/1448/v00002/images.webmd.com/images/mywebmd/frameworkRedesign/chrome_scripts.js
// ================================

	function Bookmark() {
	  /* quick check of the browser and OS */
	  var agt=navigator.userAgent.toLowerCase();

	  /*** PLATFORM ***/
	  var is_win = (agt.indexOf('windows')!=-1);
	  var is_mac = (agt.indexOf('mac')!=-1);

	  /*** BROWSER ***/
	  var is_ie     = (agt.indexOf('msie') != -1);
	  var is_firefox = (agt.indexOf('firefox') != -1);
	  var is_netscape  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('compatible') == -1));
	  var is_safari = ((agt.indexOf('safari')!=-1)&&(is_mac));

	  if (is_win) {
	    if (is_ie && window.external) {
	      window.external.AddFavorite(location.href,document.title);
	    }
	    else {
	      if (is_firefox) {
		alert('Please press CTRL + D to bookmark this page.');
	      }
	      else {
		if (is_netscape) {
		  alert('Please press CTRL + D to bookmark this page.');
		}
		else {
		  alert('Please press CTRL + D to bookmark this page.');
		}
	      }
	    }
	  }
	  else {
	    if (is_mac) {
	      if (is_ie && window.external) {
		window.external.AddFavorite(location.href,document.title);
	      }
	      else {
		if (is_safari) {
		  alert('Please press Command (Apple) + D to bookmark this page.');
		}
		else {
		  alert('Please press UP arrow + Command (Apple) + D to bookmark this page.');
		}
	      }
	    }
	    else {
	      alert('Please press CTRL + D to bookmark this page.');
	    }
	  }
	  return false;
	}


// ################################
//For Running Active Content in IE6
//http://www.adobe.com/devnet/activecontent/articles/devletter.html
//Copyright 2006 Adobe Systems, Inc. All rights reserved.
// ================================








