
var J = jQuery.noConflict();

jQuery.fn.tooltip = function(txt) {
	J(this).hover(function(e){  
		J("body").append('<p id="tooltip" style="position:absolute;">'+ txt+'</p>');
		J("#tooltip").css("top",(e.pageY-25) + "px").css("left",(e.pageX+5) + "px").fadeIn("fast");
	},function(){J("#tooltip").remove();})
	.mousemove(function(e){J("#tooltip").css("top",(e.pageY-25) + "px").css("left",(e.pageX+5) + "px");});
}
jQuery.fn.screenMask = function(classe) {
	J(this).hover(function(){
		J(this).find(classe).stop().animate({height:'45px',opacity: '0.9'},400);
	},function () { 
		J(this).find(classe).stop().animate({height:'0',opacity: '0'}, 400);
	});
}   
J(document).ready(function(){ J('.thumb h2').screenMask('.screenMask');}); 

jQuery.fn.tooltipSm = function(txt) {
	J(this).hover(function(e){  
		J("body").append('<p id="tooltipSm" style="position:absolute;">'+ txt+'</p>');
		J("#tooltipSm").css("top",(e.pageY-25) + "px").css("left",(e.pageX+5) + "px").fadeIn("fast");
	},function(){J("#tooltipSm").remove();})
	.mousemove(function(e){J("#tooltipSm").css("top",(e.pageY-25) + "px").css("left",(e.pageX+5) + "px");});
}
jQuery.fn.screenMaskSm = function(classe) {
	J(this).hover(function(){
		J(this).find(classe).stop().animate({height:'45px',opacity: '0.9'},400);
	},function () { 
		J(this).find(classe).stop().animate({height:'0',opacity: '0'}, 400);
	});
}   
J(document).ready(function(){ J('.thumbSm h2').screenMaskSm('.screenMaskSm');}); 

