function check_email(e){
	ok = "1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM";
	for(i=0; i < e.length ;i++){
		if(ok.indexOf(e.charAt(i))<0){ 
			return false;
		}
	} 
	if (document.images) {
		re = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/;
		re_two = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
		if (!e.match(re) && e.match(re_two)) {
			return (-1);
		} 
	}
}

function popUp(URL, width, height) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width="+width+",height="+height+"');");
}
function popUp_WOR(sURL, width, height) {
	day = new Date();
	id = day.getTime();
    img_win = window.open('', id, 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width='+width+',height='+height);
    with(img_win.document) {
    	//open();
        writeln('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
        writeln('<html xmlns="http://www.w3.org/1999/xhtml">');
        writeln('<head>');
        writeln('<meta http-equiv="refresh" content="0; url='+sURL+'">');
        writeln('</head>');
        writeln('</body></html>');
        close();
    }
	//eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width="+width+",height="+height+"');");
}
function SubmitLink(link, confirmMSG) {
	var d=document;
	var LinkHref = (typeof(link)=="object")?link.href:link;
	if (PHPUSRSID.length>0){
		Anchor = "";
		if (LinkHref.indexOf('#')>0){
			Anchor = LinkHref.substring(LinkHref.indexOf('#'));
			LinkHref = LinkHref.substring(0, LinkHref.indexOf('#'));
		}
		LinkHref += ((LinkHref.indexOf('?')>1)?'&':'?') + PHPUSRSID + Anchor;
	}
	if (confirmMSG != null){
		if (confirm(confirmMSG))
			window.location.href = LinkHref;
	} else {
		window.location.href = LinkHref;
	};
	return false;
}
