var Main = {
    startCategoryID : 0,
}

var widgetAPI = new Common.API.Widget();
var objMsgFromManager = {}
var arrSupportLanguageList = ['pl'];
var t=setTimeout("Main.checkConnection()",5000);


Main.onLoad = function() {
      //this.analyzeVars();
      initNews();
}

Main.checkConnection = function(){
    nwplugin = document.getElementById('pluginObjectNetwork');
    if( nwplugin.CheckPhysicalConnection(1 ) == 1 ){
        alert('network ok');
        document.getElementById('connection_info').style.display='none';
   } else {
        alert('network disconnected');
        document.getElementById('connection_info').style.display='block';
   } 
   t=setTimeout("Main.checkConnection()",5000);
}

/*
Main.analyzeVars = function() 
{        
	var vars = window.location.search;	
	if (vars.charAt(0) == "?") {
		vars = vars.slice(1, vars.length);
	}	
    vars = vars.split("&");
    for (var i=0; i < vars.length; i++) {
        var data = vars[i].split("=");
		if (data.length == 2) {			
	        switch (data[0]) {
	            case "modelid":
					//this.modelID = data[1];
	                break;
	            case "server":
	                break;
	            case "id":
	                //this.picasaID = data[1];
	                break;
				case "pw":
					//this.picasaPW = data[1];
					break;
	            default :
	                break;
	        }
		}
		else {
			
		}
    }   
}
*/



function initNews()
{
	NewsController.create();
    widgetAPI.sendReadyEvent();
    //NewsController.start(Main.startCategoryID);
}

Main.onUnload = function() {

}