// Change game listing on INDEX page
function changeIndexGameMenu(divName,num){
	switch(num){
		case 1:
			document.getElementById(divName).innerHTML = "<ul><li><span>latest games</span></li><li><a name=\"popularGames\" onClick=\"changeIndexGameMenu('indexGameMenu',2);\" href=\"#popularGames\">most popular games</a></li><li><a name=\"highestRatedGames\" onClick=\"changeIndexGameMenu('indexGameMenu',3);\" href=\"#highestRatedGames\">highest rated games</a></li> </ul>";
			changeIndexGames(num);
			break;
		case 2:
			document.getElementById(divName).innerHTML = "<ul><li><a name=\"latestGames\" onClick=\"changeIndexGameMenu('indexGameMenu',1);\" href=\"#latestGames\">latest games</a></li><li><span>most popular games</span></li><li><a name=\"highestRatedGames\" onClick=\"changeIndexGameMenu('indexGameMenu',3);\" href=\"#highestRatedGames\">highest rated games</a></li> </ul>";
			changeIndexGames(num);
			break;
		case 3:
			document.getElementById(divName).innerHTML = "<ul><li><a name=\"latestGames\" onClick=\"changeIndexGameMenu('indexGameMenu',1);\" href=\"#latestGames\">latest games</a></li><li><a name=\"popularGames\" onClick=\"changeIndexGameMenu('indexGameMenu',2);\" href=\"#popularGames\">most popular games</a></li><li><span>highest rated games</span></li> </ul>";
			changeIndexGames(num);
			break;
	}
}
//
function changeIndexGames(num) {
	document.getElementById('indexGameScreensBox').innerHTML = '<div style="text-align:center"><img src="images/ajaxLoader.gif" align="center"/></div>';
	switch(num){
		case 1:
			new Ajax.Request("indexLatest.php", { onComplete: changeIndexGamesResponse });
			break;
		case 2:
			new Ajax.Request("indexMostPlayed.php", { onComplete: changeIndexGamesResponse });
			break;
		case 3:
			new Ajax.Request("indexRated.php", { onComplete: changeIndexGamesResponse });
			break;
	}
}
function changeIndexGamesResponse(req){
	$('indexGameScreensBox').innerHTML= req.responseText;
	J(document).ready(function(){ J('.thumb h2').screenMask('.screenMask');}); 
}
//
//
// change top 3 games in TOP 3 on INDEX
function changeTopGameMenu(divName,num){
	switch(num){
		case 1:
			document.getElementById(divName).innerHTML = "<ul><li><span>top games by genre:</span></li><li><span>action</span></li><li><a name=\"topGamesAdventure\" onClick=\"changeTopGameMenu('topGamesMenu',2);\" href=\"#topGamesAdventure\">adventure</a></li><li><a name=\"topGamesArcade\" onClick=\"changeTopGameMenu('topGamesMenu',3);\" href=\"#topGamesArcade\">arcade</a></li><li><a name=\"topGamesPuzzle\" onClick=\"changeTopGameMenu('topGamesMenu',4);\" href=\"#topGamesPuzzle\">puzzle &amp; skill</a></li><li><a name=\"topGamesStrategy\" onClick=\"changeTopGameMenu('topGamesMenu',5);\" href=\"#topGamesStrategy\">strategy</a></li><li><a name=\"topGamesShooting\" onClick=\"changeTopGameMenu('topGamesMenu',6);\" href=\"#topGamesShooting\" style=\"border-right-color:#1a1a1a;\">shooting</a></li></ul>";
			changeTopGames(num);
			break;
		case 2:
			document.getElementById(divName).innerHTML = "<ul><li><span>top games by genre:</span></li><li><a name=\"topGamesAction\" onClick=\"changeTopGameMenu('topGamesMenu',1);\" href=\"#topGamesAction\">action</a></li><li><span>adventure</span></li><li><a name=\"topGamesArcade\" onClick=\"changeTopGameMenu('topGamesMenu',3);\" href=\"#topGamesArcade\">arcade</a></li><li><a name=\"topGamesPuzzle\" onClick=\"changeTopGameMenu('topGamesMenu',4);\" href=\"#topGamesPuzzle\">puzzle &amp; skill</a></li><li><a name=\"topGamesStrategy\" onClick=\"changeTopGameMenu('topGamesMenu',5);\" href=\"#topGamesStrategy\">strategy</a></li><li><a name=\"topGamesShooting\" onClick=\"changeTopGameMenu('topGamesMenu',6);\" href=\"#topGamesShooting\" style=\"border-right-color:#1a1a1a;\">shooting</a></li></ul>";
			changeTopGames(num);
			break;
		case 3:
			document.getElementById(divName).innerHTML = "<ul><li><span>top games by genre:</span></li><li><a name=\"topGamesAction\" onClick=\"changeTopGameMenu('topGamesMenu',1);\" href=\"#topGamesAction\">action</a></li><li><a name=\"topGamesAdventure\" onClick=\"changeTopGameMenu('topGamesMenu',2);\" href=\"#topGamesAdventure\">adventure</a></li><li><span>arcade</span></li><li><a name=\"topGamesPuzzle\" onClick=\"changeTopGameMenu('topGamesMenu',4);\" href=\"#topGamesPuzzle\">puzzle &amp; skill</a></li><li><a name=\"topGamesStrategy\" onClick=\"changeTopGameMenu('topGamesMenu',5);\" href=\"#topGamesStrategy\">strategy</a></li><li><a name=\"topGamesShooting\" onClick=\"changeTopGameMenu('topGamesMenu',6);\" href=\"#topGamesShooting\" style=\"border-right-color:#1a1a1a;\">shooting</a></li></ul>";
			changeTopGames(num);
			break;
		case 4:
			document.getElementById(divName).innerHTML = "<ul><li><span>top games by genre:</span></li><li><a name=\"topGamesAction\" onClick=\"changeTopGameMenu('topGamesMenu',1);\" href=\"#topGamesAction\">action</a></li><li><a name=\"topGamesAdventure\" onClick=\"changeTopGameMenu('topGamesMenu',2);\" href=\"#topGamesAdventure\">adventure</a></li><li><a name=\"topGamesArcade\" onClick=\"changeTopGameMenu('topGamesMenu',3);\" href=\"#topGamesArcade\">arcade</a></li><li><span>puzzle &amp; skill</span></li><li><a name=\"topGamesStrategy\" onClick=\"changeTopGameMenu('topGamesMenu',5);\" href=\"#topGamesStrategy\">strategy</a></li><li><a name=\"topGamesShooting\" onClick=\"changeTopGameMenu('topGamesMenu',6);\" href=\"#topGamesShooting\" style=\"border-right-color:#1a1a1a;\">shooting</a></li></ul>";
			changeTopGames(num);
			break;
		case 5:
			document.getElementById(divName).innerHTML = "<ul><li><span>top games by genre:</span></li><li><a name=\"topGamesAction\" onClick=\"changeTopGameMenu('topGamesMenu',1);\" href=\"#topGamesAction\">action</a></li><li><a name=\"topGamesAdventure\" onClick=\"changeTopGameMenu('topGamesMenu',2);\" href=\"#topGamesAdventure\">adventure</a></li><li><a name=\"topGamesArcade\" onClick=\"changeTopGameMenu('topGamesMenu',3);\" href=\"#topGamesArcade\">arcade</a></li><li><a name=\"topGamesPuzzle\" onClick=\"changeTopGameMenu('topGamesMenu',4);\" href=\"#topGamesPuzzle\">puzzle &amp; skill</a></li><li><span>strategy</span></li><li><a name=\"topGamesShooting\" onClick=\"changeTopGameMenu('topGamesMenu',6);\" href=\"#topGamesShooting\" style=\"border-right-color:#1a1a1a;\">shooting</a></li></ul>";
			changeTopGames(num);
			break;
		case 6:
			document.getElementById(divName).innerHTML = "<ul><li><span>top games by genre:</span></li><li><a name=\"topGamesAction\" onClick=\"changeTopGameMenu('topGamesMenu',1);\" href=\"#topGamesAction\">action</a></li><li><a name=\"topGamesAdventure\" onClick=\"changeTopGameMenu('topGamesMenu',2);\" href=\"#topGamesAdventure\">adventure</a></li><li><a name=\"topGamesArcade\" onClick=\"changeTopGameMenu('topGamesMenu',3);\" href=\"#topGamesArcade\">arcade</a></li><li><a name=\"topGamesPuzzle\" onClick=\"changeTopGameMenu('topGamesMenu',4);\" href=\"#topGamesPuzzle\">puzzle &amp; skill</a></li><li><a name=\"topGamesStrategy\" onClick=\"changeTopGameMenu('topGamesMenu',5);\" href=\"#topGamesStrategy\">strategy</a></li><li><span style=\"border-right-color:#1a1a1a;\">shooting</span></li></ul>";
			changeTopGames(num);
			break;
	}
}
//
function changeTopGames(num) {
	document.getElementById('topGames').innerHTML = '<div style="text-align:center"><img src="images/ajaxLoader.gif" align="center"/></div>';
	switch(num){
		case 1:
			new Ajax.Request("indexTopAction.php", { onComplete: changeTopGamesResponse });
			break;
		case 2:
			new Ajax.Request("indexTopAdventure.php", { onComplete: changeTopGamesResponse });
			break;
		case 3:
			new Ajax.Request("indexTopArcade.php", { onComplete: changeTopGamesResponse });
			break;
		case 4:
			new Ajax.Request("indexTopPuzzle.php", { onComplete: changeTopGamesResponse });
			break;
		case 5:
			new Ajax.Request("indexTopStrategy.php", { onComplete: changeTopGamesResponse });
			break;
		case 6:
			new Ajax.Request("indexTopShooting.php", { onComplete: changeTopGamesResponse });
			break;
	}
}
function changeTopGamesResponse(req){
	$('topGames').innerHTML= req.responseText;
	J(document).ready(function(){ J('.thumbSm h2').screenMaskSm('.screenMaskSm');}); 
}
//
//
function showProfile(num){
	document.getElementById('profile').style.visibility = 'visible';
	document.getElementById('profileBounds').style.visibility = 'visible';
}

