//==================================================
//
// reelbio.js - created by Niki Gallo 3/3/2003
// for use by www.reelbiography.com
// modified for redesign 3/3/2004
//
//==================================================

//  MacroMedia functions this site uses:

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

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_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_nbGroup(event, grpName) { //v6.0
  var i,img,nbArr,args=MM_nbGroup.arguments;
  if (event == "init" && args.length > 2) {
    if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
      img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
      if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
      nbArr[nbArr.length] = img;
      for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
        if (!img.MM_up) img.MM_up = img.src;
        img.src = img.MM_dn = args[i+1];
        nbArr[nbArr.length] = img;
    } }
  } else if (event == "over") {
    document.MM_nbOver = nbArr = new Array();
    for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])? args[i+1] : img.MM_up);
      nbArr[nbArr.length] = img;
    }
  } else if (event == "out" ) {
    for (i=0; i < document.MM_nbOver.length; i++) {
      img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
  } else if (event == "down") {
    nbArr = document[grpName];
    if (nbArr)
      for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
    document[grpName] = nbArr = new Array();
    for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
      nbArr[nbArr.length] = img;
  } }
}

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];}
}

//==================================================
// functionality for common areas:
//==================================================


function printHeader(section) {
	document.write('<table border="0" cellpadding="0" cellspacing="0">');
	document.write('<tr>');
	document.write('<td><a href="index.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'home\',\'\',\'images/global/nav_home_over.gif\',1)"><img src="images/global/nav_home.gif" alt="Home" name="home" width="54" height="23" border="0"></a></td>');

	if (section == "about") {
		document.write('<td><a href="about.html"><img src="images/global/nav_about_on.gif" alt="About Us" name="about" width="78" height="23" border="0"></a></td>');
	} else {
		document.write('<td><a href="about.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'about\',\'\',\'images/global/nav_about_over.gif\',1)"><img src="images/global/nav_about.gif" alt="About Us" name="about" width="78" height="23" border="0"></a></td>');
	}
	
	if (section == "unique") {
		document.write('<td><a href="unique.html"><img src="images/global/nav_unique_on.gif" alt="Why We\'re Unique" name="unique" width="136" height="23" border="0"></a></td>');
	} else {
		document.write('<td><a href="unique.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'unique\',\'\',\'images/global/nav_unique_over.gif\',1)"><img src="images/global/nav_unique.gif" alt="Why We\'re Unique" name="unique" width="136" height="23" border="0"></a></td>');
	}

	if (section == "products") {
		document.write('<td><a href="work.html"><img src="images/global/nav_product_on.gif" alt="Work" name="products" width="86" height="23" border="0"></a></td>');
	} else {
		document.write('<td><a href="work.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'products\',\'\',\'images/global/nav_product_over.gif\',1)"><img src="images/global/nav_product.gif" alt="Work" name="products" width="86" height="23" border="0"></a></td>');
	}

	if (section == "news") {
		document.write('<td><img src="images/global/nav_news_on.gif" alt="Newsroom" name="news" width="87" height="23" border="0"></td>');
	} else {
		document.write('<td><a href="news.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'news\',\'\',\'images/global/nav_news_over.gif\',1)"><img src="images/global/nav_news.gif" alt="Newsroom" name="news" width="87" height="23" border="0"></a></td>');
	}

	if (section == "contact") {
		document.write('<td><img src="images/global/nav_contact_on.gif" alt="Contact Us" name="contact" width="87" height="23" border="0"></td>');
	} else {
		document.write('<td><a href="contact.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'contact\',\'\',\'images/global/nav_contact_over.gif\',1)"><img src="images/global/nav_contact.gif" alt="Contact Us" name="contact" width="87" height="23" border="0"></a></td>');
	}

	document.write('</tr></table>');

}

//===================================================

