function getItemByID(id)
{
	var obj = null;
	
	if (document.getElementById) obj = document.getElementById(id);
	else if (document.all) obj = document.all[id];
	return obj;
}
function addEvent(obj,type,fn)
{
	if (obj.addEventListener) {
		obj.addEventListener(type,fn,false);
	}
	else if (obj.attachEvent) {
		obj["e" + type + fn] = fn;
		obj[type + fn] = function () { obj["e" + type + fn](window.event); };
		obj.attachEvent("on" + type,obj[type + fn]);
	}
}
function DecryptEmail(inEmail)
{
	var len = inEmail.length;
	var outEmail = "";
	var ascii;
	
	for (var i = 0; i < len; i++) {
		ascii = inEmail.charAt(i);
		if (ascii == 'z') ascii = 'a';
		else if ((ascii >= 'a') && (ascii < 'z')) ascii = String.fromCharCode(inEmail.charCodeAt(i) + 1);
		outEmail += ascii;
	}
	return outEmail;
}
function IsValidEmail(inEmail)
{
	var regExp = new RegExp("^([_a-z0-9]+([\\._a-z0-9+-]+)*)@([_a-z0-9-]{1,}(\\.[a-z0-9-]{2,})*\\.[a-z]{2,4})$");
	return regExp.test(inEmail);
}
function openPicture(picture)
{
	var title = picture.split("/");
	
	if ((title == null) || (title.length < 1)) title = picture;
	else title = title[title.length - 1];
	w = window.open('','Photo','width=10,height=10');
	w.document.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n");
	w.document.write("<html xmlns=\"http://www.w3.org/1999/xhtml\">\n");
	w.document.write( "<head><title>"+title+"</title>\n" );
	w.document.write( "<script type=\"text/javascript\">\n"); 
	w.document.write( "<!--\n"); 
	w.document.write( "IE5=NN4=NN6=Safari=false;\n"); 
	w.document.write( "if(document.all)IE5=true;\n"); 
	w.document.write( "else if(document.getElementById)NN6=true;\n"); 
	w.document.write( "else if(document.layers)NN4=true;\n"); 
	w.document.write( "if(NN6) Safari=(self.sizeToContent==null);\n");
	w.document.write( "function autoSize() {\n");
	w.document.write( "if ((document.Photo.complete) || ((document.Photo.width > 0) && (document.Photo.height > 0))) {\n");
	w.document.write( "if(IE5) self.resizeTo(document.Photo.width+10,document.Photo.height+31);\n"); 
	w.document.write( "else if(Safari) window.resizeTo(document.Photo.width+20,document.Photo.height+31);\n");
	w.document.write( "else if(NN6) self.sizeToContent();\n");
	w.document.write( "else window.resizeTo(document.Photo.width,document.Photo.height+20)\n"); 
	w.document.write( "self.focus();\n"); 
	w.document.write( "}\nelse { setTimeout('autoSize()',1000);}\n");
	w.document.write( "}\n");
	w.document.write( "//-->\n<"); 
	w.document.write( "/scri");
	w.document.write( "pt>\n"); 
	w.document.write( "</head><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 onload='autoSize();'>" );
	w.document.write( "<a href='javascript:window.close();'><img name='Photo' src='"+picture+"' border=0 alt='"+title+"' /></a>" ); 
	w.document.write( "</body></html>" );
	w.document.close();
}

