// external javascript code
// NO HTML MARKUP ALLOWED


// External control 'play/pause' for flash movie
function sspToggleDisplayMode() {
thisMovie("ssp").sspToggleDisplayMode();
		
}


// External control 'previous' for flash movie
function sspPreviousImage() {
thisMovie("ssp").sspPreviousImage();
		
}

// External control 'next' for flash movie
function sspNextImage() {
thisMovie("ssp").sspNextImage();
		
}


// Load a flash movie
function sspLoadAlbum() {
thisMovie("ssp").sspLoadAlbum();
		
}

// Passes the ID of the album from the XML file we want SlideShowPro inside the SWF to load
function thisMovie(movieName) {
	if (navigator.appName.indexOf("Microsoft") != -1) {
		return window[movieName]
	} else {
		return document[movieName]
	}
}


// Function to 'popup' new window
function OpenWindow( url, width, height, options, name ) {
            
	if ( ! width ) width = 480;
	if ( ! height ) height = 480;
	if ( ! options ) options = "scrollbars=no,menubar=no,toolbar=no,location=no,status=no,resizable=no";
	if ( ! name ) name = "outsideSiteWindow";

	var newWin = window.open( url, name, "width=" + width + ",height=" + height + "," + options ); 

}

// Function to Embed a Flash Movie
function flashIndex() {

document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="595" height="356">\n');
document.write('<param name="movie" value="index.swf" />\n');
document.write('<param name="quality" value="high" />\n');
document.write('<embed src="index.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="595" height="356"></embed>\n');
document.write('</object>\n');

}

// Function to Embed a Quicktime Movie
function videoIndex() {

document.write('<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0" height="256" width="320">\n');
document.write('<param name="src" value="1_video/poster.mov" />\n');
document.write('<param name="autoplay" value="true" />\n');
document.write('<param name="loop" value="false" />\n');
document.write('<param name="controller" value="false" />\n');
document.write('<param name="playeveryframe" value="false" />\n');
document.write('<param name="scale" value="tofit" />\n');
document.write('<param name="target" value="myself" />\n');
document.write('<param name="href" value="azpca_autocross_968.mpg" />\n');
document.write('<param name="type" value="video/quicktime" />\n');
document.write('<param name="pluginspage" value="http://www.apple.com/quicktime/download/" />\n');
document.write('<embed WIDTH="320" HEIGHT="256" BORDER="0" BGCOLOR="FFFFFF" SRC="1_video/poster.mov" AUTOPLAY="true" LOOP="false" CONTROLLER="false" PLAYEVERYFRAME="false" SCALE="tofit" TARGET="myself" HREF="<azpca_autocross_968.mpg> T<myself> E<CONTROLLER=true AUTOPLAY=true>" TYPE="video/quicktime" PLUGINSPAGE="http://www.apple.com/quicktime/download/"></embed>\n');
document.write('</object>\n');

}


// Function to Swap Image
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
