function swapImage(which,what){
	document.images[which].src='images/'+what;
	}

var news = null;
function popNews(h,w,text) {
  news = window.open("","","toolbar=0,scrollbars=yes,location=0,statusbar=yes,menubar=0,resizable=0,width="+w+",height="+h+",left=100,top=100");
  news.document.open();
  news.document.write('<html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Guerrilla Monster News</title><style type="text/css">a:link,a:visited{color:#6f0;text-decoration:none;}a:hover{color:#900;}</style></head><body bgcolor="#006600">');
  news.document.write('<p style="font:75%/130% verdana, helvetica, arial, sans-serif;color:#fff;background-color:#003300;margin:10px;padding:10px;">'+text+'</p>');
  news.document.write('<a style="font:60%/100% verdana, helvetica, arial, sans-serif;margin:20px;" href="javascript:window.close() ">CLOSE THIS WINDOW</a>');
  news.document.write('</body></html>');
  news.document.close();
}

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, name) {
	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> '+name+' </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+'" alt="'+name+'" border="1">\n</center></body>\n</html>');
    doc.document.close();
}

function view(name,movie,x,y) {
	y	 = y+16; <!-- control bar -->
	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><link rel="stylesheet" href="gm.css" type="text/css"></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 makeArray(len){
for (var i=0;i<len;i++) this[i]=null;
this.length=len;
}

var cardimg = new makeArray(54);
cardimg[0] = "<img src='images/cardjpgs_sm/c2.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[1] = "<img src='images/cardjpgs_sm/c3.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[2] = "<img src='images/cardjpgs_sm/c4.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[3] = "<img src='images/cardjpgs_sm/c5.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[4] = "<img src='images/cardjpgs_sm/c6.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[5] = "<img src='images/cardjpgs_sm/c7.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[6] = "<img src='images/cardjpgs_sm/c8.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[7] = "<img src='images/cardjpgs_sm/c9.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[8] = "<img src='images/cardjpgs_sm/c10.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[9] = "<img src='images/cardjpgs_sm/cJ.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[10] = "<img src='images/cardjpgs_sm/cQ.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[11] = "<img src='images/cardjpgs_sm/cK.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[12] = "<img src='images/cardjpgs_sm/cA.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[13] = "<img src='images/cardjpgs_sm/d2.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[14] = "<img src='images/cardjpgs_sm/d3.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[15] = "<img src='images/cardjpgs_sm/d4.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[16] = "<img src='images/cardjpgs_sm/d5.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[17] = "<img src='images/cardjpgs_sm/d6.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[18] = "<img src='images/cardjpgs_sm/d7.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[19] = "<img src='images/cardjpgs_sm/d8.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[20] = "<img src='images/cardjpgs_sm/d9.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[21] = "<img src='images/cardjpgs_sm/d10.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[22] = "<img src='images/cardjpgs_sm/dJ.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[23] = "<img src='images/cardjpgs_sm/dQ.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[24] = "<img src='images/cardjpgs_sm/dK.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[25] = "<img src='images/cardjpgs_sm/dA.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[26] = "<img src='images/cardjpgs_sm/h2.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[27] = "<img src='images/cardjpgs_sm/h3.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[28] = "<img src='images/cardjpgs_sm/h4.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[29] = "<img src='images/cardjpgs_sm/h5.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[30] = "<img src='images/cardjpgs_sm/h6.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[31] = "<img src='images/cardjpgs_sm/h7.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[32] = "<img src='images/cardjpgs_sm/h8.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[33] = "<img src='images/cardjpgs_sm/h9.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[34] = "<img src='images/cardjpgs_sm/h10.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[35] = "<img src='images/cardjpgs_sm/hJ.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[36] = "<img src='images/cardjpgs_sm/hQ.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[37] = "<img src='images/cardjpgs_sm/hK.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[38] = "<img src='images/cardjpgs_sm/hA.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[39] = "<img src='images/cardjpgs_sm/s2.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[40] = "<img src='images/cardjpgs_sm/s3.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[41] = "<img src='images/cardjpgs_sm/s4.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[42] = "<img src='images/cardjpgs_sm/s5.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[43] = "<img src='images/cardjpgs_sm/s6.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[44] = "<img src='images/cardjpgs_sm/s7.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[45] = "<img src='images/cardjpgs_sm/s8.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[46] = "<img src='images/cardjpgs_sm/s9.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[47] = "<img src='images/cardjpgs_sm/s10.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[48] = "<img src='images/cardjpgs_sm/sJ.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[49] = "<img src='images/cardjpgs_sm/sQ.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[50] = "<img src='images/cardjpgs_sm/sK.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[51] = "<img src='images/cardjpgs_sm/sA.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[52] = "<img src='images/cardjpgs_sm/joker1.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";
cardimg[53] = "<img src='images/cardjpgs_sm/joker2.jpg' border='0' height='175' width='125' hspace='10' vspace='10'>";

var now=new Date();

function rand(n){
	seed=(0x015a4e35*seed) % 0x7fffffff;
	return (seed>>16) % n;
	}

var seed=now.getTime()%0xffffffff;

