var win_popup;
function DeleteWindow(id,sid,pro,pag2) {
	win_popup.close();
	DeleteComment(id,sid,pro,pag2);
}
var win_popup = "";
function confirmDelete(id,sid,pro,pag2){
	 if(win_popup == ""){
	 win_popup = new Window({className: "mac_os_x",
							title: "<b>Delete Comment?</b>",
							width: 350,
							height: 150,
							resizable: false,
							closable: false,
							minimizable: false,
							maximizable: false,
							showEffect: Element.show,
							hideEffect: Element.hide,
							destroyOnClose: false,
							recenterAuto:false});
	 					}
	if(!win_popup.isVisible()){		
		win_popup.getContent().update("<div style='z-index:1000;height:130px;padding-top:20px;color:#FF8000;background:#2E2E2E'><div style='text-align:center;margin-top:20px;'><b>Are you sure you want to delete?</b></div><div style='text-align:center;margin-top:20px;'><input type='button' class='button button-size-xxlg button-color-orange' onclick='win_popup.close()' value='Cancel' />&nbsp;<input type='button' class='button button-size-xxlg button-color-orange' onclick='DeleteWindow("+id+","+sid+", \""+pro+"\","+pag2+")' value='Delete' /></div></div>"); 
		win_popup.showCenter();

	}
}
function confirmAdd(id,userid){
	 if(win_popup == ""){
		 win_popup = new Window({className: "mac_os_x",
								title: "<b>Add Friend?</b>",
								width: 350,
								height: 150,
								resizable: false,
								closable: false,
								minimizable: false,
								maximizable: false,
								showEffect: Element.show,
								hideEffect: Element.hide,
								destroyOnClose: false,
								recenterAuto:false});
	 }
	if(!win_popup.isVisible()){		
		win_popup.getContent().update("<form name='Add_Friend' method='POST' action=''><input type='hidden' value='Add_Friend' name='name'><input type='hidden' value='true' name='process'><input type='hidden' value='"+userid+"' name='userid'><div style='height:130px;padding-top:20px;color:#FF8000;background:#2E2E2E'><div style='text-align:center;margin-top:20px;'><b>Are you sure you want to add this user as your friend?</b></div><div style='text-align:center;margin-top:20px;'><input type='button' class='button button-size-xxlg button-color-orange' onclick='win_popup.close()' value='Cancel' />&nbsp;<input type='submit' class='button button-size-xxlg button-color-orange' value='Add' /></div></div></form>");
		win_popup.showCenter();
		return false;
	}
}
function confirmAddFighterToOrganization(id,userid){ 
	if(win_popup == ""){
		win_popup = new Window({className: "mac_os_x",
										title: "<b>Add Friend?</b>",
										width: 350,
										height: 150,
										resizable: false,
										closable: false,
										minimizable: false,
										maximizable: false,
										showEffect: Element.show,
										hideEffect: Element.hide,
										destroyOnClose: false,
										recenterAuto:false});
	}
	if(!win_popup.isVisible()){		
		win_popup.getContent().update("<form name='Add_Friend_Type2' method='POST' action=''><input type='hidden' value='Add_Friend_Type2' name='name'><input type='hidden' value='true' name='process'><input type='hidden' value='"+userid+"' name='userid'><div style='height:130px;padding-top:20px;color:#FF8000;background:#2E2E2E;text-align:center;'><div style='margin-top:20px;'><b>Are you sure you want to add this user as your friend?</b></div><div style='padding-top:10px;color:#c7c7c7;'><input id='check1' name='check' type='radio' value='1' onclick='checkboxonlyone(\"check2\")' checked /><label for='check1'> &nbsp;Add me as a friend &nbsp;</label><input id='check2' name='check' type='radio' value='3' onclick='checkboxonlyone(\"check1\")' /><label for='check2'> &nbsp;Add me as a sponsored Fighter &nbsp;</label></div><div style='text-align:center;margin-top:20px;'><input type='button' class='button button-size-xxlg button-color-orange' onclick='win_popup.close()' value='Cancel' />&nbsp;<input type='submit' class='button button-size-xxlg button-color-orange' value='Add' /></div></div></form>"); 
		win_popup.showCenter();
		return false;
	}
}
function confirmAddFighterToFighter(id,userid){ 
	if(win_popup == ""){
		win_popup = new Window({className: "mac_os_x",
										title: "<b>Add Friend?</b>",
										width: 350,
										height: 150,
										resizable: false,
										closable: false,
										minimizable: false,
										maximizable: false,
										showEffect: Element.show,
										hideEffect: Element.hide,
										destroyOnClose: false,
										recenterAuto:false});
	}
	if(!win_popup.isVisible()){		
		win_popup.getContent().update("<form name='Add_Friend_Type2' method='POST' action=''><input type='hidden' value='Add_Friend_Type2' name='name'><input type='hidden' value='true' name='process'><input type='hidden' value='"+userid+"' name='userid'><div style='height:130px;padding-top:20px;color:#FF8000;background:#2E2E2E;text-align:center;'><div style='margin-top:20px;'><b>Are you sure you want to add this user as your friend?</b></div><div style='padding-top:10px;color:#c7c7c7;'><input id='check1' name='check' type='radio' value='1' onclick='checkboxonlyone(\"check2\")' checked /><label for='check1'> &nbsp;Add me as a friend &nbsp;</label><input id='check2' name='check' type='radio' value='2' onclick='checkboxonlyone(\"check1\")' /><label for='check2'> &nbsp;Add me to your Fight Team &nbsp;</label></div><div style='text-align:center;margin-top:20px;'><input type='button' class='button button-size-xxlg button-color-orange' onclick='win_popup.close()' value='Cancel' />&nbsp;<input type='submit' class='button button-size-xxlg button-color-orange' value='Add' /></div></div></form>"); 
		win_popup.showCenter();
		return false;
	}
}
function confirmAddOrganizationToFighter(id,userid){ 
	if(win_popup == ""){
		win_popup = new Window({className: "mac_os_x",
										title: "<b>Add Friend?</b>",
										width: 350,
										height: 150,
										resizable: false,
										closable: false,
										minimizable: false,
										maximizable: false,
										showEffect: Element.show,
										hideEffect: Element.hide,
										destroyOnClose: false,
										recenterAuto:false});
	}
	if(!win_popup.isVisible()){		
		win_popup.getContent().update("<form name='Add_Friend_Type2' method='POST' action=''><input type='hidden' value='Add_Friend_Type2' name='name'><input type='hidden' value='true' name='process'><input type='hidden' value='"+userid+"' name='userid'><div style='height:130px;padding-top:20px;color:#FF8000;background:#2E2E2E;text-align:center;'><div style='margin-top:20px;'><b>Are you sure you want to add this user as your friend?</b></div><div style='padding-top:10px;color:#c7c7c7;'><input id='check1' name='check' type='radio' value='1' onclick='checkboxonlyone(\"check2\")' checked /><label for='check1'> &nbsp;Add me as a friend &nbsp;</label><input id='check2' name='check' type='radio' value='4' onclick='checkboxonlyone(\"check1\")' /><label for='check2'> &nbsp;Add me as a sponsor &nbsp;</label></div><div style='text-align:center;margin-top:20px;'><input type='button' class='button button-size-xxlg button-color-orange' onclick='win_popup.close()' value='Cancel' />&nbsp;<input type='submit' class='button button-size-xxlg button-color-orange' value='Add' /></div></div></form>"); 
		win_popup.showCenter();
		return false;
	}
}
function checkboxonlyone(i) {
	$(i).checked=false;
}
function personal() {
	$('personal').style.display="";
	$('other').style.display="none";
	}
  
