<!--


//args: cell, colour
var changed = 0;
var old_colour = "SFF";

function cell_hover(cell,colour) {

	//mouse on
	if (changed == 0) {
	changed = 1;
	old_colour = cell.style.backgroundColor
	cell.style.backgroundColor=colour;

	//mouse off
	} else {


		if (!colour) {
		changed = 0;	
		cell.style.backgroundColor=old_colour;
		} else {
		cell.style.backgroundColor=colour;
		}
	}
}








function checkemail(email) {
var message = "Please check your email address.";

	if (	email.length < 5 ||
	email.indexOf('.') == -1 || 
	email.indexOf('@') == -1 || 
	email.indexOf(';') != -1 ||
	email.indexOf(':') != -1 ||
	email.indexOf('!') != -1 ||
	email.indexOf('"') != -1 ||
	email.indexOf('£') != -1 ||
	email.indexOf('$') != -1 ||
	email.indexOf('%') != -1 ||
	email.indexOf('^') != -1 ||
	email.indexOf('&') != -1 ||
	email.indexOf('*') != -1 ||
	email.indexOf('?') != -1 ||
	email.indexOf('#') != -1 ||
	email.indexOf('}') != -1 ||
	email.indexOf('{') != -1 ||
	email.indexOf('~') != -1 ||
	email.indexOf('`') != -1) {

		alert(message);
		return false;

	} else {
	return true;
	}
}




function check_form() {

checkemail2(document.comments.email.value);


}

var aname = new Array();
var avalue = new Array();

function create_url_arrays() {
var num = 0;
var url = new String(document.location);
url = unescape(url);
url = url.substring(url.indexOf('?')+1,url.length);

	while(url.indexOf('&') != -1) {
	aname[num] = url.substring(0,url.indexOf('&'));

	avalue[num] = aname[num].substring(aname[num].indexOf('=')+1,aname[num].length);
	aname[num] = aname[num].substring(0,aname[num].indexOf('='));
	url = url.substring(url.indexOf('&')+1,url.length);
	num++;
	}

//Loop exits skipping last name/value because there is no &
//at end

aname[num] = url.substring(0,url.length);
avalue[num] = aname[num].substring(aname[num].indexOf('=')+1,aname[num].length);
aname[num] = aname[num].substring(0,aname[num].indexOf('='));
}


function downloading(doc) {
parent.hidden.location="download.php3?doc="+doc;
}












function opensite(ref,scrw,scrh,col) {
parent.window.moveTo(0,0);
parent.window.resizeTo(screen.width,(screen.height-26));
opennav(ref,scrw,scrh,col);
}



function opennav(ref,scrw,scrh,col) {
open("main.php3?ref="+ref+"&scrw="+scrw+"&scrh="+scrh+"&cpl="+col,"sffmain","width=600,height=400,resizeable=no");
}


var desktop_wnd;

function opendesktop() {

desktop_wnd = open("contents/wallpaper/index.html","sffdesktops","width=150,height=300,scrollbars=yes");

}


function openport() {

port_end = open("contents/portfolio/index.html","sffport","width=150,height=300,scrollbars=yes");

}






function openflashcard() {

var scrw = screen.width;
var fc_height, fc_width;

fc_width=330;
fc_height=200;


flash_card = open("flashcard.html?h="+fc_height+"&w="+fc_width,"sffflash","fullscreen=yes,scrollbars=no");
}




function opencurrent() {

port_current = open("contents/current/index.html","sffcurrent","width=150,height=300,scrollbars=yes");

}



function openintro() {

intro_wnd = open("intro.html","sffintro","width=500,height=400");

}


function openexp() {

exp = open("exp.html","sffexp","width=434,height=423");

}


function openexp2() {

exp = open("../../exp.html","sffexp","width=434,height=423");

}







function confirm_submit(form,message) {
var rtn = confirm(message);

	//Submit the form
	if (rtn) {
	return true;
	}

return false;
}




//args: cell, colour
var changed = 0;
var old_colour = "SFF";

function cell_hover(cell,colour) {

	//mouse on
	if (changed == 0) {
	changed = 1;
	old_colour = cell.style.backgroundColor;
	cell.style.backgroundColor=colour;

	//mouse off
	} else {


		if (!colour) {
		changed = 0;	
		cell.style.backgroundColor=old_colour;
		} else {
		cell.style.backgroundColor=colour;
		}
	}
}






//args: object, colour
var changed = 0;
var old_colour = "SFF";

function table_hover(object,colour) {

	//mouse on
	if (changed == 0) {
	changed = 1;
	old_colour = object.style.backgroundColor;
	object.style.backgroundColor=colour;

	//mouse off
	} else {

		//use old colour
		if (!colour) {
		changed = 0;
		object.style.backgroundColor=old_colour;
		} else {
		object.style.backgroundColor=colour;
		}
	}
}












