﻿function ShowMenu(id) {
	var b = navigator.appName;
	var m = document.getElementById(id);
	m.style.visibility = 'visible';	
//	alert (m.style.top);
//	m.style.top = (b == "Microsoft Internet Explorer")?'50px' : '43px';
}
function HideMenu(id) {
	var m = document.getElementById(id);
	m.style.visibility = 'Hidden';
}

function DispJPG(path,fn) {
	var img = new Image();
	img.src = "/" + path + "/" +fn + "-lg.jpg";
	h = img.height + 40;
	w = img.width + 40;
	if (h == 40) {
		w = 680;
		h = 520;
	}
	
	if (typeof JPGwin != "undefined") {
		if (!JPGwin.closed) {
			JPGwin.close();
		}
	}
	
	JPGwin = window.open(img.src,"Image","width=" + w +",height=" + h + ",resizable=yes,scrollbars=yes");
	JPGwin.moveTo(10,10);
	JPGwin.focus();
}

function DispImg(fn) {
	var img = new Image();
	img.src = fn;
	forty = 40;
	h = img.height + forty;
	w = img.width + forty;
	if (h == forty || w  == forty) {w = 700; h = 500;}
	if (typeof JPGwin != "undefined") {if (!JPGwin.closed) {JPGwin.close();}}
	JPGwin = window.open(img.src,"TruckImg","width=" + w +",height=" + h + "menubar=no,resizable=yes,scrollbars=yes,titlebar=no,toolbar=no");
	JPGwin.title = "Oilmen's Truck Tanks, Inc.";
	JPGwin.moveTo(10,10);
	JPGwin.focus();
}

function ShowImg(fn) {
	window.location.assign("show_img.htm");
	alert (window.location);
	alert (fn);
	alert (window.document.title);
}
function PlayMovie(movie) {

		document.getElementById('PlayerCell').innerHTML=
			  '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '
			+ 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" '
			+ 'width="362" height="242" align="top">'
			+ '<param name="allowScriptAccess" value="sameDomain">'
			+ '<param id="movparam" name="movie" value="movies/'
			+ movie
			+ '.swf">'
			+ '<param name="quality" value="best">'
			+ '<param name="bgcolor" value="#ffffff">'
			+ '<param name="allowFullScreen" value="true">'
			+ '<param name="menu" value="false">'
			+ '<embed id="embedsrc" src="movies/'
			+ movie
			+ '.swf" quality="best" align="top" menu="false" bgcolor="#ffffff" '
			+ 'width="362" height="242" allowFullScreen="true" allowScriptAccess="sameDomain" '
			+ 'type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">'
			+ '</object><script type="text/javascript" src="iefix.js"></script>';	
}

function ShowImgSave(fn) {
	alert (event.screenX);
	alert (event.screenY);
	var img = new Image();
	img.src = fn;
	if (typeof JPGwin != "undefined") {if (!JPGwin.closed) {JPGwin.close();}}
//
//  Width and height parameters are the actual image width and height plus 40 to account
//  for window border, scrollbar space, etc..
//
	JPGwin = window.open(img.src,"TruckImg","width=680,height=457,location=no,directories-no,menubar=no,resizable=no,scrollbars=yes,titlebar=yes,toolbar=no");
	JPGwin.document.title = "Oilmen's Truck Tanks, Inc.";
	JPGwin.moveBy(5,5); // Make sure Window is completely on the screen
var winX = (document.all)?JPGwin.screenLeft:JPGwin.screenX;
alert (winX);
var winY = (document.all)?JPGwin.screenTop:JPGwin.screenY;
alert (winY);
	JPGwin.focus();
}
function PlayMovie(movie) {

		document.getElementById('PlayerCell').innerHTML=
			  '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '
			+ 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" '
			+ 'width="362" height="242" align="top">'
			+ '<param name="allowScriptAccess" value="sameDomain">'
			+ '<param id="movparam" name="movie" value="videos/'
			+ movie
			+ '.swf">'
			+ '<param name="quality" value="best">'
			+ '<param name="bgcolor" value="#ffffff">'
			+ '<param name="allowFullScreen" value="true">'
			+ '<param name="menu" value="false">'
			+ '<param name="wmode" value="transparent">'
			+ '<embed id="embedsrc" src="videos/'
			+ movie
			+ '.swf" quality="best" wmode="transparent" align="top" menu="false" bgcolor="#ffffff" '
			+ 'width="362" height="242" allowFullScreen="true" allowScriptAccess="sameDomain" '
			+ 'type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">'
			+ '</object><script type="text/javascript" src="iefix.js"></script>';	
}