// JavaScript Document
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		tn_home_over = newImage("/images/tn_home_over.jpg");
		tn_about_over = newImage("/images/tn_about_over.jpg");
		tn_contact_over = newImage("/images/tn_contact_over.jpg");
		tn_client_over = newImage("/images/tn_client_over.jpg");	
		sub_nav_01_over = newImage("/images/sub_nav_01_over.jpg");
		sub_nav_02_over = newImage("/images/sub_nav_02_over.jpg");
		sub_nav_03_over = newImage("/images/sub_nav_03_over.jpg");
		sub_nav_04_over = newImage("/images/sub_nav_04_over.jpg");
		sub_nav_05_over = newImage("/images/sub_nav_05_over.jpg");
		sub_nav_06_over = newImage("/images/sub_nav_06_over.jpg");
		preloadFlag = true;
	}
}

function displayNoFlashContent()
{
	//alert("000 NO GOT HERE");
	strNoFlash =  "<table id='top_nav' width='737' height='80' border='0' cellpadding='0' cellspacing='0'>";
	strNoFlash += "<tr>";
	strNoFlash += "<td rowspan='2' bgcolor='#000000'>";
	strNoFlash += "<a href='/'><img src='/images/tn_logo.jpg' width='265' height='80' border='0' alt='Mills/James Productions' /></a>";
	strNoFlash += "</td>";
	strNoFlash += "<td colspan='4' bgcolor='#000000'>";
	strNoFlash += "<img src='/images/tn_top.jpg' width='344' height='16' alt='' /></td>";
	strNoFlash += "<td rowspan='2' bgcolor='#000000'>";
	strNoFlash += "<img src='/images/tn_right.jpg' width='128' height='80' alt='' /></td>";
	strNoFlash += "</tr>";
	strNoFlash += "<tr>";
	strNoFlash += "<td bgcolor='#000000'>";
	strNoFlash += "<a href='/'";
	strNoFlash += "onmouseover=\"changeImages('tn_home', '/images/tn_home_over.jpg'); return true;\"";
	strNoFlash += "onmouseout=\"changeImages('tn_home', '/images/tn_home.jpg'); return true;\"";
	strNoFlash += "onmousedown=\"changeImages('tn_home', '/images/tn_home_over.jpg'); return true;\"";
	strNoFlash += "onmouseup=\"changeImages('tn_home', '/images/tn_home_over.jpg'); return true;\">";
	strNoFlash += "<img name='tn_home' src='/images/tn_home.jpg' width='86' height='64' border='0' alt='' /></a></td>";
	strNoFlash += "<td bgcolor='#000000'>";
	strNoFlash += "<a href='/about.php' ";
	strNoFlash += "onmouseover=\"changeImages('tn_about', '/images/tn_about_over.jpg'); return true;\"";
	strNoFlash += "onmouseout=\"changeImages('tn_about', '/images/tn_about.jpg'); return true;\"";
	strNoFlash += "onmousedown=\"changeImages('tn_about', '/images/tn_about_over.jpg'); return true;\"";
	strNoFlash += "onmouseup=\"changeImages('tn_about', '/images/tn_about_over.jpg'); return true;\">";
	strNoFlash += "<img name='tn_about' src='/images/tn_about.jpg' width='86' height='64' border='0' alt='' /></a></td>";
	strNoFlash += "<td bgcolor='#000000'>";
	strNoFlash += "<a href='/contactus.php' ";
	strNoFlash += "onmouseover=\"changeImages('tn_contact', '/images/tn_contact_over.jpg'); return true;\"";
	strNoFlash += "onmouseout=\"changeImages('tn_contact', '/images/tn_contact.jpg'); return true;\"";
	strNoFlash += "onmousedown=\"changeImages('tn_contact', '/images/tn_contact_over.jpg'); return true;\"";
	strNoFlash += "onmouseup=\"changeImages('tn_contact', '/images/tn_contact_over.jpg'); return true;\">";
	strNoFlash += "<img name='tn_contact' src='/images/tn_contact.jpg' width='86' height='64' border='0' alt='' /></a></td>";
	strNoFlash += "<td bgcolor='#000000'>";
	strNoFlash += "<a href='http://library.mjp.com/' target='_blank'";
	strNoFlash += "onmouseover=\"changeImages('tn_client', '/images/tn_client_over.jpg'); return true;\"";
	strNoFlash += "onmouseout=\"changeImages('tn_client', '/images/tn_client.jpg'); return true;\"";
	strNoFlash += "onmousedown=\"changeImages('tn_client', '/images/tn_client_over.jpg'); return true;\"";
	strNoFlash += "onmouseup=\"changeImages('tn_client', '/images/tn_client_over.jpg'); return true;\">";
	strNoFlash += "<img name='tn_client' src='/images/tn_client.jpg' width='86' height='64' border='0' alt='' /></a></td>";
	strNoFlash += "</tr>";
	strNoFlash += "</table>";
	
	strNoFlash += "<table id='sub_nav' width='737' height='39' border='0' cellpadding='0' cellspacing='0'>";
	strNoFlash += "<tr>";
	strNoFlash += "<td>";
	strNoFlash += "<a href='/dept/videoFilm.php'";
	strNoFlash += "onmouseover=\"changeImages('sub_nav_01', '/images/sub_nav_01_over.jpg'); return true;\"";
	strNoFlash += "onmouseout=\"changeImages('sub_nav_01', '/images/sub_nav_01.jpg'); return true;\"";
	strNoFlash += "onmousedown=\"changeImages('sub_nav_01', '/images/sub_nav_01_over.jpg'); return true;\"";
	strNoFlash += "onmouseup=\"changeImages('sub_nav_01', '/images/sub_nav_01_over.jpg'); return true;\">";
	strNoFlash += "<img name='sub_nav_01' src='/images/sub_nav_01.jpg' width='122' height='39' border='0' alt='' /></a></td>";
	strNoFlash += "<td>";
	strNoFlash += "<a href='/dept/meetingsEvents.php'";
	strNoFlash += "onmouseover=\"changeImages('sub_nav_02', '/images/sub_nav_02_over.jpg'); return true;\"";
	strNoFlash += "onmouseout=\"changeImages('sub_nav_02', '/images/sub_nav_02.jpg'); return true;\"";
	strNoFlash += "onmousedown=\"changeImages('sub_nav_02', '/images/sub_nav_02_over.jpg'); return true;\"";
	strNoFlash += "onmouseup=\"changeImages('sub_nav_02', '/images/sub_nav_02_over.jpg'); return true;\">";
	strNoFlash += "<img name='sub_nav_02' src='/images/sub_nav_02.jpg' width='123' height='39' border='0' alt='' /></a></td>";
	strNoFlash += "<td>";
	strNoFlash += "<a href='/dept/webInt.php'";
	strNoFlash += "onmouseover=\"changeImages('sub_nav_03', '/images/sub_nav_03_over.jpg'); return true;\"";
	strNoFlash += "onmouseout=\"changeImages('sub_nav_03', '/images/sub_nav_03.jpg'); return true;\"";
	strNoFlash += "onmousedown=\"changeImages('sub_nav_03', '/images/sub_nav_03_over.jpg'); return true;\"";
	strNoFlash += "onmouseup=\"changeImages('sub_nav_03', '/images/sub_nav_03_over.jpg'); return true;\">";
	strNoFlash += "<img name='sub_nav_03' src='/images/sub_nav_03.jpg' width='123' height='39' border='0' alt='' /></a></td>";
	strNoFlash += "<td>";
	strNoFlash += "<a href='/dept/avStaging.php'";
	strNoFlash += "onmouseover=\"changeImages('sub_nav_04', '/images/sub_nav_04_over.jpg'); return true;\"";
	strNoFlash += "onmouseout=\"changeImages('sub_nav_04', '/images/sub_nav_04.jpg'); return true;\"";
	strNoFlash += "onmousedown=\"changeImages('sub_nav_04', '/images/sub_nav_04_over.jpg'); return true;\"";
	strNoFlash += "onmouseup=\"changeImages('sub_nav_04', '/images/sub_nav_04_over.jpg'); return true;\">";
	strNoFlash += "<img name='sub_nav_04' src='/images/sub_nav_04.jpg' width='123' height='39' border='0' alt='' /></a></td>";
	strNoFlash += "<td>";
	strNoFlash += "<a href='/dept/production.php'";
	strNoFlash += "onmouseover=\"changeImages('sub_nav_05', '/images/sub_nav_05_over.jpg'); return true;\"";
	strNoFlash += "onmouseout=\"changeImages('sub_nav_05', '/images/sub_nav_05.jpg'); return true;\"";
	strNoFlash += "onmousedown=\"changeImages('sub_nav_05', '/images/sub_nav_05_over.jpg'); return true;\"";
	strNoFlash += "onmouseup=\"changeImages('sub_nav_05', '/images/sub_nav_05_over.jpg'); return true;\">";
	strNoFlash += "<img name='sub_nav_05' src='/images/sub_nav_05.jpg' width='123' height='39' border='0' alt='' /></a></td>";
	strNoFlash += "<td>";
	strNoFlash += "<a href='/dept/broadcastServices.php'";
	strNoFlash += "onmouseover=\"changeImages('sub_nav_06', '/images/sub_nav_06_over.jpg'); return true;\"";
	strNoFlash += "onmouseout=\"changeImages('sub_nav_06', '/images/sub_nav_06.jpg'); return true;\"";
	strNoFlash += "onmousedown=\"changeImages('sub_nav_06', '/images/sub_nav_06_over.jpg'); return true;\"";
	strNoFlash += "onmouseup=\"changeImages('sub_nav_06', '/images/sub_nav_06_over.jpg'); return true;\">";
	strNoFlash += "<img name='sub_nav_06' src='/images/sub_nav_06.jpg' width='123' height='39' border='0' alt='' /></a></td>";
	strNoFlash += "</tr>";
	strNoFlash += "</table>";
	
	document.write(strNoFlash);

}

