/*  BMT 216A page file
 *  Copyright (C) 2001 Preben S¿gaard, Denmark
 *  Only for use on the 'BMT 216A The James Bond Vehicle Library' web page.
 *	Any other use prohibited without written consent from the webmaster
 *	Contact: information"@"bmt216a.dk     (address anti-Spammed - remove ")
 */
 
var errorCount = 0;

function errorMessage() {
	errorCount++;
	if (errorCount < 3) {
		alert("Sorry, an error has occured!\nPlease send an e-mail to info@bmt216a.dk,\nstating the problem.\n\nBMT216A webmaster");
	}
	return true;
}

window.onresize = new Function("window.location.reload()");
 
if(top.location == self.location) {
	top.location.href = "http://www.bmt216a.dk/Front.html";
}

var pageheader = "<a name='top'></a>"

var pagefooter = "<center><p>"
 + "<font color='white'>Mail comments to <b><a href='&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#105;&#110;&#102;&#111;&#114;&#109;&#97;&#116;&#105;&#111;&#110;&#64;&#98;&#109;&#116;&#50;&#49;&#54;&#97;&#46;&#100;&#107;'>&#66;&#77;&#84;&#32;&#50;&#49;&#54;&#65;</a>"
 + " | <a href='#top'>To page top</a>"
 + " | <a href='JavaScript:history.go(-1)'>Back</a> |</b>"
 + "<p><h6>This page is last modified on&nbsp;<script language='JavaScript1.2'>document.write(document.lastModified);</script>"
 + "<br>Copyright &copy; 2000-2010 (The BMT 216A Team) Preben S&oslash;gaard, Denmark - webmaster. All rights reserved.</h6>"

 
var closeWin="0"; // Do you want to close window after message (1 for yes 0 for no)

// JavaScript by Dave Lauderdale
// Published at: www.digi-dl.com

function IE(e) 
{
     if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3))
     {
          alert(message); if(closeWin=="1") self.close();
          return false;
     }
}
function NS(e) 
{
     if (document.layers || (document.getElementById && !document.all))
     {
          if (e.which==2 || e.which==3)
          {
               alert(message); if(closeWin=="1") self.close();
               return false;
          }
     }
}
 
// standard pagefunctions for datasheets

function printMovieRelation() {
		var temp = new Array;
		temp = thisVehicle.getMovies();
		document.write("<h3>Film");
		if (temp.length > 1) {
			document.write("s");
		}
		document.write("</h3><p>");

		for ( m in temp ) {			
			document.write( parent.movieArray[ temp[m] ].getTitle() + " (");
			document.write( parent.movieArray[ temp[m] ].getYear() + ")<br>");
		}
		document.write( "<h3>007 relation</h3><p>" );
		temp = thisVehicle.getCategories();
		for ( c in temp ) {
			if ( temp [c] != "0" ) {	document.write( parent.vehicleCategories[ temp[c] ] + "<br>" );	}
		}	
}

function printExternalLinks() {
	document.write("<TABLE WIDTH='100%'>");
	for ( i in parent.linksArray ) {
		if ( ( parent.linksArray[i].isLinkOK() ) && ( parent.linksArray[i].hasVehicle("" + thisID) ) ) {
			document.write("<tr><td class='box' align='center' width='30%'>");
			document.write(parent.linksArray[i].getImageAsLink() + "</td><td class='box' width='70%'> - " + parent.linksArray[i].getDescription() );
			document.write("</td></tr>");
		}
	}
	document.write("</table>");
}

var slideCount = 0;
function slideShow() {
	if (slidesArray.length > 1) {
		if (document.curSlide.complete) {
    	   slideCount++;
    	   if (slideCount == slidesArray.length ) {
    	       slideCount = 0;
    	   }
    	   document.curSlide.src=slidesArray[slideCount];
		}
		setTimeout("slideShow()",timing * 1000);
	}
}

function footer() {
	var modi	= new Date(document.lastModified);
	var argu	= arguments.length;
	// defaults
	var menuBar	= "<font color='white'>Mail comments to <b><a href='&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#105;&#110;&#102;&#111;&#114;&#109;&#97;&#116;&#105;&#111;&#110;&#64;&#98;&#109;&#116;&#50;&#49;&#54;&#97;&#46;&#100;&#107;'>&#66;&#77;&#84;&#32;&#50;&#49;&#54;&#65;</a>"
 		+ " | <a href='#top'>To page top</a>"
		+ " | <a href='JavaScript:history.go(-1)'>Back</a></b><br />";
	var countPage	= ""; // No counter
	
	var peak	= "<p><!-- START PEAKCOUNTER KODE --> - <!-- SLUT PEAKCOUNTER KODE -->";
 	
 	var webstat	= "<!-- BEGIN WebSTAT Activation Code -->"
		+ "<script type='text/javascript' language='JavaScript' src='http://hits.webstat.com/cgi-bin/wsv2_framed.cgi?64353'></script>"
		+ "<noscript>"
		+ "<a href='http://www.webstat.com'>"
		+ "<img SRC='http://hits.webstat.com/scripts/wsb.php?ac=64353' border='0' alt='Web Stats - Free Realtime Web Statistics Tracker & Counter'></a>"
		+ "</noscript>"
		+ "<!-- END WebSTAT Activation Code --></p>"
 		
	for (i in arguments) {
		var temp	= arguments[i].split("=");

		switch (temp[0].toUpperCase()) {
		case "COUNTER":
			if (temp[1] != "") {
					countPage	= "<br />This page visited <img src='/cgi-bin/Count.cgi?dd=D|istrip=1|tr=0|ft=0|md=6|pad=0|df=" + temp[1] + "'> times.";	//  Countername or "-" for no counter
					countPage = "";
			}
			break;
		case "MENU":
			if (temp[1].toUpperCase() == "NO") {
				menuBar	= ""; //  "" is no menubar
			}
			break;
		}
	}
	// do the printing
	document.write("<center><br>");
	document.write(menuBar);
	document.write("<h6>");
	if (modi.getFullYear() > "2000") {
 		document.write("<br />This page was last modified on&nbsp;" + modi.toLocaleString() + ".");
 	}
	document.write("<br />Copyright &copy; 2001-2011 (BMT 216A Team) Preben S&oslash;gaard, Denmark - webmaster. All rights reserved.");
	document.write(countPage);
	document.write("</H6>");
	document.write("</h6>" + webstat);
	document.write("<br /></center>");
}
//end
