// JavaScript Document

// create function to display flash movie without a "click to activate" warning
function writeFlashMovie (movieToLoad, stylesheet) {
	if (movieToLoad == "flashHeader") {
		document.write ('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="1000" height="125" title="Header">');
		document.write ('<param name="quality" value="high" /><param name="BGCOLOR" value="#000000" />');
		document.write ('<param name="SRC" value="flash/' + stylesheet + '/header_base.swf" />');
		document.write ('<embed src="flash/' + stylesheet + '/header_base.swf" width="1000" height="125" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" bgcolor="#000000"></embed>');
		document.write ('</object>');
	} else if (movieToLoad == "flashFooter") {
		document.write ('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="1000" height="40" title="Footer">');
		document.write ('<param name="quality" value="high" /><param name="BGCOLOR" value="#000000" />');
		document.write ('<param name="SRC" value="flash/' + stylesheet + '/footer_base.swf" />');
		document.write ('<embed src="flash/' + stylesheet + '/footer_base.swf" width="1000" height="40" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" bgcolor="#000000"></embed>');
		document.write ('</object>');
	}
}
// = CREATE VARIABLE TO BE USED FOR IMAGE NUMBER
var image_num = 1;
var image_total;
// = FUNCTION TO SWAP LARGE IMAGE ON SHOWCASE FULL PAGE
function portfolioSwap(folder, who, num, total, action) {
	image_total = total;
	if (num == "") {
		if (action == "next") {
			num = image_num + 1;
			if (num > image_total) {
				num = image_num;
			}
		} else if (action == "prev") {
			num = image_num - 1;
			if (num <= 0) {
				num = image_num;
			}
		}
	}
	if (num < 10) {
		imgNum = "0" + num;
	}
	var imgView = folder + "//" + who + "_" + imgNum + ".jpg";
	//alert (imgView);
	document.images.portfolioLarge.src = imgView;
	image_num = num;
	//alert (image_num + "\n" + image_total);
}
// FUNCTION TO SWAP ANY IMAGE
function imageSwap (who, folder) {
	if (document.images) {
		document[who].src = folder;
	}
}