function GrabCalendar(q) {
	document.getElementById("calendar_container").innerHTML ='<img src="images/loading.gif" />';
	var ajaxRequest;  // The variable that makes Ajax possible!
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			var ajaxDisplay = document.getElementById('calendar_container');
			ajaxDisplay.innerHTML = ajaxRequest.responseText;
		}
	}
	
	
	
	var queryString = "?"+q;
	ajaxRequest.open("GET", "/calendar/index.php" + queryString, true);
	ajaxRequest.send(null);
}




function FitnessDayStatus(status,fd)
{
	var ajaxRequest;  // The variable that makes Ajax possible!
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			var ajaxDisplay = document.getElementById('calendar_container');
			ajaxDisplay.innerHTML = ajaxRequest.responseText;
		}
	}
	
	
	
	var queryString = "?status="+status+"&fitness_date="+fd;
	ajaxRequest.open("GET", "/calendar/index.php" + queryString, true);
	ajaxRequest.send(null);
}



function GrabFitness(fdate)
{
	window.location.href = "/mytrain360/exercises/"+fdate;
}

var workouts_left_control = 0;
function MarkWorkout(fitness_id,check_state,workouts_left)
{
	
	var is_checked;
	if (check_state)
		is_checked = 'yes';
	else
		is_checked = 'no';
	//document.getElementById("calendar_container").innerHTML ='<img src="images/loading.gif" />';
	
	var ajaxRequest;  // The variable that makes Ajax possible!
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	/*ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			var ajaxDisplay = document.getElementById('calendar_container');
			ajaxDisplay.innerHTML = ajaxRequest.responseText;
		}
	}*/
	var queryString = "?fitness_id="+fitness_id+"&check_state="+is_checked;
	ajaxRequest.open("GET", "/fitness/fitness_mark_workout.php" + queryString, true);
	ajaxRequest.send(null);
	
	workouts_left_control++;
	
	if (workouts_left_control==workouts_left)
	{
		document.getElementById("completed_message").style.display = "";
	}
}

function CloseUploadImageDialog()
{
	document.getElementById("display_image_upload_container").style.display = "none";
}

function OpenUploadImageDialog()
{
	document.getElementById("display_image_upload_container").style.display = "";
}


function CheckResetPW()
{
	var pw1 = document.getElementById("password1").value;
	var pw2 = document.getElementById("password2").value;
	var err_msg = "";
	
	if (pw1.length<6 || pw2.length<6)
	{
		err_msg+= "Password field was left blank.  Must be atleast 6 characters long.\n";
	}
	
	if ( pw1!=pw2)
	{
		err_msg += "Passwords must match.\n";
	}
	
	if (err_msg != "")
	{
		alert(err_msg);
		return false;
	} else
	{
		return true;
	}
}

function RemoveSavedWorkout(fid)
{
	if ( confirm("Are you sure you want to remove this workout from your favorites?") )
	{
		document.getElementById("remove_fitness_day_id").value = fid;
		document.remove_favorite.submit();
	}
}

function DeleteImage(image_id)
{
	if ( confirm("Are you sure you want to delete this image?") )
	{
		document.getElementById("delete_image_id").value = image_id;
		document.delete_image.submit();
	}
}





//OPTIONS DROP DOWN
var drop_timer;

function ShowDrop()
{
	var drop_list;
	drop_list = document.getElementById("calendar_month_drop_list_container");
	drop_list.style.display = "block";
}

function HideDrop()
{
	var drop_list;
	drop_list = document.getElementById("calendar_month_drop_list_container");
	drop_timer = setTimeout("HideDropNow()",700);
	
}

function HideDropNow()
{
	var drop_list;
	drop_list = document.getElementById("calendar_month_drop_list_container");
	drop_list.style.display = "none";
}

function RestoreDrop()
{
	clearTimeout ( drop_timer );
}


//PROFILE EDIT
function CheckProfileEdit()
{
	// i do not see any of these fields being required
	return true;
}