function other() {
	$('other').style.display="";
	$('personal').style.display="none";
	}
function friend_add(id,userid) {
	window.location="index.php?id="+id+"&userid="+userid+"&process=true&name=Add_Friend";
}
function bioshow(){
	$('user-bio').toggle();
	$('bio').hasClassName('rank_container_new_link'); 
	$('bio').toggleClassName("rank_container_new_link_up"); 
}
function rankshow(){
	$('profile-rank').toggle();
	$('rank').hasClassName('rank_container_new_link'); 
	$('rank').toggleClassName("rank_container_new_link_up"); 
}
function commentsshow(){
	$('comment_container').toggle();
	$('comment_post').toggle();  
	$('comment-show').hasClassName('commenthead'); 
	$('comment-show').toggleClassName("commentheaddown");
}
function showfriends(){
	$('friends-side').toggle();
	$('friendslist').hasClassName('fighter_container_link'); 
	$('friendslist').toggleClassName("fighter_container_link_up");
}
function showvideo(){
	$('video-side').toggle();
	$('videolist').hasClassName('fighter_container_link'); 
	$('videolist').toggleClassName("fighter_container_link_up");
}
function showmyfighters(){
	$('myfighters').toggle();
	$('myfighters_list').hasClassName('fighter_container_link'); 
	$('myfighters_list').toggleClassName("fighter_container_link_up");
}
function showmysponsors(){
	$('mysponsors').toggle();
	$('mysponsors_list').hasClassName('fighter_container_link'); 
	$('mysponsors_list').toggleClassName("fighter_container_link_up");
}
function showinfo(){
	$('info-first').toggle();
	$('info-user').hasClassName('infolink'); 
	$('info-user').toggleClassName("infolinkup");
}
function showinfo2(){
	$('sec_details').toggle();
	$('info2-fighter').hasClassName('info2link'); 
	$('info2-fighter').toggleClassName("info2linkup");
} 
function recordshow(){
	$('record-dec').toggle();
	if($('record-dec').style.display == "none") {
		$('record-content').update('Click to Open');
	} else {
		$('record-content').update('Click to Close');
	}	
	$('record').hasClassName('infolink'); 
	$('record').toggleClassName("infolinkup");              
}
function favfightshow(){
	$('fav-fight-dec').toggle();
		if($('fav-fight-dec').style.display == "none") {
		$('fav-content').update('Click to Open');
	} else {
		$('fav-content').update('Click to Close');
	}
	$('fav-fight').hasClassName('infolink'); 
	$('fav-fight').toggleClassName("infolinkup");
}
function goalshow(){                 
	$('fight-goal-dec').toggle();
	if($('fight-goal-dec').style.display == "none") {
		$('goal-content').update('Click to Open');
	} else {
		$('goal-content').update('Click to Close');
	}
	$('fight-goal').hasClassName('infolink'); 
	$('fight-goal').toggleClassName("infolinkup");
}
function beltshow(){               
	$('belt-dec').toggle();
	if($('belt-dec').style.display == "none") {
		$('belt-content').update('Click to Open');
	} else {
		$('belt-content').update('Click to Close');
	}
	$('belt').hasClassName('infolink'); 
	$('belt').toggleClassName("infolinkup");
} 
function showstatus(){
	$('status_box_show').toggle();
	$('status-link').hasClassName('statuslink'); 
	$('status-link').toggleClassName("statuslinkup");
}
function showphoto(){
	$('photo-side').toggle();
	$('photolist').hasClassName('fighter_container_link'); 
	$('photolist').toggleClassName("fighter_container_link_up");
}
	function showdeletebutton(divname) {
		var button = "deletebutton"+divname;
		var div = "statusbox"+divname;
		$(button).toggle();
		$(div).setStyle({backgroundColor: '#3c3c3c'});

	}
	function hidedeletebutton(divname) {
		var button = "deletebutton"+divname;
		var div = "statusbox"+divname;
		$(button).toggle();
		$(div).setStyle({backgroundColor: '#2c2c2c'});
	}
