// JavaScript Document

function Lvl_openWin(u,n,w,h,l,t,c,f,x) 
{ //v1.0 4LevelWebs
	var ww=((screen.width-w)/2);
	if(c==1)
	{
		l=ww;
		t=(screen.height-h)/2;
	}
	if(c==2)
	{
		l=ww
	}
	//f+=',top='+t+',left='+l;
	f+=',scrollbars=yes';
	LvlWin = window.open(u,n,f);
	//if(x==1)
	//{
		LvlWin.focus()
	//}
	document.MM_returnValue=false;
}


function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
	var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
	if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}


function checkFormFocus(e, f) {
	if(window.event) // IE
		keynum = e.keyCode
	else if(e.which) // Netscape/Firefox/Opera
		keynum = e.which
	
	if(keynum == 13) {
		document.forms[f].submit();
		return true;
	}
	return true;
}

function initTweetButton() { 
	jQuery.getScript("http://platform.twitter.com/widgets.js", function() { jQuery(".twitter-share-button").show(); });
}

function initGooglePlusOne() {
	gapi.plusone.go(document);	
}

jQuery(window).bind("load", function() { 
	initGooglePlusOne();
	initTweetButton();
});
