
	
	
	function __fncSort(strColoumnName){
		document.frmDisplayJournallist.txtOrderCol.value = strColoumnName;
		document.frmDisplayJournallist.submit();
	}
	function __fncPaginate(strStart, strOrder){
		document.frmDisplayJournallist.txtStart.value 		= strStart;
		document.frmDisplayJournallist.txtOrderType.value 	= strOrder;
		document.frmDisplayJournallist.submit();
	}

	function __fncFriendMail(requesteeId,requesteeName){
		//alert(userID);
		if ((typeof(userID)=="undefined") || (userID==0)) return __fncLoginMessage1();
		var result=confirm("Send "+requesteeName+" a friend request?");
		if(result==false)
		return;
		document.friends.requesterid.value = userID;
		document.friends.requesteeid.value = requesteeId;
		document.friends.friendmail.value = 'Add';
		document.friends.submit();
	}
	
	function __fncBookMarkFriend(requesteeId,requesteeName){
		if ((typeof(userID)=="undefined") || (userID==0)) return __fncLoginMessage2();
		var result1=confirm("Bookmark "+requesteeName+"?");
		if(result1==false)
		return;	
		document.friends.requesterid.value = userID;
		document.friends.requesteeid.value = requesteeId;
		document.friends.txtWhat2Do.value = 'BOOKMARKFRIEND';
		document.friends.submit();
	}


	
	function __fncEditJournal(journalId,userId){
		document.frmDisplayJournallist.txtWhat2Do.value			=	'EDIT';
		document.frmDisplayJournallist.txtJournalId.value		=	journalId;
		document.frmDisplayJournallist.txtViewOrder.value		=	'MAINTAINED';
//		document.frmDisplayJournallist.action='http://www.inboxjournal.com/id/'+userId+'/'+journalId;
		document.frmDisplayJournallist.action='http://www.inboxjournal.com/id/'+userId+'/f_'+journalId;
		document.frmDisplayJournallist.submit();
	}
	function __fncCheckNewDetails(journalId,userId){
		if(document.frmDisplayJournallist.txtPublic.value	==	''	||	document.frmDisplayJournallist.txtPublic.value	==	null) {
			alert("Please enter the description");
			return;
		}
		document.frmDisplayJournallist.txtWhat2Do.value				=	'UPDATE';	
		document.frmDisplayJournallist.txtJournalId.value				=	journalId;
		document.frmDisplayJournallist.action='http://www.inboxjournal.com/id/'+userId+'/f_'+journalId;
		document.frmDisplayJournallist.submit();
	}
	function __fncLoginMessage1(){
		if(document.getElementById('loginmessage1').style.display=='inline')
			document.getElementById('loginmessage1').style.display='none';
		else
			document.getElementById('loginmessage1').style.display='inline'	;
		document.getElementById('loginmessage2').style.display='none';
		document.getElementById('loginmessage3').style.display='none';
		
	}
	function __fncLoginMessage2(){
		if(document.getElementById('loginmessage2').style.display=='inline')
			document.getElementById('loginmessage2').style.display='none';
		else
		document.getElementById('loginmessage2').style.display='inline'	;
		document.getElementById('loginmessage1').style.display='none';
		document.getElementById('loginmessage3').style.display='none';
	}
	function __fncLoginMessage3(){
		if(document.getElementById('loginmessage3').style.display=='inline')
			document.getElementById('loginmessage3').style.display='none';
		else
		document.getElementById('loginmessage3').style.display='inline'	;
		document.getElementById('loginmessage2').style.display='none';
		document.getElementById('loginmessage1').style.display='none';
	}
	
	var newwindow;
	function openwindowid(){
		newwindow = window.open('http://www.inboxjournal.com/articles/friends_definition.php','FRIENDS','width=473,height=310,menubar=yes,status=yes');
		var w=window.screen.width - 200;
		var h=window.screen.height - 100;
		//newwindow.moveTo(w/2,h/2);
	}
	function popfrienddefination(){
		//alert("Hello");
		newwindow=window.open ("http://www.inboxjournal.com/friends_defination.php","FRIENDS DEFINATION","menubar=1,resizable=1,width=556,height=250"); 
		//newwindow=window.open('http://www.inboxjournal.com/id/friends_defination.php','Friend Defination','height=70,width=425,scrollbars=yes');
		if (window.focus) {newwindow.focus()}
	}
	function __show_image(imagename){
		document.frmimage.imagename.value=imagename;
		document.frmimage.txtWhat2DO.value="SHOW_IMAGE";
		document.frmimage.submit();
	}
	function __fncshowalbum(album){
		
		document.frmimage.album.value=album;
		document.frmimage.submit();
	}
	function __fncDeleteJournal(journalId, strOrder){
		var result=confirm('Are you sure you want to delete this entry?');
		if(result){
		document.frmDisplayJournallist.action = location.href;
		document.frmDisplayJournallist.txtWhat2Do.value			=	'DELETE';
		document.frmDisplayJournallist.txtJournalId.value		=	journalId;
		document.frmDisplayJournallist.txtOrderType.value 	= strOrder;
		document.frmDisplayJournallist.submit();
		}
	}
