  function openItinerary(id, name){
	  setLocation("#this_itinerary_expand&1="+id+"&2="+Url.encode(name));
  }
  
  
	function showFwdPopup(itineraryId){
		var html='';
		html="<div  id='fwd_frnd_div' class='dragable' style='display:none; left:501px; top:216px; width:270px; height:185px; overflow:hidden; '><div  id='fwd_frnd_div_h'><table border='0' cellspacing='0' cellpadding='0' width='100%'><tr>  <td align='left' class='title_top_left'></td>  <td class='title_top_middle text3' align='left'> &nbsp;</td>  <td class='title_top_middle text3'  align='right'><a href='javascript:void(0)' class='navlink2' onclick=\"hideDisableDiv('fwd_frnd_div'); $('#fwd_frnd_div').remove(); \">X</a>&nbsp;</td> <td align='left' class='title_top_right'></td></tr></table></div><div style='padding:20px' class='dg2'> <table width='100%'><tr><td colspan='2'><span id='errormsg_fwd_frnd'></span></td></tr></table> <table width='100%'><tr><td width='25%' valign='top'>Username:</td><td width='75%'><input type='text' id='fwd_frnd_uname' name='itinerary_name'></td></tr><tr> <td valign='top'>Email:</td><td><input type='text' id='fwd_frnd_email' ></td></tr><tr><td></td><td><input  type='submit' class='element.style' value='Send' style='color:#deead2; background-color: rgb(138, 181, 76); font-weight: bold;'  onclick=\"fwdFrnd('"+itineraryId+"'); \" ></td></tr></table></form></div></div>";
		
		$(document.body).append(html);
		showDisableDiv("fwd_frnd_div");
	}
	
	function slctItiPgnt(url){
		setLocation('getPage',url,'','My Travel Plans');
	}
	
	
	function fwdFrnd(itineraryId){
		var e,n;
		e=$('#fwd_frnd_email').val();
		n=$('#fwd_frnd_uname').val();	
	
		if(!echeck(e)){
			alert('Please enter a valid E-mail ID');
			return false;
		}
	
		if(n && n.length > 3){
			$.post(ROOT_PATH+'aj_request.php?aj=itinerary.fwd_frnd', 'itineraryId='+itineraryId+"&name="+escape(n)+'&email='+escape(e), function(resp){ 
					alert(resp);
					hideDisableDiv("fwd_frnd_div");
					$('#fwd_frnd_div').remove();
		});
		}else{
			alert('invalid Username!');
			return false;
		}
	}
	
	function copyItinerary(itineraryID, itiName){
		$.post(ROOT_PATH+'aj_request.php?aj=journeyplanner.revisedRequest', 'itineraryID='+itineraryID+"&name="+escape(itiName)+'&duplicate=1', function(resp){ 
								if(resp!='exists') 
									window.location = ROOT_PATH+'index.php?p=user.control_pannel&id='+resp+'&duplicate=1';  
		});
	}
	
	function deleteItinerary(itineraryID){
		if(confirm("Are you Sure You Want To Delete this Itinerary"))	
			$.get(ROOT_PATH+'aj_request.php','aj=user.select_itinerary&delId='+itineraryID,function(resp){
																							   $('#main_div').html(resp);
																					});
	}
	
