preloadImages ("users/emailFocus.gif","users/facebookFocus.gif","users/twitterFocus.gif","users/googleplusFocus.gif","users/rssFocus.gif","englishFocus.gif","spanishFocus.gif","flechaabajoON.gif","flechaderON.gif");

//google analytics: 




 /* var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-26194054-1']);
  _gaq.push(['_setDomainName', 'game-joint.com']);
  _gaq.push(['_setAllowLinker', true]);
  _gaq.push(['_trackPageview']);


    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);*/








/*
Preload images passed as arguments (one for each) not complete url necessary, just the file
*/
function preloadImages(){

var imagesRequested=preloadImages.arguments;


  var path = 'http://www.gamejoint.com.ar/';



  var preload_image = new Array ();
 
  for(var i=0; i<imagesRequested.length; i++)
  {
    preload_image[i]= new Image();
    preload_image[i].src = path + imagesRequested[i];
  }

}

function rollover(name, filename)
{
 
  document.images[name].src = filename;
}

    function isNumber (InString)  {
        if(InString.length==0) return (false);
        var RefString="1234567890";
        for (Count=0; Count < InString.length; Count++)  {
            TempChar= InString.substring (Count, Count+1);
            if (RefString.indexOf (TempChar, 0)==-1)  
                return (false);
        }
        return (true);
    }





var numbersOnly       = /^\s*\d+\s*$/;
//checks if an input has numeric value. other case, resets it and shows error
function testNumeric(field, showAlert) {

   
   if (isNaN(field.value))
   	{
		// Case of error
      field.value = "0";
	  if (showAlert)
	  	
		  alert("Not a positive number!");
	  return false;
	}
else
	{
		//alert(" positive number!");
		return true;
	}

}

		//checks for special characters, allows ,;:.!?() and space.
		function hasSpecialCharactersExceptParagraph (newString) {
			var iChars = "@#^*[]\\\'{}|\"<>~"; 
			for (var i = 0; i < newString.length; i++) {
  				if (iChars.indexOf(newString.charAt(i)) != -1) {
		  	  	//alert ("Your string has special characters. \nThese are not allowed.");
		  			return true;
	  			}
			}
			return false;

		}	


	function hasSpecialCharacters (newString) {
		var iChars = " !@#$%^&*()+=-[]\\\';,./{}|\":<>?~"; 
		for (var i = 0; i < newString.length; i++) {
  			if (iChars.indexOf(newString.charAt(i)) != -1) {
	  	  		return true;
	  		}
		}
		return false;

	}
	
	function hasSpecialCharactersExceptSpace (newString) {
			var iChars = "!@#$%^&*()+=-[]\\\';,./{}|\":<>?~"; 
			for (var i = 0; i < newString.length; i++) {
  				if (iChars.indexOf(newString.charAt(i)) != -1) {
		  	  	//alert ("Your string has special characters. \nThese are not allowed.");
		  			return true;
	  			}
			}
			return false;

		}
		
	/*used for button*/
 
function ReplaceImage(sImgName,sImgFile){ 
  document.images[sImgName].src = sImgFile;
} 


	function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
href=mylink;
else
href=mylink.href;
window.open(href, windowname, 'width=380,height=380,scrollbars=no,toolbar=0, menubar=0,location=0, resizable=0');
return false;
}


//simply checks if current browser is the buggy MF chrome
function isChrome()
{
	if (navigator.userAgent.indexOf('Chrome') != -1 || navigator.userAgent.indexOf('Chrome') != -1)
		return true;
	else
		return false;
}