function hideProfile(){
	document.getElementById('profile').style.visibility = 'hidden';
	document.getElementById('profileBounds').style.visibility = 'hidden';	
}

function hideProfileTimeout(){
	var profileTimer = null;
	if(!profileTimer) profileTimer = setTimeout("hideProfile()",200);	
}
//
//
// ---------- ADD FAVORITE -----------
//
<!-- 
//Browser Support Code
function addFavorite(gameid){
	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('favorite');
			ajaxDisplay.innerHTML = ajaxRequest.responseText;
		}
	}
	var queryString = "?gameid=" + gameid;
	document.getElementById('favorite').innerHTML = '<div style="text-align:center"><img src="http://www.likwidgames.com/images/ajaxLoader.gif" align="center"/></div>';
	ajaxRequest.open("GET", "../../ajaxAddFavorite.php" + queryString, true);
	ajaxRequest.send(null); 
}
//
//
// ---------- ADD FRIEND -----------
//
<!-- 
//Browser Support Code
function addFriend(friendDiv, friendID, friendName){
	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(friendDiv);
			ajaxDisplay.innerHTML = ajaxRequest.responseText;
		}
	}
	var queryString = "?friendID=" + friendID + "&friendName=" + friendName;
	document.getElementById(friendDiv).innerHTML = '<div style="text-align:center"><img src="http://www.likwidgames.com/images/ajaxLoader.gif" align="center"/></div>';
	ajaxRequest.open("GET", "../../ajaxAddFriend.php" + queryString, true);
	ajaxRequest.send(null); 
}
<!-- 
//
//
//
//Browser Support Code
function ajaxFunction(gameid){
	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('gameComments');
			ajaxDisplay.innerHTML = ajaxRequest.responseText;
		}
	}
	var userComment = encodeURI( document.getElementById('userComment').value);
	var queryString = "?gameid=" + gameid + "&userComment=" + userComment;
	document.getElementById('gameComments').innerHTML = '<div style="text-align:center"><img src="http://www.likwidgames.com/images/ajaxLoader.gif" align="center"/></div>';
	ajaxRequest.open("GET", "../../ajaxAddComment.php" + queryString, true);
	ajaxRequest.send(null); 
}
//
//
// ---------- REMOVE A COMMENT -----------
//
<!-- 
//Browser Support Code
function remComment(divID,commentID){
	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(divID);
			ajaxDisplay.innerHTML = ajaxRequest.responseText;
		}
	}
	var queryString = "?commentID=" + commentID;
	document.getElementById(divID).innerHTML = '<div style="text-align:center"><img src="http://www.likwidgames.com/images/ajaxLoader.gif" align="center"/></div>';
	ajaxRequest.open("GET", "../../ajaxRemComment.php" + queryString, true);
	ajaxRequest.send(null); 
}
//
//
//
//
// JavaScript Document
   var http_request = false;
   function makeRequest(url, parameters) {
      http_request = false;
      if (window.XMLHttpRequest) { // Mozilla, Safari,...
         http_request = new XMLHttpRequest();
         if (http_request.overrideMimeType) {
         	// set type accordingly to anticipated content type
            //http_request.overrideMimeType('text/xml');
            http_request.overrideMimeType('text/html');
         }
      } else if (window.ActiveXObject) { // IE
         try {
            http_request = new ActiveXObject("Msxml2.XMLHTTP");
         } catch (e) {
            try {
               http_request = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e) {}
         }
      }
      if (!http_request) {
         alert('Cannot create XMLHTTP instance');
         return false;
      }
      http_request.onreadystatechange = alertContents;
      http_request.open('GET', url + parameters, true);
      http_request.send(null);
   }

   function alertContents() {
      if (http_request.readyState == 4) {
         if (http_request.status == 200) {
            //alert(http_request.responseText);
            result = http_request.responseText;
            document.getElementById('gameComments').innerHTML = result;            
         } else {
            alert('There was a problem with the request.');
         }
      }
   }
   
   function get(obj) {
      var getstr = "?";
      for (i=0; i<obj.childNodes.length; i++) {
         if (obj.childNodes[i].tagName == "INPUT") {
            if (obj.childNodes[i].type == "text") {
               getstr += obj.childNodes[i].name + "=" + obj.childNodes[i].value + "&";
            }
            if (obj.childNodes[i].type == "checkbox") {
               if (obj.childNodes[i].checked) {
                  getstr += obj.childNodes[i].name + "=" + obj.childNodes[i].value + "&";
               } else {
                  getstr += obj.childNodes[i].name + "=&";
               }
            }
            if (obj.childNodes[i].type == "radio") {
               if (obj.childNodes[i].checked) {
                  getstr += obj.childNodes[i].name + "=" + obj.childNodes[i].value + "&";
               }
            }
         }   
         if (obj.childNodes[i].tagName == "SELECT") {
            var sel = obj.childNodes[i];
            getstr += sel.name + "=" + sel.options[sel.selectedIndex].value + "&";
         }
         
      }
      makeRequest('ajaxComment.php', getstr);
   }
