/**************************************************************
 * JavaScript function file for Marcia's Wetshoeproductions.com site
 * Author:  Scott W. Kanzelmeyer
 * Date:    Sunday, 8 August 2004
 * Purpose: js function file for wetshoeproductions.com website
 * Updated: Wednesday, 22 December 2004
 **************************************************************
 */
	
// Function to bounce the page for browsers that do not support proper CSS
function pageBounce( browser, page ) {
	alert("Some of the formatting features of this doucument do not work properly in earlier versions of " + browser + ".  To fully appreciate this page, please upgrade your browser to a more up-to-date version.");
	window.location=("resume" + page + ".html");
}

// Check for browser type
if (document.all) { // Checking for IE
	// add corrected css for IE
	document.write("<link rel='stylesheet' type='text/css' href='ie.css'>");
//	if (parseInt(navigator.appVersion) <= 5) {
//		pageBounce( "Internet Explorer", 2 );
//	}
}
else if (document.layers) { // Checking for Netscape 4
//	pageBounce( "Netscape", 1 );
	alert("Some of the formatting features of this doucument do not work properly in earlier versions of Netscape.  To fully appreciate this page, please upgrade your browser to a more up-to-date version.");
}

// Function to swap rollover images
//function imageChange( imageName, imageSwap ) {
//	document.imageName.src = imageSwap.src;
//}

//Function to load an image for the site
//
function loadImage( image, iName, iType, iSize, z, p ) {
	var end = '.src;"';
	var doc = '"document.';
	var mid = "";
	var c = ' onclick="sub';
	var out = " onmouseout=";
	var l = '" alt="';
	var size = '" '+iSize;
	var d = '<img name="';
	var butName = image+"Button";
	var m = 'mit();"';
	var credit = ' Photograph, by Marcia Morris"';
	var s = ".src = ";
	var john = doc+butName+s+image;
	var over = " onmouseover=";
	var r = "_ro";
	if ( !z ) {
		credit = '"';
	}
	var ext = GEXT;
	var a = '" src="';
	var t = " />\n";
	var k = butName+a+IMAGEBASE;
	if ( iType == "P" ) {
		ext = PEXT;
	}
	else if ( iType == "J" ) {
		ext = JEXT;
	}
	var dave = ext+size+l+iName;
    if ( p ) {
		mid = over+john+r+end+out+john+end+c+m;
	}
	var retValue = d+k+image+dave+credit+mid+t;
    document.write(retValue);
}

// Function to reconstitute an email address
//
function doAd(y,f,p) { 
    var at = '&#64;';
    y = y.replace(/^bbe./,"");
    f = f.replace(/.euiud/,"");
    var ls = f+at+y;
    if (void(0)!=p) {
        return ls;
    }
    document.write(ls);
} 

// Function to reconstitute a mailto: link
//
function doAdLink(y,v,f,p) { 
    var at = '&#64;';
    y = y.replace(/^bbe./,"");
    f = f.replace(/.euiud/,"");
    var c = f+at+y;
    var a = 'href';
    if ( "" == v ) {
        v = f + ' ' + at + y;
        if ( -1 != v.indexOf('?') ) {
            v = v.substring(0,v.indexOf('?'));
        }
    }
    var ls = '<a '+a+'="mailto:'+c+'">'+v+'</a>';
    if (void(0)!= p) {
        return ls;
    }
    document.write(ls);
} 

// Function to reconstitute a page link
//
function doLink(y,v,p) { 
    var a = 'href';
    var ls = '<a '+a+'="'+y+'">'+v+'</a>';
    if (void(0)!= p) {
        return ls;
    }
    document.write(ls);
} 

///////////////////////////////////////////////////////////////////////

//Disable right mouse click Script
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com

var message="All material on this website is protected.\ncopyright 2004, Marcia Morris";

///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false")

// End of Disable right mouse click Script

///////////////////////////////////////////////////////////////////////

// Additional useful constants
var IMAGEBASE = "media/";
var PEXT = ".png";
var JEXT = ".jpg";
var GEXT = ".gif";
