﻿// JavaScript Document
var picWin;
function popPic(p,t) {
	show_test = document.getElementById('text_to_show_'+t);
//alert(show_test.value);
	if (typeof(picWin) != 'undefined' && !(picWin.closed)) {picWin.close();}
	picWin = window.open('','picWin','scrollbars=1,menubar=0,left=0,top=0,width=300px,height=300px,dependent=1,resizable=0', replace=1);
	picWin.document.open();
	picWin.document.write('<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>image popup</title><style type="text/css">body{background-color:#FFF8EA;margin:0px;}.text{font-family: Arial, Helvetica, sans-serif;font-size:12px;color:#660000;text-align:center;}.load{font-family:Arial,Helvetica,sans-serif;font-size:12px;font-weight:bold;color:#CCCCCC;width:80px;text-align:left;}.hide{display:none;}.show{display:;}</style></head><body onLoad="checksize();"scroll=yes><script language=javascript>document.oncontextmenu=new Function("return false");function checksize(){if(document.images[0].complete){document.getElementById("load").className="hide";document.getElementById("show").className="show";h=document.images[0].width+40;v=document.images[0].height+110;if(h>(screen.availWidth-10)){h=screen.availWidth-10;document.body.scroll="yes";}if(v>(screen.availHeight-20)){v=screen.availHeight-20;document.body.scroll="yes";}window.resizeTo(h,v);window.focus();}else{setTimeout("checksize()",250)}}</script><table width="100%" height="100%"  border="0" cellpadding="0" cellspacing="0"><tr><td align="center" valign="middle"><div class="load" id="load">LOADING . . .</div><div class="hide" id="show"><img src="'+p+'"></div><table width="100%"  border="0" cellspacing="0" cellpadding="6" class="text"><tr><td>'+show_test.value+'</td></tr></table></td></tr></table></body></html>');
	picWin.document.close();
}
function roll(a) {
	if (a.className.substr((a.className.length-1),1) == 'n') {b='o';}
	else {b='n';}
	a.className=a.className.substr(0,(a.className.length-1))+b;
}
function rollId(a) {
	if (a.id.substr((a.id.length-1),1) == 'n') {b='o';}
	else {b='n';}
	a.id=a.id.substr(0,(a.id.length-1))+b;
}
function showlog() {
	document.getElementById("log_b").style.display='';
	document.getElementById("log_log").style.display="none";
	document.getElementById("username").select();
}
function request_ok() {
	a = request_ok.arguments;
	for (i=0;i<a.length;i++) {
		b = eval("document.forms['request']."+a[i]+".value");
		if (b == '' || b == 'fill this') {
			eval("document.forms['request']."+a[i]+".value = 'fill this'");
			eval("document.forms['request']."+a[i]+".select()");
			return false;
		}
	}
	return true;
}