function checkemail2(email) {

	if (	email.length < 5 ||
	email.indexOf('.') == -1 || 
	email.indexOf('@') == -1 || 
	email.indexOf(';') != -1 ||
	email.indexOf(':') != -1 ||
	email.indexOf('!') != -1 ||
	email.indexOf('"') != -1 ||
	email.indexOf('£') != -1 ||
	email.indexOf('$') != -1 ||
	email.indexOf('%') != -1 ||
	email.indexOf('^') != -1 ||
	email.indexOf('&') != -1 ||
	email.indexOf('*') != -1 ||
	email.indexOf('?') != -1 ||
	email.indexOf('#') != -1 ||
	email.indexOf('}') != -1 ||
	email.indexOf('{') != -1 ||
	email.indexOf('~') != -1 ||
	email.indexOf('`') != -1) {

	return false;

	} else {
	return true;
	}
}






//args: cell, colour
var changed = 0;
var old_colour = "SFF";

function cell_hover(cell,colour) {

	//mouse on
	if (changed == 0) {
	changed = 1;
	old_colour = cell.style.backgroundColor
	cell.style.backgroundColor=colour;

	//mouse off
	} else {


		if (!colour) {
		changed = 0;	
		cell.style.backgroundColor=old_colour;
		} else {
		cell.style.backgroundColor=colour;
		}
	}
}









function bookmark() {
window.external.AddFavorite("http://www.CREATIVEshane.com","CREATIVEshane");
}




function resize_wnd(wnd_width,height) {
var widthx = new String(wnd_width);
var webpageheight = new String(height);

if (webpageheight.length == 9) {

	//Internet Explorer
	if (document.all) {
	webpageheight = parseInt(parent.parent.parent.document.body.clientHeight) + 132;

	//Netscape Navigator
	} else if (document.layers) {
	webpageheight = window.outerHeight;
	}
}



if (widthx == "max") {
parent.parent.parent.window.moveTo(0,50);
widthx = screen.width;
}


parent.parent.parent.window.resizeTo(widthx,webpageheight);
}



function clear_textbox(textboxname) {
var tempname = textboxname;
eval("parent.main.document.websiteform."+tempname+".value = ''");
}






function fDate() {

//Use system function to save date etc. info
dDateInfo = new Date();

//Convert Day of Week number into Day in Words
if (dDateInfo.getDay() == 0) {
wDay = "Sunday";
} else if (dDateInfo.getDay() == 1) {
wDay = "Monday";
} else if (dDateInfo.getDay() == 2) {
wDay = "Tuesday";
} else if (dDateInfo.getDay() == 3) {
wDay = "Wednesday";
} else if (dDateInfo.getDay() == 4) {
wDay = "Thursday";
} else if (dDateInfo.getDay() == 5) {
wDay = "Friday";
} else if (dDateInfo.getDay() == 6) {
wDay = "Saturday";
}

dDay = dDateInfo.getDate();

//Assign Day prefix
var pDay = "th";

if (dDay == 1) {
pDay = "st";
} else if (dDay == 2) {
pDay = "nd";
} else if (dDay == 3) {
pDay = "rd";
} else if (dDay == 21) {
pDay = "st";
} else if (dDay == 22) {
pDay = "nd";
} else if (dDay == 23) {
pDay = "rd";
} else if (dDay == 31) {
pDay = "st";
} else if (dDay == 32) {
pDay = "nd";
} else if (dDay == 33) {
pDay = "rd";
}

//Convert Month number into Month in Words
if (dDateInfo.getMonth() == 0) {
dMonth = "January";
} else if (dDateInfo.getMonth() == 1) {
dMonth = "February";
} else if (dDateInfo.getMonth() == 2) {
dMonth = "March";
} else if (dDateInfo.getMonth() == 3) {
dMonth = "April";
} else if (dDateInfo.getMonth() == 4) {
dMonth = "May";
} else if (dDateInfo.getMonth() == 5) {
dMonth = "June";
} else if (dDateInfo.getMonth() == 6) {
dMonth = "July";
} else if (dDateInfo.getMonth() == 7) {
dMonth = "August";
} else if (dDateInfo.getMonth() == 8) {
dMonth = "September";
} else if (dDateInfo.getMonth() == 9) {
dMonth = "October";
} else if (dDateInfo.getMonth() == 10) {
dMonth = "November";
} else if (dDateInfo.getMonth() == 11) {
dMonth = "December";
}

//var myvar = " " + loc;
//var locx = "";
//locx = myvar.substring(8);

var chyear;
var dYearx;
dYear = dDateInfo.getYear();
dYearx = " " + dYear; 
chyear = dYearx.substring(2);
dYear = chyear;

//Print Date on HTML document 
//Y2K bug fix (year = 100 in net nav. / year = 2000 in IE)

if (navigator.appName == "Microsoft Internet Explorer") {
dYear = chyear.substring(1);
} else {
dYear = chyear;
}


if (navigator.appName == "Netscape") {
	
	if (parseFloat(navigator.appVersion) == 4.04) {

	var rtn;
	rtn = wDay + ', ' + dDay + pDay + ' ' + dMonth + ' 2' + dYear;
	return rtn;
	} else if (parseFloat(navigator.appVersion) > 3) {
	var rtn;
	rtn = wDay + ', ' + dDay + pDay + ' ' + dMonth + ' 2' + dYear;
	return rtn;
	} else {
	var rtn;
	rtn = wDay + ', ' + dDay + pDay + ' ' + dMonth + ' 20' + dYear;
	return rtn;
	}


}  else {

var rtn;
rtn = wDay + ', ' + dDay + pDay + ' ' + dMonth + ' 20' + dYear;
return rtn;
}

}










//-->
