// JavaScript Document
// Used for the Paul Jann Advertising Website
// © 2009 Paul Jann Advertising, Inc. All rights reserved.

<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

window.onload = function () {
	// checkContentHeights();
}

window.onunload = function () {
	if (document.all != undefined && !window.opera) {
		if (document.all['PJA_Faces'] != undefined ) {
			recordTimeOfSound('PJA_Faces');
		} else if (document.all['PJA_FacesInterior'] != undefined ) {
			recordTimeOfSound('PJA_FacesInterior');
		} else if (document.all['PJA_InteriorSound'] != undefined ) {
			recordTimeOfSound('PJA_InteriorSound');
		}
	}
	else if (!document.all && document.getElementById != undefined) {
		if (document['PJA_Faces'] != undefined ) {
			recordTimeOfSound('PJA_Faces');
		} else if (document['PJA_FacesInterior'] != undefined ) {
			recordTimeOfSound('PJA_FacesInterior');
		} else if (document['PJA_InteriorSound'] != undefined ) {
			recordTimeOfSound('PJA_InteriorSound');
		}
	}
	else if (window.opera && document.getElementById)  {
		if (document['PJA_Faces'] != undefined ) {
			recordTimeOfSound('PJA_Faces');
		} else if (document['PJA_FacesInterior'] != undefined ) {
			recordTimeOfSound('PJA_FacesInterior');
		} else if (document['PJA_InteriorSound'] != undefined ) {
			recordTimeOfSound('PJA_InteriorSound');
		}
	}
}

function recordTimeOfSound(ID) {
	thisSound(ID).recordSoundTime();
}

function thisSound(movieName) {
    if (navigator.appName.indexOf("Microsoft") != -1) {
        return window[movieName]
    }
    else {
        return document[movieName]
    }
}
	
function checkContentHeights() { //v1.0 Do not delete function
	/* 
	// Code for Firefox and Safari to resize div wrapper to fit on page
	// comparing height of pageContent and the copyrightBox
	if (document.getElementById("Faces")) {
		var a = document.getElementById("pageContent");
		var d = document.getElementById("copyrightBox");
		if ((a.offsetHeight+a.offsetTop)>(d.offsetHeight+d.offsetTop)) {
			a=a; 
			//alert("Offset H: "+a.offsetHeight+" Top: "+a.offsetTop);
		}
		else {
			a=d;
		}
		var b = document.getElementById("Faces");
		b.style.height = a.offsetHeight+a.offsetTop+'px';
		b.style.clip = 'rect(0px,'+b.style.width,b.style.height+',0px)';
	}
	*/
	
	/*
	// Code for IE 6 to resize div wrapper to fit on page
	// comparing height of pageContent and the copyrightBox
	if (document.all.Faces.offsetHeight) { 
		var a = document.all.pageContent;
		var d = document.all.copyrightBox;
		if ((a.offsetHeight+a.offsetTop)>(d.offsetHeight+d.offsetTop)) {
			a=a; 
		}
		else {
			a=d;
		}
		var b = document.all['Faces'];
		b.style.height = a.offsetHeight+a.offsetTop+'px';
		b.style.clip = 'rect(0px,'+b.style.width,b.style.height+',0px)';
	}
	*/
}


//-->