
newPopUp({
	name:"uploads",
	url:"http://despicableme.gloto.com/upload.html",
	width:370, height:420, scroll:"no", resizable:"no"});

newPopUp({
	name:"minvasions",
	url:"pops/minvasion/index.html",
	width:420, height:320, scroll:"no", resizable:"no"});

newPopUp({
	name:"instructions",
	url:"pops/instructions/index.html",
	width:484, height:334, scroll:"no", resizable:"no"});
	
function handleLink(tID, tURL) {
	if (ge) {
		//pop balloons in google earth
		switch (tID) {
			case "minvasions" : 
				var balloon = ge.createHtmlDivBalloon('');
				balloon.setMaxWidth(800);
				var div = document.createElement('DIV');
				div.innerHTML = '<iframe src="pops/minvasion/index.html" width="420" height="320" frameborder=0 scrolling=no style="overflow:hidden"></iframe>';
				balloon.setContentDiv(div);
				ge.setBalloon(balloon);
				break;
			case "tweets" : 
				window.open(tURL, tID);
				break;
			case "uploads" : 
				var balloon = ge.createHtmlDivBalloon('');
				balloon.setMaxWidth(800);
				var div = document.createElement('DIV');
				div.innerHTML = '<iframe src="http://despicableme.gloto.com/upload320.html" width="374" height="420" frameborder=0 scrolling=no></iframe>';
				balloon.setContentDiv(div);
				balloon.setMinHeight(500);
				ge.setBalloon(balloon);
				break;
			case "instructions" : 
				var balloon = ge.createHtmlDivBalloon('');
				balloon.setMaxWidth(800);
				var div = document.createElement('DIV');
				div.innerHTML = '<iframe src="pops/instructions/index.html" width="484" height="334" frameborder=0 scrolling=no style="overflow:hidden"></iframe>';
				balloon.setContentDiv(div);
				ge.setBalloon(balloon);
				break;

		}
	} else {
		//popwin
		switch (tID) {
			case "minvasions" : 
				launchPopUp("minvasions");
				break;
			case "tweets" : 
				window.open(tURL, tID);
				break;
			case "uploads" : 
				launchPopUp("uploads");
				break;
			case "instructions" :
				launchPopUp("instructions");
				break;
		}
	}
}

function querySt(ji, fallback) {
	hu = window.location.search.substring(1);
	gy = hu.split("&");
	for (i=0;i<gy.length;i++) {
		ft = gy[i].split("=");
		if (ft[0] == ji) {
			return ft[1];
		}
	}
	return fallback;
}