function displayHTMLhomePage()
{
	strNoFlash  =  "<table id='Table_01' width='733' height='273' border='0' cellpadding='0' cellspacing='0' align='center'>";
	strNoFlash +=  "<tr>";
	strNoFlash +=  "<td width='3' rowspan='8' background='/images/fade_left.gif'></td>";
	strNoFlash +=  "<td rowspan='6' bgcolor='#000000'>";
	strNoFlash +=  "<img src='/images/random_photo.jpg' width='393' height='273' alt='' /></td>";
	strNoFlash +=  "<td width='1' height='273' rowspan='6' bgcolor='#FFFFFF'>";
	strNoFlash +=  "<img src='/images/spacer.gif' width='1' height='273' alt='' /></td>";
	strNoFlash +=  "<td bgcolor='#000000'>";
	strNoFlash +=  "<a href='/dept/videoFilm.php' ";
	strNoFlash +=  "onmouseover=\"changeImages('video', '/images/video_over.jpg'); return true;\" ";
	strNoFlash +=  "onmouseout=\"changeImages('video', '/images/video.jpg'); return true;\" ";
	strNoFlash +=  "onmousedown=\"changeImages('video', '/images/video_over.jpg'); return true;\" ";
	strNoFlash +=  "onmouseup=\"changeImages('video', '/images/video_over.jpg'); return true;\">";
	strNoFlash +=  "<img name='video' id='videofilm' src='/images/video.jpg' width='343' height='45' border='0' alt='' /></a></td>";
	strNoFlash +=  "<td width='3' rowspan='8' background='/images/fade_right.gif'></td>";
	strNoFlash +=  "</tr>";
	strNoFlash +=  "<tr>";
	strNoFlash +=  "<td bgcolor='#000000'>";
	strNoFlash +=  "<a href='/dept/meetingsEvents.php' ";
	strNoFlash +=  "onmouseover=\"changeImages('corporate', '/images/corporate_over.jpg'); return true;\" ";
	strNoFlash +=  "onmouseout=\"changeImages('corporate', '/images/corporate.jpg'); return true;\" ";
	strNoFlash +=  "onmousedown=\"changeImages('corporate', '/images/corporate_over.jpg'); return true;\" ";
	strNoFlash +=  "onmouseup=\"changeImages('corporate', '/images/corporate_over.jpg'); return true;\">";
	strNoFlash +=  "<img name='corporate' src='/images/corporate.jpg' width='343' height='46' border='0' alt='' /></a></td>";
	strNoFlash +=  "</tr>";
	strNoFlash +=  "<tr>";
	strNoFlash +=  "<td bgcolor='#000000'>";
	strNoFlash +=  "<a href='/dept/meetingsEvents.php' ";
	strNoFlash +=  "onmouseover=\"changeImages('web', '/images/web_over.jpg'); return true;\" ";
	strNoFlash +=  "onmouseout=\"changeImages('web', '/images/web.jpg'); return true;\" ";
	strNoFlash +=  "onmousedown=\"changeImages('web', '/images/web_over.jpg'); return true;\" ";
	strNoFlash +=  "onmouseup=\"changeImages('web', '/images/web_over.jpg'); return true;\"> ";
	strNoFlash +=  "<img name='web' src='/images/web.jpg' width='343' height='46' border='0' alt='' /></a></td>";
	strNoFlash +=  "</tr>";
	strNoFlash +=  "<tr>";
	strNoFlash +=  "<td bgcolor='#000000'>";
	strNoFlash +=  "<a href='/dept/avStaging.php' ";
	strNoFlash +=  "onmouseover=\"changeImages('staging', '/images/staging_over.jpg'); return true;\" ";
	strNoFlash +=  "onmouseout=\"changeImages('staging', '/images/staging.jpg'); return true;\" ";
	strNoFlash +=  "onmousedown=\"changeImages('staging', '/images/staging_over.jpg'); return true;\" ";
	strNoFlash +=  "onmouseup=\"changeImages('staging', '/images/staging_over.jpg'); return true;\">";
	strNoFlash +=  "<img name='staging' src='/images/staging.jpg' width='343' height='46' border='0' alt='' /></a></td>";
	strNoFlash +=  "</tr>";
	strNoFlash +=  "<tr>";
	strNoFlash +=  "<td bgcolor='#000000'>";
	strNoFlash +=  "<a href='/dept/avStaging.php' ";
	strNoFlash +=  "onmouseover=\"changeImages('post', '/images/post_over.jpg'); return true;\" ";
	strNoFlash +=  "onmouseout=\"changeImages('post', '/images/post.jpg'); return true;\" ";
	strNoFlash +=  "onmousedown=\"changeImages('post', '/images/post_over.jpg'); return true;\" ";
	strNoFlash +=  "onmouseup=\"changeImages('post', '/images/post_over.jpg'); return true;\">";
	strNoFlash +=  "<img name='post' src='/images/post.jpg' width='343' height='46' border='0' alt='' /></a></td>";
	strNoFlash +=  "</tr>";
	strNoFlash +=  "<tr>";
	strNoFlash +=  "<td bgcolor='#000000'>";
	strNoFlash +=  "<a href='/dept/broadcastServices.php' ";
	strNoFlash +=  "onmouseover=\"changeImages('broadcast', '/images/broadcast_over.jpg'); return true;\" ";
	strNoFlash +=  "onmouseout=\"changeImages('broadcast', '/images/broadcast.jpg'); return true;\" ";
	strNoFlash +=  "onmousedown=\"changeImages('broadcast', '/images/broadcast_over.jpg'); return true;\" ";
	strNoFlash +=  "onmouseup=\"changeImages('broadcast', '/images/broadcast_over.jpg'); return true;\">";
	strNoFlash +=  "<img name='broadcast' src='/images/broadcast.jpg' width='343' height='44' border='0' alt='' /></a></td>";
	strNoFlash +=  "</tr>";
	strNoFlash +=  "<tr>";
	strNoFlash +=  "</table>";
	
	document.write(strNoFlash);

}