//
//
//
//
// JavaScript Document
	function getURLParam(strParamName, params){
  var strReturn = "";
  var strHref = params;
  if ( strHref.indexOf("?") > -1 ){
    var strQueryString = strHref.substr(strHref.indexOf("?")).toLowerCase();
    var aQueryString = strQueryString.split("&");
    for ( var iParam = 0; iParam < aQueryString.length; iParam++ ){
      if ( 
aQueryString[iParam].indexOf(strParamName.toLowerCase() + "=") > -1 ){
        var aParam = aQueryString[iParam].split("=");
        strReturn = aParam[1];
        break;
      }
    }
  }
  return unescape(strReturn);
}

	var http_request = false;
   function makeRequest2(divID,url, parameters) {
      http_request = false;
      if (window.XMLHttpRequest) { // Mozilla, Safari,...
         http_request = new XMLHttpRequest();
         if (http_request.overrideMimeType) {
         	// set type accordingly to anticipated content type
            //http_request.overrideMimeType('text/xml');
            http_request.overrideMimeType('text/html');
         }
      } else if (window.ActiveXObject) { // IE
         try {
            http_request = new ActiveXObject("Msxml2.XMLHTTP");
         } catch (e) {
            try {
               http_request = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e) {}
         }
      }
      if (!http_request) {
         alert('Cannot create XMLHTTP instance');
         return false;
      }
	  var commentNum = getURLParam("commentNum", parameters);
      http_request.onreadystatechange = alertContents2;
	  document.getElementById(divID).innerHTML = '<div style="text-align:center"><img src="http://www.likwidgames.com/images/ajaxLoader.gif" align="center"/></div>';
      http_request.open('GET', url + parameters, true);
      http_request.send(null);
   }

   function alertContents2() {
		//http_request.blah = "comment"+comment3;
		//alert(comNum);
      if (http_request.readyState == 4) {
         if (http_request.status == 200) {
            //alert(http_request.responseText);
            result1 = http_request.responseText;
			result2 = result1.split("|"); 
            document.getElementById(result2[0]).innerHTML = result2[1];            
         } else {
            alert('There was a problem with the request.');
         }
      }
   }
   
   function get(obj) {
      var getstr = "?";
      for (i=0; i<obj.childNodes.length; i++) {
         if (obj.childNodes[i].tagName == "INPUT") {
            if (obj.childNodes[i].type == "text") {
               getstr += obj.childNodes[i].name + "=" + obj.childNodes[i].value + "&";
            }
            if (obj.childNodes[i].type == "checkbox") {
               if (obj.childNodes[i].checked) {
                  getstr += obj.childNodes[i].name + "=" + obj.childNodes[i].value + "&";
               } else {
                  getstr += obj.childNodes[i].name + "=&";
               }
            }
            if (obj.childNodes[i].type == "radio") {
               if (obj.childNodes[i].checked) {
                  getstr += obj.childNodes[i].name + "=" + obj.childNodes[i].value + "&";
               }
            }
         }   
         if (obj.childNodes[i].tagName == "SELECT") {
            var sel = obj.childNodes[i];
            getstr += sel.name + "=" + sel.options[sel.selectedIndex].value + "&";
         }
         
      }
      makeRequest2('ajaxComment.php', getstr);
   }
   
   
