/*
 * Archive for basic utilities 
 */
//if link is inactive this will take care of things
function deadln() {
		alert("under construction");
		return false;
}
//jarjar cloning
var mycount=1;
var oldwin;
var width=175;
var height=163;
//175, 163 
function clone(count) {
	if(count) {
		mycount=count;
	}
	var adjwidth=width*mycount;
	var adjheight=height*mycount;
	if(oldwin!=null) {
		oldwin.close();
	}
	/* so the idea here is to get the amount of clones,
	   multiply it by the image size (after deciding on how many images
	   make up a row and column [constants for that] ) and then close window
	   and call opener.clone with an increased count  */
	//if(count < 5) {
	var jarjar=window.open("","jarjar"+mycount,"location=no,resizable=yes,toolbar=no,scrollbar=yes,width="+(adjwidth+70)+",height="+(adjheight+80)+"");
	jarjar.document.writeln("<html><head><title>mesa clonesa!</title>");
	jarjar.document.writeln("<script language=\"JavaScript\">");
	jarjar.document.writeln("<!--");
	jarjar.document.writeln("function clonesa() {");
	jarjar.document.writeln("	this.opener.mycount++;");
	jarjar.document.writeln("	this.opener.clone();");
	jarjar.document.writeln("}");
	jarjar.document.writeln("//-->");
	jarjar.document.writeln("</script"+">");
	jarjar.document.writeln("</head>");
	jarjar.document.writeln("<body bgcolor=black>");
	jarjar.document.writeln("<table border=\"0\" width="+(adjwidth+70)+" height="+(adjheight+80)+">");
	for(row=0; row < mycount; row++) {
		jarjar.document.writeln("<tr>");
		for(column=0; column < mycount; column++) {
			jarjar.document.writeln("<td valign=top>");
			jarjar.document.write("<a href=\"javascript:clonesa();\">");
			jarjar.document.writeln("<img src=\"images/jarjar.jpg\"></a>");
			jarjar.document.writeln("</td>");
		}
		jarjar.document.writeln("</tr>");
	}
	jarjar.document.writeln("</table>");
	jarjar.document.writeln("<br>");
	jarjar.document.writeln("</body>");
	jarjar.document.writeln("</html>");
	jarjar.document.close();
	oldwin=jarjar;
	jarjar="";
}
	