function printLSB(section, page) {

	if ((section =="about") || (section == "about_team")) {
		document.write('<a href="about.html"><img src="images/about/about_us.gif" width=177 height=78 alt="" border="0"></a>');
		document.write('<img src="images/white_spacer.gif" width=177 height=5 alt="" border="0">');
		
		document.write('<table width="177" border="0" cellpadding="0" cellspacing="0">');
		
		if (page == "top") {
			document.write('<tr><td width="177" height="17" valign="top"><img src="images/about/nav5_on.gif" alt="Company" name="Image33" width="177" height="17" border="0"></td></tr>');
		} else {
			document.write('<tr><td width="177" height="17" valign="top"><a href="about.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'Image33\',\'\',\'images/about/nav5_over.gif\',1)"><img src="images/about/nav5.gif" alt="Company" name="Image33" width="177" height="17" border="0"></a></td></tr>');
		}
		
		if (page == "team") {
			document.write('<tr><td width="177" height="14" valign="top"><img src="images/contributors/nav5_on.gif" alt="Team" name="Image12" width="177" height="14" border="0"></td></tr>');
		} else {
			document.write('<tr><td width="177" height="14" valign="top"><a href="about_team_management.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'Image12\',\'\',\'images/contributors/nav5_over.gif\',1)"><img src="images/contributors/nav5.gif" alt="Team" name="Image12" width="177" height="14" border="0"></a></td></tr>');
		}
		
		if (section == "about_team") {
				/*
				if (page == "management") {
					document.write('<tr><td width="177" height="14" valign="top"><img src="images/contributors/nav1_on.gif" alt="executive producer" name="Image99" width="177" height="14" border="0"></td></tr>');
				} else {
					document.write('<tr><td width="177" height="14" valign="top"><a href="about_team_management.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'Image99\',\'\',\'images/contributors/nav1_over.gif\',1)"><img src="images/contributors/nav1.gif" alt="executive producer" name="Image99" width="177" height="14" border="0"></a></td></tr>');
				}
				*/
				
				if (page == "biographers") {
					document.write('<tr><td width="177" height="14" valign="top"><img src="images/contributors/nav2_on.gif" alt="Producers" name="Image98" width="177" height="14" border="0"></td></tr>');
				} else {
					document.write('<tr><td width="177" height="14" valign="top"><a href="about_team_producers.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'Image98\',\'\',\'images/contributors/nav2_over.gif\',1)"><img src="images/contributors/nav2.gif" alt="Producers" name="Image98" width="177" height="14" border="0"></a></td></tr>');
				}
				
				if (page == "filmmakers") {
					document.write('<tr><td width="177" height="14" valign="top"><img src="images/contributors/nav3_on.gif" alt="Filmmakers" name="Image96" width="177" height="14" border="0"></td></tr>');
				} else {
					document.write('<tr><td width="177" height="14" valign="top"><a href="about_team_filmmakers.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'Image96\',\'\',\'images/contributors/nav3_over.gif\',1)"><img src="images/contributors/nav3.gif" alt="Filmmakers" name="Image96" width="177" height="14" border="0"></a></td></tr>');
		    	}
				
	
		}

		
		//our cliets
		
		if (page == "clients") {
			document.write('<tr><td width="177" height="14" valign="top"><img src="images/about/nav3_on.gif" width=177 height=14 alt="Clients" border="0"></td></tr>');
		} else {
		    document.write('<tr><td width="177" height="14" valign="top"><a href="about_clients.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'Image50\',\'\',\'images/about/nav3_over.gif\',1)"><img src="images/about/nav3.gif" alt="Clients" name="Image50" width="177" height="14" border="0"></a></td></tr>');
		}
		
		//awards
		
		if (page == "awards") {
			document.write('<tr><td width="177" height="14" valign="top"><img src="images/about/nav4_on.gif" width=177 height=14 alt="Awards" border="0"></td></tr>');
		} else {
		    document.write('<tr><td width="177" height="14" valign="top"><a href="about_awards.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'Image51\',\'\',\'images/about/nav4_over.gif\',1)"><img src="images/about/nav4.gif" alt="Awards" name="Image51" width="177" height="14" border="0"></a></td></tr>');
		}
		
		//partners
		
		
		
		document.write('</table>');
	
	} else if (section == "products") {
	
		document.write('<a href="work.html"><img src="images/products/products.gif" width=177 height=78 alt="Work" border="0"></a>');
		document.write('<img src="images/white_spacer.gif" width=177 height=5 alt="" border="0">');

		document.write('<table width="177" border="0" cellpadding="0" cellspacing="0">');
		
		if (page == "top") {
			document.write('<tr><td width="177" height="17" valign="top"><img src="images/products/nav6_on.gif" width=177 height=17 alt="Overview" border="0"></td></tr>');
		} else {
		    document.write('<tr><td width="177" height="17" valign="top"><a href="work.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'Image34\',\'\',\'images/products/nav6_over.gif\',1)"><img src="images/products/nav6.gif" alt="Overview" name="Image34" width="177" height="17" border="0"></a></td></tr>');
		}
		
		if (page == "services") {
			document.write('<tr><td width="177" height="14" valign="top"><img src="images/products/nav5_on.gif" width=177 height=14 alt="Process" border="0"></td></tr>');
		} else {	
			document.write('<tr><td width="177" height="14" valign="top"><a href="work_process.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'Image99\',\'\',\'images/products/nav5_over.gif\',1)"><img src="images/products/nav5.gif" alt="Process" name="Image99" width="177" height="14" border="0"></a></td></tr>');
		}
		
		if (page == "company") {
			document.write('<tr><td width="177" height="14" valign="top"><img src="images/products/nav1_on.gif" width=177 height=14 alt="Company Reel" border="0"></td></tr>');
		} else {
		    document.write('<tr><td width="177" height="14" valign="top"><a href="work_company.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'Image47\',\'\',\'images/products/nav1_over.gif\',1)"><img src="images/products/nav1.gif" alt="Company Reel" name="Image47" width="177" height="14" border="0"></a></td></tr>');
		}
		
		if (page == "executive") {
			document.write('<tr><td width="177" height="14" valign="top"><img src="images/products/nav3_on.gif" width=177 height=14 alt="Executive Reel" border="0"></td></tr>');
		} else {	
			document.write('<tr><td width="177" height="14" valign="top"><a href="work_executive.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'Image31\',\'\',\'images/products/nav3_over.gif\',1)"><img src="images/products/nav3.gif" alt="Executive Reel" name="Image31" width="177" height="14" border="0"></a></td></tr>');
		}
		
		if (page == "portfolio") {
			document.write('<tr><td width="177" height="14" valign="top"><img src="images/products/nav4_on.gif" width=177 height=14 alt="Reel Portfolio" border="0"></td></tr>');
		} else {	
			document.write('<tr><td width="177" height="14" valign="top"><a href="work_portfolio.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'Image66\',\'\',\'images/products/nav4_over.gif\',1)"><img src="images/products/nav4.gif" alt="Reel Portfolio" name="Image66" width="177" height="14" border="0"></a></td></tr>');
		}
		
		if (page == "cause") {
			document.write('<tr><td width="177" height="14" valign="top"><img src="images/products/nav2_on.gif" width=177 height=14 alt="Cause Related Reels" border="0"></td></tr>');
		} else {	
			document.write('<tr><td width="177" height="14" valign="top"><a href="work_cause.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'Image30\',\'\',\'images/products/nav2_over.gif\',1)"><img src="images/products/nav2.gif" alt="Cause Related Reels" name="Image30" width="177" height="14" border="0"></a></td></tr>');
		}
		
		document.write('</table>');
	
	} else if (section == "unique") {
	
		document.write('<a href="unique.html"><img src="images/about/unique.gif" width=177 height=78 alt="Why We\'re Unique" border="0"></a>');
		document.write('<img src="images/white_spacer.gif" width=177 height=5 alt="" border="0">'); 
	
	} else if (section == "news") {
	
		document.write('<a href="news.html"><img src="images/news/news.gif" width=177 height=78 alt="" border="0"></a>');
		document.write('<img src="images/white_spacer.gif" width=177 height=5 alt="" border="0">'); 
	
	} else if (section == "contact") {
	
		document.write('<a href="contact.html"><img src="images/contact/contact.gif" width=177 height=78 alt="" border="0"></a>');
		document.write('<img src="images/white_spacer.gif" width=177 height=5 alt="" border="0">'); 
	}
}