<!-- 
//
//
// COMMENT ON USER PROFILE
//
//
function profileAddComment(profileID){
	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('userCommentsBox');
			ajaxDisplay.innerHTML = ajaxRequest.responseText;
		}
	}
	var userComment = encodeURI( document.getElementById('userComment').value);
	var queryString = "?profileID=" + profileID + "&userComment=" + userComment + "&id=" + profileID;
	document.getElementById('userCommentsBox').innerHTML = '<div style="text-align:center"><img src="http://www.likwidgames.com/images/ajaxLoader.gif" align="center"/></div>';
	ajaxRequest.open("GET", "includes/ajaxUserAddComment.php" + queryString, true);
	ajaxRequest.send(null); 
}
//
//
// USER PROFILE PAGINATION
//
//
function profileCommentPage(url, parameters) {
    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('userCommentsBox');
				ajaxDisplay.innerHTML = ajaxRequest.responseText;
			}
		}
		document.getElementById('userCommentsBox').innerHTML = '<div style="text-align:center"><img src="http://www.likwidgames.com/images/ajaxLoader.gif" align="center"/></div>';
		ajaxRequest.open("GET", "includes/ajaxUserComments.php" + parameters, true);
		ajaxRequest.send(null); 
   }
//
//
// ---------- REMOVE A COMMENT -----------
//
<!-- 
//Browser Support Code
function remUserComment(parameters){
	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('userCommentsBox');
			ajaxDisplay.innerHTML = ajaxRequest.responseText;
		}
	}
	document.getElementById('userCommentsBox').innerHTML = '<div style="text-align:center"><img src="http://www.likwidgames.com/images/ajaxLoader.gif" align="center"/></div>';
	ajaxRequest.open("GET", "includes/ajaxUserRemComment.php" + parameters, true);
	ajaxRequest.send(null); 
}
//
//
// USER PROFILE SEE ALL FAVORITES
//
//
function profileSeeAllFav(profileID) {
    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('userFavoritesBox');
				ajaxDisplay.innerHTML = ajaxRequest.responseText;
			}
		}
		var queryString = "?id=" + profileID;
		document.getElementById('userFavoritesBox').innerHTML = '<div style="text-align:center"><img src="http://www.likwidgames.com/images/ajaxLoader.gif" align="center"/></div>';
		ajaxRequest.open("GET", "includes/ajaxUserSeeAllFav.php" + queryString, true);
		ajaxRequest.send(null); 
   }