//BLOGS
function CheckBlog()
{
	var blog_title = document.getElementById("blog_title").value;
	var blog = document.getElementById("blog").value;
	var err  = "";
	if ( blog_title=="" )
		err+= "Title was left blank.\n";
		
	if ( blog == "" )
		err += "Blog was left blank.\n";
	
	
	if ( err != "" )
	{	
		alert("The following errors have occured:\n\n"+err);
		return false;
	} else 
	{
		return true;
	}
}





//BULLETINS
function CheckBulletin()
{
	var bulletin_title = document.getElementById("bulletin_title").value;
	var bulletin = document.getElementById("bulletin").value;
	var err  = "";
	if ( bulletin_title=="" )
		err+= "Title was left blank.\n";
		
	if ( bulletin == "" )
		err += "Bulletin was left blank.\n";
	
	
	if ( err != "" )
	{	
		alert("The following errors have occured:\n\n"+err);
		return false;
	} else 
	{
		return true;
	}
}



//FRIEND REQUEST
function CheckFriendRequest()
{
	var err = "";
	var greeting_message = document.getElementById("greeting_message").value;
	
	if ( greeting_message == "" )
	{
		alert ("Please enter a brief greeting message to continue.\n");
		return false;
	} else
	{
		return true;
	}
}



function FriendsLoad(friend_type)
{
	var ajaxRequest;  // The variable that makes Ajax possible!
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			var ajaxDisplay = document.getElementById('friends_toggle_box');
			ajaxDisplay.innerHTML = ajaxRequest.responseText;
		}
	}
	
	
	
	var queryString = "?friend_type="+friend_type;
	ajaxRequest.open("GET", "/global/ajax/user_friends.php" + queryString, true);
	ajaxRequest.send(null);
}

function remove_shared_videos(vid_id, user_id)
{
	
	var ajaxRequest;  // The variable that makes Ajax possible!
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
	
		if(ajaxRequest.readyState == 4){
			var ajaxDisplay = document.getElementById('shared_'+vid_id);
			ajaxDisplay.innerHTML = '';
		}
	}
	
	
	
	var queryString = "?video_id="+vid_id+"&user="+user_id;
	ajaxRequest.open("GET", "/global/ajax/remove_shared_videos.php" + queryString, true);
	ajaxRequest.send(null);
}


function FriendsHomeLoad()
{
	var ajaxRequest;  // The variable that makes Ajax possible!
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			var ajaxDisplay = document.getElementById('my_train_buddys');
			ajaxDisplay.innerHTML = ajaxRequest.responseText;
		}
	}
	
	
	
	ajaxRequest.open("GET", "/global/ajax/user_friends_list_home.php", true);
	ajaxRequest.send(null);
}







document.getElementsByClassName = function(cl) {
	var retnode = [];
	var myclass = new RegExp('\\b'+cl+'\\b');
	var elem = this.getElementsByTagName('*');
	for (var i = 0; i < elem.length; i++) {
		var classes = elem[i].className;
		if (myclass.test(classes)) retnode.push(elem[i]);
	}
	return retnode;
};
		
	
function show_content(show_ele,tab_id)
{
	document.getElementById('my_profile_edit').style.display = "none";
	document.getElementById('my_weight_edit').style.display = "none";
	document.getElementById('my_measurement_edit').style.display = "none";
	document.getElementById('my_goals_edit').style.display = "none";
	document.getElementById('my_mood_edit').style.display = "none";
	
	document.getElementById('tab_profile_edit').className = "profile_tab_default";
	document.getElementById('tab_my_weight_edit').className = "profile_tab_default";
	document.getElementById('tab_my_measurement_edit').className = "profile_tab_default";
	document.getElementById('tab_my_goals_edit').className = "profile_tab_default";
	document.getElementById('tab_my_mood_edit').className = "profile_tab_default";
	
	
	
	Effect.toggle(show_ele,'appear');
	//alert(show_ele);
	//document.getElementById(show_ele).style.display = "";
	document.getElementById(tab_id).className = 'my_profile_tabs_anchor';
}





