<!--

//PRELOAD CODE
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_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_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];}
}


function headerSwitch(id){	
	if(!document.getElementById) return false;
	var div = document.getElementById("header"+id);
	var curDiv = document.getElementById("header"+current);
	curDiv.style.display = "none";
	div.style.display = "block";
	current = id;
}


window.name = "mama_window";

function open_maillist() {
	var n=open('trident/signup.asp','maillist','width=520,height=345,status=yes,menubar=no,scrolling=no,scrollbars=no,resizable=no');
}

function openWinPlayer() {
	var n=open('player/index.php','player','width=605,height=350,status=yes,menubar=no,scrolling=no,scrollbars=no,resizable=no');
}

function mailAddress(part1,part2) {
	window.location = 'mailto:' + part1 + '@' + part2;
}

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) {
		podcast_button_over = newImage("images/podcast_button-over.jpg");
		preloadFlag = true;
	}
}



	var its;
	var browserName;
	var browserNameLong;
	var browserNew;
	var preloadFlag = false;
	var Macintosh = navigator.userAgent.indexOf('Mac')>0;

	function its() {
		var n = navigator;
		var ua = ' ' + n.userAgent.toLowerCase();
		var pl = n.platform.toLowerCase();
		var an = n.appName.toLowerCase();

		// browser version
		this.version = n.appVersion;
		this.nn = ua.indexOf('mozilla') > 0;

		// 'compatible' versions of mozilla aren't navigator
		if(ua.indexOf('compatible') > 0) {
			this.nn = false;
		}
		
		this.opera = ua.indexOf('opera') > 0;
		this.ie = ua.indexOf('msie') > 0;
		this.major = parseInt( this.version );
		this.minor = parseFloat( this.version );

		// platform
		this.mac = ua.indexOf('mac') > 0;
		this.win = ua.indexOf('win') > 0;

		// workaround for IE5 which reports itself as version 4.0
		if(this.ie) {
			if(ua.indexOf("msie 5") > 1) {
			var msieIndex = navigator.appVersion.indexOf("MSIE") + 5;
			this.major = parseFloat(navigator.appVersion.substr(msieIndex,3));
			}
		}

		return this;
	}

	function browserNaming() {
		its = new its();
		
		// is it a DOM-enabled browser?
		if (!document.getElementById) {
			browserNew = false;
		}
		else {
			browserNew = true;
		}

		// need the name, too
		if (its.opera) {
			browserName = "Opera";
		}
		else if (its.ie) {
			browserName = "IE";
		}
		else {
			browserName = "NS";
		}

		// and the number
		browserNameLong = browserName + its.major;
	
	}


/* Image/Text Swap */

var w3c = (document.getElementById) ? 1:0;
var ns4 = (document.layers) ? 1:0;
var ie4 = (document.all) ? 1:0;

function imgSwap(img,state){

	if(state == "on"){

		document[img].src = "_images/rollover_on.gif";

		tempArray = img.split("_");

		linkName = "link_" + tempArray[1];

		var nsLayer = eval("document." + linkName);

		!ns4?document.getElementById(linkName).style.color = "#ff0066":nsLayer.document.color = "#ff0066";

	}else{

		document[img].src = "_images/rollover_off.gif";

		tempArray = img.split("_");

		linkName = "link_" + tempArray[1];
// on mouse out on text
		!ns4?document.getElementById(linkName).style.color = "#626262":void(0);

	}

}

/* jump menu work selector */

function workSelect()
	{
	var i = document.browse.client.selectedIndex;
	var v = document.browse.client.options[i].value;
	location = "/work/" + v;
	}

function nav_jump(targ,selObj,restore){ 
if(selObj.options[selObj.selectedIndex].value != "null"){
 	 eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
 	 if (restore) selObj.selectedIndex=0;
  }else{
  selObj.selectedIndex=0;
  }
}
/* open new centered window */
/* USAGE: javascript:centerWin('filename.php','windowname', width, height); */

function centerWin(url,name,popW,popH) {
        version = navigator.appVersion;
	var w = 800, h = 600;

	if (document.all || document.layers) {
		w = screen.availWidth;
		h = screen.availHeight;
	}
	var leftPos = (w-popW)/2, topPos = (h-popH)/2;
	window.open(url,name,'width=' + popW + ',height=' + popH + ',scrollbars=no,toolbar=no,status=no,resizable=no,top=' + topPos + ',left=' + leftPos);void(0);
}

/* open new centered window with scrolling ability */

function centerScroll(url,name,popW,popH) {
        version = navigator.appVersion;
	var w = 800, h = 600;

	if (document.all || document.layers) {
		w = screen.availWidth;
		h = screen.availHeight;
	}
	var leftPos = (w-popW)/2, topPos = (h-popH)/2;
	window.open(url,name,'width=' + popW + ',height=' + popH + ',scrollbars=yes,toolbar=no,status=no,resizable=no,top=' + topPos + ',left=' + leftPos);void(0);
}