//
//
// USER PROFILE SEE ALL FRIENDS
//
//
function profileSeeAllFriends(profileID) {
    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('userFriendsBox');
				ajaxDisplay.innerHTML = ajaxRequest.responseText;
			}
		}
		var queryString = "?id=" + profileID;
		document.getElementById('userFriendsBox').innerHTML = '<div style="text-align:center"><img src="http://www.likwidgames.com/images/ajaxLoader.gif" align="center"/></div>';
		ajaxRequest.open("GET", "includes/ajaxUserSeeAllFriends.php" + queryString, true);
		ajaxRequest.send(null); 
   }
  //
//
// USER PROFILE SEE ALL FRIENDS
//
//
function profileSeeAllFriends(profileID) {
    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('userFriendsBox');
				ajaxDisplay.innerHTML = ajaxRequest.responseText;
			}
		}
		var queryString = "?id=" + profileID;
		document.getElementById('userFriendsBox').innerHTML = '<div style="text-align:center"><img src="http://www.likwidgames.com/images/ajaxLoader.gif" align="center"/></div>';
		ajaxRequest.open("GET", "includes/ajaxUserSeeAllFriends.php" + queryString, true);
		ajaxRequest.send(null); 
   }

//
// USER PROFILE DELETE FRIEND
//
//
function profileDeleteFriend(friendID) {
    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('userFriends');
				ajaxDisplay.innerHTML = ajaxRequest.responseText;
			}
		}
		var queryString = "?id=" + friendID;
		document.getElementById('userFriends').innerHTML = '<div style="text-align:center"><img src="http://www.likwidgames.com/images/ajaxLoader.gif" align="center"/></div>';
		ajaxRequest.open("GET", "includes/ajaxUserDeleteFriend.php" + queryString, true);
		ajaxRequest.send(null); 
   }
   