//===================================================

function printFooter() {
	document.write('<tr valign="top"> ');
	document.write('<td width="177" height="24" bgcolor="#999999"><a href="http://www.ms-ds.com" target="_new" onmouseover="MM_swapImage(\'Image35\',\'\',\'images/global/msds_on.gif\',1)" onmouseout="MM_swapImgRestore()"><img src="images/global/msds.gif" name="Image35" width="177" height="24" border="0"></a></td>');
	document.write('<td width="528" height="24"><img src="images/global/footer.gif" width="528" height="24"></td>');
	document.write('</tr>');
}

//==================================================
// flash detection:
//==================================================

// heavily modified version of original by colin moock
// user defined global: modify to customize the inspection behaviour
var requiredVersion = 4;			// version needed

// system globals
var flash2Installed = false;		// boolean. true if flash 2 is installed
var flash3Installed = false;		// boolean. true if flash 3 is installed
var flash4Installed = false;		// boolean. true if flash 4 is installed
var flash5Installed = false;		// boolean. true if flash 5 is installed
var flash6Installed = false;		// boolean. true if flash 5 is installed
var maxVersion = 6;					// highest version we can actually detect
var actualVersion = 0;				// version the user really has
var hasRightVersion = false;		// boolean. true if it's safe to embed the flash movie in the page
var jsVersion = 1.0;				// the version of javascript supported