function SaveWorkout(fitness_id)
{
	var ajaxRequest;  // The variable that makes Ajax possible!
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			//alert(ajaxRequest.responseText);
		}
	}
	
	
	var queryString = "?fitness_id="+fitness_id;
	ajaxRequest.open("GET", "/user_save_workout.php" + queryString, true);
	ajaxRequest.send(null);
}


function ShareVideo(fitness_id)
{
	var ajaxRequest;  // The variable that makes Ajax possible!
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			alert('Video has been shared');
		}
	}
	
	
	var queryString = "?fitness_id="+fitness_id;
	ajaxRequest.open("GET", "/user_share_workout.php" + queryString, true);
	ajaxRequest.send(null);
}




//MAIL
var mail_to;

function MailAutoTo(user_input)
{
	var to_field = document.getElementById("mail_to");
	var to_field_input = document.getElementById("mail_to_input");
	
	if (user_input!="")
	{
			to_field.className = "mail_to_list";
			
			var chat_box = document.getElementById("mail_to");
		
			var ajaxRequest;  // The variable that makes Ajax possible!
			var return_string;
			
			try{
				// Opera 8.0+, Firefox, Safari
				ajaxRequest = new XMLHttpRequest();
			} catch (e){
				// Internet Explorer Browsers
				try{
					ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
				} catch (e) {
					try{
						ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
					} catch (e){
						// Something went wrong
						alert("Your browser broke!");
						return false;
					}
				}
			}
			
			// Create a function that will receive data sent from the server
			ajaxRequest.onreadystatechange = function(){
				if(ajaxRequest.readyState == 4)
				{
					return_string = ajaxRequest.responseText;
					chat_box.innerHTML = return_string;
				}
			}
			
			var queryString = "?mail_to="+user_input;
			ajaxRequest.open("GET", "/global/ajax/message_to.php" + queryString, true);
			ajaxRequest.send(null);
		
	} else
	{
		to_field.className = "mail_to_default";
		document.getElementById("mail_to").innerHTML = "Start typing a username";
	}
	to_field.style.display = "";
}


function MailToUserSet(username, user_id)
{
	var mail_to_field = document.getElementById("mail_to_input");
	document.getElementById("to_user_id").value = user_id;
	mail_to_field.value = username;
	document.getElementById("mail_to").innerHTML ="";
	MailAutoClose_Kill();
	
}



function MailAutoClose()
{
	mail_to = setTimeout("MailAutoClose_Kill()",800);
}


function MailAutoClose_Kill()
{
	var to_field = document.getElementById("mail_to");
	to_field.style.display = "none";	
}




function RestoreMailToAuto()
{
	clearTimeout( mail_to );
}




var message_okay = false;


function CheckNewMessage()
{
	var ajaxRequest;  // The variable that makes Ajax possible!
	var return_string;
	var mail_to = document.getElementById("mail_to_input").value;
	
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4)
		{
			return_string = ajaxRequest.responseText;
			if ( return_string==0)
			{
				document.getElementById("mail_to").style.display = "";
				document.getElementById("mail_to").className = "mail_to_default";
				document.getElementById("mail_to").innerHTML = "<span style='color: #FF3333;font-weight: bold;'>Username was not found.</span>";
				RestoreMailToAuto();
				message_okay = false;
				
			} else
			{
				document.getElementById("to_user_id").value = return_string;
				message_okay = true;
				document.message_new_form.submit();
			}
			
		}
	}
	
	var queryString = "?mail_to="+mail_to;
	ajaxRequest.open("GET", "/global/ajax/message_to_check.php" + queryString, true);
	ajaxRequest.send(null);
}

function MailSetRead(mail_id)
{
	document.getElementById("mail_status_"+mail_id).innerHTML = "Read";
}




//ALBUMS
var image_options_timer;

function ShowDropImages(image_id)
{
	var drop_list;
	drop_list = document.getElementById("image_option_"+image_id);
	drop_list.style.display = "block";
}

function HideDropImages(image_id)
{
	var drop_list;
	drop_list =document.getElementById("image_option_"+image_id);
	image_options_timer = setTimeout("HideDropNowImages("+image_id+")",700);
	
}

