function hideInline(id) {
	element = document.getElementById( id );
	if(element) {
		element.style.visibility = "hidden";
		element.style.display = "none";
	}
}

function showInline(id) {
	element = document.getElementById( id );
	if(element) {
		element.style.visibility = "visible";
		element.style.display = "inline";
	} 
}

function JS( menu,id ) {//
   nameDiv=eval("document.getElementById(menu)");
   if(nameDiv.style.display=='none')
   {
	   nameDiv.style.display='block';
	   YAHOO.util.Dom.addClass( id, 'selected' );
   }else{
	   nameDiv.style.display='none';
	   YAHOO.util.Dom.removeClass( id, 'selected' );
   }
}

function fillTextUrl( idText, href ) {
	document.getElementById( idText ).innerHTML = '<a href="' + href.replace( /#postcomment/, '' ) + '#postcomment">add</a>';
}

function openWondowMessages( idUser, sUrl ){
	window.open ( sUrl,"talkWithUser_"+idUser,"location=0,status=0,menubar=0,resizable=0,width=400,height=550"); 
}
function openWindowMessagesLosed( idUser, sUrl ){
	window.open ( sUrl,"talkWithUser_"+idUser,"location=0,status=0,menubar=0,resizable=0,width=400,height=250"); 
}
function openWindowForgotPassword( sUrl ){
	window.open ( sUrl,"forgotPassword","location=0,status=0,menubar=0,resizable=0,width=400,height=250"); 
}
function openWindowTermOfUse( sUrl ){
	window.open ( sUrl,"termOfUse","location=0,status=0,menubar=0,resizable=0,width=500,height=300"); 
}
function sendEmailForgotPassword( form ){
	if( form.email.value == '' ){
		alert( 'Your email could not be empty.' );
		return false;
	} else {
		window.close();
		return true;
	}
}

function sendMessageLosed( form ){
	if( form.email.value == '' ){
		alert( 'Your email could not be empty.' );
		return false;
	} else if( form.text.value == '' ){
		alert( 'Your text could not be empty.' );
		return false;
	} else {
		window.close();
		return true;
	}
}
function showHideBlock( idElement ){
	obj = document.getElementById( idElement );
//	alert( obj.style.visibility );
//	if( 'visible' == obj.style.visibility ) {
////		obj.style.visibility = 'collapse';
//		obj.style.visibility = 'hidden';
//	} else {
//		obj.style.visibility = 'visible';
//	}
	alert( obj.style.display );
	if( 'none' == obj.style.display ) {
//		obj.style.visibility = 'collapse';
		obj.style.display = 'block';
	} else {
		obj.style.display = 'none';
	}
}
function showBlock( idElement ){
	obj = document.getElementById( idElement );
		obj.style.display = 'block';
}
function hideBlock( idElement ){
	obj = document.getElementById( idElement );
	obj.style.display = 'none';
	alert( obj.style.display );
}
function dateLosedEnabled(){
//	alert( document.getElementById( 'dateLosed_y' ).disabled );
	document.getElementById( 'dateLosed_y' ).disabled = false;
	document.getElementById( 'dateLosed_m' ).disabled = false;
	document.getElementById( 'dateLosed_d' ).disabled = false;
}
function dateLosedDisabled(){
	document.getElementById( 'dateLosed_y' ).disabled = true;
	document.getElementById( 'dateLosed_m' ).disabled = true;
	document.getElementById( 'dateLosed_d' ).disabled = true;
//	obj = document.getElementById( 'dateLosed' );
//	alert( obj.item(1).disabled );
//	obj.childNodes[1].disabled = true;
//	obj.childNodes[1].disabled = true;
//	obj.childNodes[3].disabled = true;
//	obj.childNodes[5].disabled = true;
}