// check the browser...we're looking for ie/win
var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.platform.indexOf("Win32") != -1) ? true : false;

// this is a js1.1 code block, so make note that js1.1 is supported.
jsVersion = 1.1;

// write vbscript detection if we're not on mac.
if(isIE && isWin) {
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('flash2Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.2"))) \n');
	document.write('flash3Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3"))) \n');
	document.write('flash4Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4"))) \n');
	document.write('flash5Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5"))) \n');  
	document.write('flash6Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6"))) \n'); 
	document.write('</SCR' + 'IPT\> \n');
}


function detectFlash() {	
	if (navigator.plugins) {	// does navigator.plugins exist?
		if (navigator.plugins["Shockwave Flash 2.0"] 	// yes>> then is Flash 2 
		|| navigator.plugins["Shockwave Flash"]) {		// or flash 3+ installed?

			// set convenient references to flash 2 and the plugin description
			var isVersion2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
			var flashDescription = navigator.plugins["Shockwave Flash" + isVersion2].description;
			var flashVersion = parseInt(flashDescription.charAt(flashDescription.indexOf(".") - 1));

			// we know the version, now set appropriate version flags
			flash2Installed = flashVersion == 2;		
			flash3Installed = flashVersion == 3;
			flash4Installed = flashVersion == 4;
			flash5Installed = flashVersion == 5;
			flash6Installed = flashVersion >= 6;
		}
	}
	
	// loop through all versions and set actualVersion to highest detected version
	for (var i = 2; i <= maxVersion; i++) {	
		if (eval("flash" + i + "Installed") == true) actualVersion = i;
	}
	
	if(navigator.userAgent.indexOf("WebTV") != -1) actualVersion = 2;
	
	// return true if greater than or equal to required version, else return false.
	if (actualVersion >= requiredVersion) {
		return true;
	} 
	else {
		return false;
	}
}

// popup window function
var popwin = 1;
function popUp(page, w, h) {
	popwin = popwin+1;
	popwin.toString();
	newWindow = window.open(page, popwin, "toolbar=0,menubar=0,width="+w+",height="+h+",status=0,scrollbars=0,alwaysRaised=1,resizable=1");
}



