// JavaScript Document

function copyrightDate(){
	var d = new Date();
	var curr_year = d.getFullYear();
	var dateString = "&copy;" + " " + curr_year + " ";
	//return dateString
	document.write(dateString);
}





NumberOfHomeImagesToRotate = 13;
FirstPartHome = '<img src="images/rand/img';

NumberOfImagesToRotate = 13;
FirstPart = '<img src="images/rand/img1';

LastPart = '.jpg" width="339" height="162"/>';

function printImage() {
	var r = Math.ceil(Math.random() * NumberOfImagesToRotate);
	document.write(FirstPart + r + LastPart);
}

function printHomeImage() {
	var r = Math.ceil(Math.random() * NumberOfHomeImagesToRotate);
	document.write(FirstPartHome + r + LastPart);
}

//derived from http://newsourcemedia.com/art.117.flash_activex_workaround_.php
function embedFlash(swfName, swfHeight, swfWidth, swfAlign){
	var swfPath;
	swfPath = "swf/" + swfName + ".swf";
	
	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="' + swfWidth + ' " height="' + swfHeight + '" id="' + swfName + '" align="' + swfAlign + '">');
	document.write('<param name="allowScriptAccess" value="sameDomain" /><param name="wmode" value="window" />');
	document.write('<param name="movie" value="' + swfPath + '" /><param name="quality" value="high" />');
	document.write('<embed src="' + swfPath + '" allowScriptAccess="sameDomain" wmode="window" quality="high" align="' + swfAlign + '" width="' + swfWidth + '" height="' + swfHeight + '" wmode="window" name="' + swfName + '" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}