// POPUP WINDOW (FIXES THE IE4/MAC PROBLEM WHICH MAKES WINDOWS TOO SMALL)
// USAGE:	<a href="#" onclick="spawnWindow('newpage.php','windowname',400,384,'no');">

	function spawnWindow(desktopURL,windowName,width,height,scroll) {
 		if (Macintosh) {
 			if (browserNameLong == "IE4") {
				newheight = parseInt(height + 17);
			}
			else if (browserNameLong == "IE4.5") {
				newheight = parseInt(height + 17);
			}
			else {
				newheight = height;
			}
 		}
 		else { newheight = height; }	
 		window.open(desktopURL, windowName, "toolbar=no,location=no,status=no,menubar=no,scrollbars="+scroll+",width="+width+",height="+newheight+",resizable=no" );
	}
	
function contentSwitch(id){	
	if(!document.getElementById) return false;
	var div = document.getElementById("content"+id);
	var curDiv = document.getElementById("content"+current);
	curDiv.style.display = "none";
	div.style.display = "block";
	current = id;
}	

/* open video window */
/* USAGE: <a href="#" onClick="popVideo('URL',height,width,'title','headline','description');return false">text</a> */

function popVideo(videosrc,winwidth,winheight,title,headline,text){
var look='width='+winwidth+',height='+winheight+','
popwin=window.open("","",look)
popwin.document.write("<html><head>");
popwin.document.write("<title>"+title+"</title>");
popwin.document.write("<link href='http://www.asterikstudio.com/_scripts/site_global.css' rel='stylesheet' type='text/css'>");
popwin.document.write("</head><body>");
popwin.document.write("<table width='360' border='0' cellspacing='0' cellpadding='0'> ");
popwin.document.write("<tr align='left' valign='top'>");
popwin.document.write("<tr align='left' valign='top'>");
popwin.document.write("<td colspan='3'><img src='http://www.asterikstudio.com/_images/shim.gif' width='360' height='20' alt=''></td>");
popwin.document.write("</tr>");
popwin.document.write("<tr>");
popwin.document.write("<td width='20' height='315' align='left' valign='top'><img src='http://www.asterikstudio.com/_images/shim.gif' width='20' height='315' alt=''></td>");
popwin.document.write("<td width='320' align='left' valign='top'><table width='320' border='0' cellspacing='0' cellpadding='0'>");
popwin.document.write("<tr>");
popwin.document.write("<td width='320' height='255' align='left' valign='top' bgcolor='#FFFFFF'><object width=320 height=255 CLASSID='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' CODEBASE='http://www.apple.com/qtactivex/qtplugin.cab'>");
popwin.document.write("<param name='src' value="+videosrc+">");
popwin.document.write("<param name='controller' value='true'>");
popwin.document.write("<param name='autoplay' value='true'>");
popwin.document.write("<param name='kioskmode' value='true'>");
popwin.document.write("<embed src="+videosrc+" width=320 height=255 autoplay=true KIOSKMODE=true controller=true></embed>");
popwin.document.write("'bgcolor='FFFFFF' border=0 pluginspage='http://www.apple.com/quicktime/download/indext.php'>");
popwin.document.write("</object></td>");
popwin.document.write("</tr>");
popwin.document.write("<tr>");
popwin.document.write("<td width='320' height='5'><img src='http://www.asterikstudio.com/_images/shim.gif' width='320' height='5' alt=''></td>");
popwin.document.write("</tr>");
popwin.document.write("<tr>");
popwin.document.write("<td width='320' height='50' align='left' valign='top'><table width='320' border='0' cellspacing='0' cellpadding='0'>");
popwin.document.write("<tr>");
popwin.document.write("<td align='left' valign='top'><span class='heading'>"+headline+"</span><br>");
popwin.document.write(""+text+"</td>");
popwin.document.write("<td width='50' height='50' align='left' valign='top'><img src='http://www.asterikstudio.com/_images/asterik_logo.gif' width='50' height='50' alt=''></td>");
popwin.document.write("</tr>");
popwin.document.write("</table></td>");
popwin.document.write("</tr>");
popwin.document.write("</table></td>");
popwin.document.write("<td width='20' height='315' align='left' valign='top'><img src='http://www.asterikstudio.com/_images/shim.gif' width='20' height='315' alt=''></td>");
popwin.document.write("</tr>");
popwin.document.write("</table>");
popwin.document.write("</body>");
popwin.document.write("</html>");
popwin.document.close()
}
//-->


// -->