/*function newcribs(id)

{

   $(id).slideUp("slow");

}

*/

function pleaselogin(){

	alert("Please login first.");

}

function chkvalue(id,size,idImg){

	if (document.getElementById(id).value >= size)	{  	

		$('#'+idImg).attr('src', '/site/images/userOKIcon.gif'); 

	} else { 

		$('#'+idImg).attr('src', '/site/images/userNOIcon.gif'); 

	} 

}



function chklen(id,len,idImg){

	if (document.getElementById(id).value.length >= len)	{  	

		$('#'+idImg).attr('src', '/site/images/userOKIcon.gif'); 

	} else { 

		$('#'+idImg).attr('src', '/site/images/userNOIcon.gif'); 

	} 

}



function cleanfrom (id, what){

	if (document.getElementById(id).value==what) {document.getElementById(id).value= "";}

}



function cleanId(id){

	if (document.getElementById(id)){

		document.getElementById(id).src="/site/images/spacer.gif";

	} 

}



function newcribs(id)

{

   $(id).animate({ opacity: 0}, 500);

   $(id).queue(function (){

      $(this).empty().append('adsfadsfasdfaf');

      $(this).dequeue();

      $(id).animate({ opacity: 1}, 500 );

   });

}

function showRespondForm(parentId,pId){

var data = 	'<form method="post" enctype="multipart/form-data" action="/action/postcomment">' +

			'<input type="hidden" value="'+pId+'" name="pId" id="pId" />' +

			'<input type="hidden" value="'+parentId+'" name="parentId" id="parentId" />' +

			'<input type="hidden" value="FULLSIZEIMAGE_'+pId+'" name="pictureUrl" id="pictureUrl" />' +

			'<div class="frontInput cribComments fullImgComments">' +

			'<textarea name="rComment"></textarea>' +

			'</div>' +

			'<input type="submit" value="Skicka" title="Skicka" />' +

			'</form>';

			

			$('#respondDiv'+parentId).html(data);

//			alert(data);

}

function showRespondFormComments(parentId,commentId,newsId){

var data = 	'<form method="post" enctype="multipart/form-data" action="/action/postcomment">' +

			'<input type="hidden" value="'+newsId+'" name="newsId" id="newsId" />' +

			'<input type="hidden" value="'+commentId+'" name="news" id="news" />' +

			'<input type="hidden" value="'+parentId+'" name="parentId" id="parentId" />' +

			'<div class="frontInput cribComments fullImgComments">' +

			'<textarea name="rComment"></textarea>' +

			'</div>' +

			'<input type="submit" value="Skicka" title="Skicka" />' +

			'</form>';

			

			$('#respondDiv'+parentId).html(data);

//			alert(data);

}
