
var myGeoLocationRequest;

function installYoWidget(lang) {

	var target = document.getElementById("hpPal");

	target.innerHTML = '\
	<table style="background:#DDF; height:150px;">\
		<tr style="height:100%">\
			<td style="vertical-align:middle; height:100%">\
				<div style="font-family:Arial; font-size:16px; color:#007DB0; text-align:center; width:300px;">\
			    	<a href="http://get.adobe.com/flashplayer/"\
				        style="width:300px; height:30px; display:block; text-indent:-50000px; font-size: 0px;-moz-background-clip:border;-moz-background-inline-policy:continuous;-moz-background-origin:padding;background:#DDF url(http://yowindow.com/img/logo.png) no-repeat scroll 50% 50%;"\
			        >Free weather widget</a>\
					You need to <a href="http://get.adobe.com/flashplayer/">upgrade your Flash Player</a><br/>\
			</td>\
		</tr>\
	</table>';



	var us = YoUtil.getAutoUnitSystem();

	var timeFormat = YoUtil.getAutoTimeFormat();

    var flashvars = {
		location_auto_ip: 1,
		background: "#FFFFFF",
		lang: lang,
		us: us,
		time_format: timeFormat,
		copyright_bar: false
    };

    var params = {
    	quality: "high",
    	bgcolor: "#FFFFFF",
		allowscriptaccess: "always",
		allowfullscreen: "true",
		wmode: "opaque"
    };

    var attributes = {
    	id:"hpPal",
    	name:"hpPal"
    };

    var url = 
//"http://swf.yowindow.com/wimo/hpPal/hpPal.swf?no_cache=2"
		"http://swf.yowindow.com/yowidget3_infinite.swf";
	;

    swfobject.embedSWF(
    	url, 
    	"hpPal", 
    	"300", 
    	"150",
    	"10",
    	"expressInstall.swf",
    	flashvars,
    	params,
    	attributes
    );

}

function playMovie() {
    var flashvars = {
    };

    var params = {
    	quality: "high",
    	bgcolor: "#DDDDFF",
		allowscriptaccess: "always",
		allowfullscreen: "true"
    };

    var attributes = {
    };

    var url = "http://www.youtube.com/v/QItLw-0LFOE&amp;rel=0&amp;fs=1&amp;autoplay=1";

    swfobject.embedSWF(
    	url, 
    	"movie", 
    	"480", 
    	"295",
    	"8.0.0",
    	"expressInstall.swf",
    	flashvars,
    	params,
    	attributes
    );
}

function yowidget_onReady() {
	var addthis = this['addthis'];
	if (addthis) {
    	addthis.init();
	}
}


