function MM_findObj(n, d) { //v3.0
  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); return x;
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function DocPopUp(url,x,y){
	var doc = window.open(url,"docpopup","width="+x+",height="+y+",left=100,top=50,screenX=100,screenY=50,scrollbars=yes,location=no,menubar=no,toolbar=no,status=no,resizable=no");
}

function ImgPopUp(file) {
	initWidth = 200;
	initHeight = 200;
	border = 50;
	Left = (screen.width-initWidth)/2;
	Top  = ((screen.height-initHeight)/2)-border;
	var doc = window.open('','imgpopup','scrollbars=auto,status=no,toolbar=no,location=no,directories=no,resizeable=no,left='+Left+',top='+Top+',screenX='+Left+',screenY='+Top+',width='+initWidth+',height='+initHeight);
	doc.document.writeln('<html>\n<head>\n<title>.: pop! :.</title>\n<script language="javascript">');
	doc.document.writeln('\nfunction resize() {\n var i='+border+';\n if (document.images[0]) {window.resizeTo(document.images[0].width+i, document.images[0].height+(i*1.6)); self.moveTo((screen.width-document.images[0].width-'+border+')/2,(screen.height-document.images[0].height)/3) }\nself.focus();\n}\n');
	doc.document.writeln('</script></head><body bgcolor="#000000" leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" onLoad="resize();" onBlur="self.close()">');
	doc.document.writeln('<center>\n<br><img src="images/'+file+'" border="1">\n</center></body>\n</html>');
    doc.document.close();
}

function view(name,movie,x,y) {
	y = y+16;
	winX = x*1.5;
	winY = y*1.75;
	Left = (screen.width) ? (screen.width-winX)/2 : 0;
	Top  = (screen.height) ? (screen.height-winY)/2.5 : 0;
	var header = '<html>\n<head><title> '+name+' </title></head>\n';
	var win = window.open('','popup','scrollbars=no,status=no,toolbar=no,location=no,directories=no,resizeable=no,top='+Top+',left='+Left+',width='+winX+',height='+winY);
	win.document.write(header);
	win.document.write('<body bgcolor="black">\n<table width="100%" height="100%"><tr><td>\n\n');
	win.document.write('<center><b style="color:silver; font: bold 14px helvetica, sans-serif;">'+name+'</b><p>\n');
	win.document.write('<OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" WIDTH="'+x+'" HEIGHT="'+y+'" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">\n<PARAM name="SRC" VALUE="http://www.guerrillamonster.com/videos/'+movie+'">\n<PARAM name="AUTOPLAY" VALUE="true">\n<PARAM name="CONTROLLER" VALUE="true">\n<PARAM name="TARGET" VALUE="myself">\n');
	win.document.write('<embed src="http://www.guerrillamonster.com/videos/'+movie+'" width='+x+' height='+y+' controller="true" pluginspage="http://www.apple.com/quicktime/download/" bgcolor="black">\n</object>\n');
	win.document.write('<p><br><small><a style="font:9px sans-serif;color:gray" href="javascript:window.close();">Close Window</a></small>\n');
	win.document.write('\n</center></td></tr></table>\n</body>\n</html>');
    win.document.close();
}

function di(id,name){
	if (document.images){
		if (document.images[id]){document.images[id].src=eval(name+".src");
	} else {
		if (document.layers){
			for (i=0; i < document.layers.length; i++) {
				if (document.layers[i].document.images[id]) {
					document.layers[i].document.images[id].src=eval(name+".src");
					break;
					}
				}
			}
		}
	}
}

var currentsub = "nada";

function updateSub(which){
	if (currentsub != "nada"){
		MM_showHideLayers(currentsub,'','hide',which,'','show');
		currentsub = which;
	} else {
		MM_showHideLayers(which,'','show');
		currentsub = which;
	}
}