function displayHTMLdeptImages()
{
	var TheName = getPageName();
	
	var strImageName = null;;
	switch(TheName)
	{
		case "videofilm":
		strImageName = "1.0slide6.jpg";
		strImageNavName = "sub_nav_01_over.jpg";
		break;
		
		case "meetingsevents":
		strImageName = "2.0slide4.jpg";
		break;
		
		case "webint":
		strImageName = "3.0slide4.jpg";
		break;
		
		case "avstaging":
		strImageName = "4.0slide2.jpg";
		break;
		
		case "production":
		strImageName = "5.0slide4.jpg";
		break;

		case "broadcastservices":
		strImageName = "1.0slide6.jpg";
		break;	
	}
	
	strNoFlash  =  "<img src='/dept/slideshowImages/" + strImageName + "'>";
	document.write(strNoFlash);
	
	/*
	if(document.getElementById(TheName)){
		document.getElementById(TheName).src="/images/" + strImageNavName;
	}
	gfx3.0_WebSolutions.jpg
	*/
}


function displayHTMLservicesImages()
{
	var TheName = getPageName();
	var strImageName = null;;
	switch(TheName)
	{
		case "videofilm":
		strImageName = "gfx3.0_VidCompression.jpg";
		break;
		
		case "meetingsevents":
		strImageName = "gfx1.0_VidFilm.jpg";
		break;
		
		case "webint":
		strImageName = "gfx3.0_VidCompression.jpg";
		break;
		
		case "avstaging":
		strImageName = "gfx3.0_VidCompression.jpg";
		break;
		
		case "production":
		strImageName = "gfx3.0_WebSolutions.jpg";
		break;

		case "broadcastservices":
		strImageName = "gfx3.0_VidCompression.jpg";
		break;	
	}
	
	strNoFlash  =  "<img src='/images/contentAreaGfx/" + strImageName + "'>";
	document.write(strNoFlash);
	
}

function getPageName()
{
	var strHref = window.location.href;
	var where_is_mytool= strHref;
	var mytool_array=where_is_mytool.split("/");

	var TheFileName = null;
	var TheFileName = mytool_array[(mytool_array.length-1)]
	//alert("TheFileName:" + TheFileName);
	
	//Get the Index of the '.'
	var TheName = TheFileName.substring(0, TheFileName.lastIndexOf('.')).toLowerCase();
	//alert("TheName= " + TheName);
	return TheName;
}