function chk_req(a,b){ // alert(a.name);
		if (a.value.length < 1 ) {
			alert(b);
			return false;
		}
		return true;
	}


function chk_frm(x){
		// if (! chk_req(x.username,'Please enter an Username.') )return;
		// if( x.username.value.indexOf(" ") > 0){alert("Username can not have space in it."); return;}
		if (! chk_req(x.dsp_name,'Please enter your display name.') ) return;	
		if (! chk_req(x.email,'Please enter email.') ) return;
		if (! chk_req(x.password,'Please enter password.') ) return;
//		if (! chk_req(x.password2,'Please confirm password.') ) return;
//		if(x.password.value != x.password2.value) {alert('Please make sure that both the passwords match'); return;}
//		if (! chk_req(x.first_name,'Please enter your first name.') ) return;
//		if (! chk_req(x.last_name,'Please enter last name.') ) return;

//		if (x.email.value != x.email1.value) {alert('Please confirm your email.'); return;}
		x.submit();
		return;
	}

function show_photo_div (x){ //alert(typeof(photo_div));
if(typeof(photo_div) == "undefined"){
		var aid = document.getElementById('article_id').value;
		var d = document.createElement("div");
			d.setAttribute("id","photo_div");
			d.setAttribute("style","width:750px;height:500px;z-index:99;position:absolute; top:300; left:10;");	
		
		var d2 = document.createElement("div");
			d2.setAttribute("style","width:750px;height:20px;position:relative; z-index:100; background-color:silver; top:0;");
		d.appendChild(d2);
		var lnk_txt = document.createTextNode('Close');
		var close_link = document.createElement("a");
			close_link.setAttribute("href","javascript:remove('photo_div');");
			//close_link.setAttribute("innerHTML","Close");
		close_link.appendChild(lnk_txt);	
		d2.appendChild(close_link);
		var i = document.createElement("iframe");
			i.setAttribute("style","width:750px;height:280px;background-color:blue;position:relative; top:0; left:0;");	
			i.setAttribute("src","/members/photo_frm.cfm?article_id="+aid);
		d.appendChild(i);
		//alert(x);
		x.document.body.appendChild(d);		
	}
}

function remove(x){
	y= document.getElementById(x);
	window.document.body.removeChild(y);

}