function HideDropNowImages(image_id)
{
	var drop_list;
	drop_list = document.getElementsByClassName("album_image_option_all");
	for (x=0;x<drop_list.length;x++)
	{
		drop_list[x].style.display = 'none';
	}
}

function RestoreDropImages()
{
	clearTimeout ( image_options_timer );
}


function DeleteImage(image_id, album_name)
{
	if ( confirm("Are you sure you want to delete this image?") )
	{
		window.location.href = "/user_album_image_delete.php?image_id="+image_id+"&album_name="+album_name;
	}
}


function DeleteAlbum(album_id, album_name)
{
	if ( confirm("Are you sure you want to delete this album and all of its images?") )
	{
		window.location.href = "/user_album_delete.php?album_id="+album_id+"&album_name="+album_name;
	}
}



/* ACCOUNT SETTINGS */
function ShowAccount(show_ele,current_tab)
{
	document.getElementById("tab_account_personal").className="profile_tab_default";
	document.getElementById("tab_account_billing").className="profile_tab_default";
	document.getElementById("tab_account_billing_history").className="profile_tab_default";
	document.getElementById("tab_account_cancellation").className="profile_tab_default";
	
	document.getElementById("content_account_personal").style.display = "none";
	document.getElementById("content_account_billing").style.display = "none";
	document.getElementById("content_account_billing_history").style.display = "none";
	document.getElementById("content_account_cancellation").style.display = "none";
	
	
	Effect.toggle(show_ele,'appear');
	document.getElementById(current_tab).className = "my_profile_tabs_anchor";
}


function CheckAccount_Personal()
{
	var err = "";
	var username = document.getElementById("new_username").value;
	if (document.getElementById("first_name").value=="")
		err += "First Name\n";
	if (document.getElementById("last_name").value=="")
		err += "Last Name\n";
	if (document.getElementById("city").value=="")
		err += "City\n";
	if (document.getElementById("state").value=="")
		err += "State\n";
	if (document.getElementById("zip").value=="")
		err += "Zip\n";
	
	
	if (username=="")
		err += "Username\n";
	
	if (username!="" && username.length<5)
		err += "Username must be atleast 5 characters long.\n";
	
	if (!isAlphaNumeric(username))
	{
		err += "Invalid username. Only letters and numbers are allowed.\n";
	}
	
	
	if (err!="")
	{
		alert("The following fields were left blank:\n\n"+err);
		return false;
	} else 
	{
		return true;
	}
}

function CheckAccount_Billing()
{
	var err = "";
	
	
	if (document.getElementById("billing_first_name").value=="")
		err += "Billing First Name\n";
	if (document.getElementById("billing_last_name").value=="")
		err += "Billing Last Name\n";
	if (document.getElementById("billing_address1").value=="")
		err += "\Billing Address1\n";
	if (document.getElementById("billing_city").value=="")
		err += "Billing City\n";
	if (document.getElementById("billing_state").value=="")
		err += "Billing State\n";
	if (document.getElementById("billing_zip").value=="")
		err += "Billing Zip\n";
	if (document.getElementById("billing_country").value=="")
		err += "Billing Country\n";
	
	
	
	if (err!="")
	{
		alert("The following fields were left blank:\n\n"+err);
		return false;
	} else 
	{
		return true;
	}
}




//alert(username.length);
	
	
	

function isAlphaNumeric(val)
{
if (val.match(/^[a-zA-Z0-9]+$/))
{
return true;
}
else
{
return false;
} 
}



function CheckAccount_UpdateCC()
{
	if (document.getElementById("update_cc_info").checked)
	{
		document.getElementById("row_billing_cc_type").style.display = "";
		document.getElementById("row_billing_cc_number").style.display = "";
		document.getElementById("row_billing_cc_exp").style.display = "";
	} else 
	{
		document.getElementById("row_billing_cc_type").style.display = "none";
		document.getElementById("row_billing_cc_number").style.display = "none";
		document.getElementById("row_billing_cc_exp").style.display = "none";
	}
}

