// JavaScript Document
// igoogle specific 
domain = "http://igoogle.come2play.com/" 
cachedProfileData 	= false;
UnescapeFromCache	= true;
isShowPlayNow = false;
isForceRequestCanvasData = true;
alert_support = true;
canvasTimeoutPage = '/shared/api/googleconnect/opensocial_gadget.asp?mode=canvas&';
profileTimeoutPage = '/shared/api/googleconnect/opensocial_gadget.asp?mode=profile&';
supportShareApp = true;

function set_site_specific(mode) {
	if (stackDebug) alert('set_site_specific('+ mode+')')
	var CanvasModeLangs = ["en"];
	CanvasModeOK = false;

	// apply "View-Canvas-Link" for available languages:
	for (var i in CanvasModeLangs){
		if (gadgetLang == CanvasModeLangs[i]) CanvasModeOK = true;
	}	
		
	// dont apply "View-Canvas-Link" under Syndication:
	var query_string = getParametersFromURL();
	if(query_string["synd"]!="ig"){
		CanvasModeOK = false;
		isShowViewCanvasLink = false;
		canvasTimeoutPage = "/shared/appGame/main2/game.asp?";
		profileTimeoutPage = "/shared/gadget/gadget_home.asp?";
	}
	
	if (mode=="profile" || mode=="home"){
		mode = "profile";
		defaultAppPath = profileTimeoutPage;
		if(query_string["synd"]!="ig"){
		    container_height	= 400;
			frame_height 		= "400";
		}
		else{
		    container_height	= 450;
			frame_height 		= "450";
			isShowViewCanvasLink = true;		
		}
	}
	
	if (mode=="canvas"){
		defaultAppPath = canvasTimeoutPage;
		if(query_string["synd"]!="ig"){
		    container_height	= 1020;
			frame_height 		= "1020";	
		}
		else{
		    container_height	= 1700;
			frame_height 		= "1700";	
		}
		document.getElementById("appFrame").scrolling="no";
		document.getElementById("appFrame").style.overflow="hidden";
	}
	
	if (mode=="no-social"){ 
		if (CanvasModeOK) {frame_height = "432";} else {frame_height = "452" ;}
		container_height = "432";
		document.getElementById("appFrame").scrolling="no";
	}
}