//
//
// USER PROFILE EDIT ABOUT
//
//
function profileEditAbout() {
    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('userAboutBox');
			ajaxDisplay.innerHTML = ajaxRequest.responseText;
		}
	}
	document.getElementById('userAboutBox').innerHTML = '<div style="text-align:center"><img src="http://www.likwidgames.com/images/ajaxLoader.gif" align="center"/></div>';
	ajaxRequest.open("GET", "includes/ajaxUserEditProfile.php", true);
	ajaxRequest.send(null); 
}
function profileUpdateAbout() {
    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('userAboutBox');
			ajaxDisplay.innerHTML = ajaxRequest.responseText;
		}
	}
	var updatedAbout = encodeURI( document.getElementById('aboutTxt').value);
	var queryString = "?updatedAbout=" + updatedAbout;
	document.getElementById('aboutTxt').innerHTML = '<div style="text-align:center"><img src="http://www.likwidgames.com/images/ajaxLoader.gif" align="center"/></div>';
	ajaxRequest.open("GET", "includes/ajaxUserEditProfile.php" + queryString, true);
	ajaxRequest.send(null); 
}
//
//
// USER PROFILE EDIT BIRTHDAY
//
//
function profileEditBirthday() {
    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('birthday');
			ajaxDisplay.innerHTML = ajaxRequest.responseText;
		}
	}
	document.getElementById('birthday').innerHTML = '<div style="text-align:center"><img src="http://www.likwidgames.com/images/ajaxLoader.gif" align="center"/></div>';
	ajaxRequest.open("GET", "includes/ajaxUserEditBirthday.php", true);
	ajaxRequest.send(null); 
}
function profileUpdateBirthday() {
    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('birthday');
			ajaxDisplay.innerHTML = ajaxRequest.responseText;
		}
	}
	var birthMonth = encodeURI( document.getElementById('birthMonth').value);
	var birthDay = encodeURI( document.getElementById('birthDay').value);	
	var birthYear = encodeURI( document.getElementById('birthYear').value);
	var queryString = "?birthMonth=" + birthMonth + "&birthDay=" + birthDay + "&birthYear=" + birthYear;
	document.getElementById('birthday').innerHTML = '<div style="text-align:center"><img src="http://www.likwidgames.com/images/ajaxLoader.gif" align="center"/></div>';
	ajaxRequest.open("GET", "includes/ajaxUserEditBirthday.php" + queryString, true);
	ajaxRequest.send(null); 
}
//
//
// USER PROFILE ADD FRIEND
//
//
function userAddFriend(friendID) {
    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('addFriendButton');
				ajaxDisplay.innerHTML = ajaxRequest.responseText;
			}
		}
		var queryString = "?id=" + friendID;
		document.getElementById('addFriendButton').innerHTML = '<div style="text-align:center"><img src="http://www.likwidgames.com/images/ajaxLoader.gif" align="center"/></div>';
		ajaxRequest.open("GET", "scripts/sendFriendReq.php" + queryString, true);
		ajaxRequest.send(null); 
   }

//
//
// *** NOTIFICATIONS
// DELETE NOTIFICATION
//
//
function deleteNotification(notID) {
    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('notificationsBox');
				ajaxDisplay.innerHTML = ajaxRequest.responseText;
			}
		}
		var queryString = "?id=" + notID;
		document.getElementById('notificationsBox').innerHTML = '<div style="text-align:center"><img src="http://www.likwidgames.com/images/ajaxLoader.gif" align="center"/></div>';
		ajaxRequest.open("GET", "scripts/notifDelete.php" + queryString, true);
		ajaxRequest.send(null); 
   }
 //
//
// *** NOTIFICATIONS
// FRIEND REQUEST NOTIFICATION
//
//
function notifFriendReq(notID, actionID, posterID) {
    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('notificationsBox');
				ajaxDisplay.innerHTML = ajaxRequest.responseText;
			}
		}
		var queryString = "?id=" + notID + "&actionID=" + actionID  + "&posterID=" + posterID;
		document.getElementById('notificationsBox').innerHTML = '<div style="text-align:center"><img src="http://www.likwidgames.com/images/ajaxLoader.gif" align="center"/></div>';
		ajaxRequest.open("GET", "scripts/notifFriendReq.php" + queryString, true);
		ajaxRequest.send(null); 
   }