function CheckAccount_Cancel()
{
	if (document.getElementById("reason").value=="")
	{
		alert("Please tell us your reason for cancelling.");
		return false;
	} else 
	{
		if (confirm("Are you sure you want to cancel your account?") )
		{
			return true;
		} else 
		{
			return false;
		}
	}
}


var workout_gallery_margin = 0;
var workout_gallery_timer = "";
var slidespeed = 20;

function WorkoutSlideInit(dir)
{
	
	workout_gallery_timer = setTimeout("WorkoutSlide('"+dir+"')",slidespeed);
	
}


function WorkoutSlide(dir)
{
		var workout_gallery_mask = document.getElementById("workout_gallery_slider");
	
		if (dir=='next')
		{
			if (workout_gallery_margin > -770)
			{
				workout_gallery_margin--;
				workout_gallery_margin--;
				workout_gallery_margin--;
				workout_gallery_margin--;
				workout_gallery_margin--;
				workout_gallery_margin--;
				workout_gallery_margin--;
				workout_gallery_mask.style.marginLeft = workout_gallery_margin+"px";
			}  else
			{
				WorkoutSlideKill();
				return;
			}
		} else 
		{
			if ( workout_gallery_margin!=0)
			{
				workout_gallery_margin++;
				workout_gallery_margin++;
				workout_gallery_margin++;
				workout_gallery_margin++;
				workout_gallery_margin++;
				workout_gallery_margin++;
				workout_gallery_margin++;
				workout_gallery_mask.style.marginLeft = workout_gallery_margin+"px";
			} else 
			{
				WorkoutSlideKill();
				return;
			}
		}
		
	
		WorkoutSlideInit(dir);
}


function WorkoutSlideKill()
{
	clearTimeout( workout_gallery_timer );
}

function WorkoutGoto(et)
{
	var workout_gallery_mask = document.getElementById("workout_gallery_slider");
	
	switch(et)
	{
		case "biceps":
			workout_gallery_margin = 0;
			break;
		case "triceps":
			workout_gallery_margin = 0;
			break;
		case "chest":
			workout_gallery_margin = -132;
			break;
		case "legs-butt":
			workout_gallery_margin = -260;
			break;
		case "abs-core":
			workout_gallery_margin = -390;
			break;
		case "full-body":
			workout_gallery_margin = -524;
			break;
		case "shoulders":
			workout_gallery_margin = -650;
			break;
		case "back":
			workout_gallery_margin = -772;
			break;
		case "stretching":
			workout_gallery_margin = -772;
			break;
	}	
	
	workout_gallery_mask.style.marginLeft = workout_gallery_margin+"px";
}




/*USER SEARCH */
function ClearUserSearch()
{
	var search_ele = document.getElementById("search_text");
	
	if (search_ele.value == "first name, last name, or email")
	{
		search_ele.value = "";
	}
}

function ClearUserSearchOut()
{
	var search_ele = document.getElementById("search_text");
	
	if (search_ele.value == "")
	{
		//search_ele.value = "first name, last name, or email";
	}
}

function CheckUserSearch()
{
	var search_ele = document.getElementById("search_text");
	if (search_ele.value == "first name, last name, or email" || search_ele.value=="")
	{
		alert("Please enter a first name, last name, or email address to search");
		search_ele.value = "";
		search_ele.focus();
		return false;
	} else 
	{
		return true;
	}
}





var friend_drop_timer;
function FriendCloseDrop_Kill()
{
	var drop_friends = document.getElementsByClassName("friend_manage_drop_options");
	for(x=0;x<drop_friends.length;x++)
	{
		drop_friends[x].style.display = "none";
	}
}


function FriendDropShow(user_id)
{
	FriendCloseDrop_Kill();
	document.getElementById("friend_drop_"+user_id).style.display = "";
}


function FriendCloseDrop()
{
	friend_drop_timer = setTimeout("FriendCloseDrop_Kill()",1000);
}


function RestoreFriendCloseDrop()
{
	clearTimeout( friend_drop_timer );
}



function DeleteFriendManage(user_id)
{
	if ( confirm("Are you sure you want to delete this user from your buddy list?") )
	{
		window.location.href = "/user_delete_friend.php?user_id="+user_id;
	}
}