//creates wrapper around Safari methods to simulare Nokia WRT objects used

var widget = {

	prepareForTransition: function (transition) {
		//do nothing
	},
	
	//----------------------------------------------------------------------------------------------------------------------

	setNavigationEnabled: function (bool) {
		//do nothing
	},
	
	//----------------------------------------------------------------------------------------------------------------------

	performTransition: function () {
		//do nothing
	},
	
	//----------------------------------------------------------------------------------------------------------------------

	preferenceForKey: function (key) {
		return EasyCookie.get(key);
	},
	
	//----------------------------------------------------------------------------------------------------------------------

	setPreferenceForKey: function (value, key) {
		EasyCookie.set(key, value, {
			expires: 30,
			path: '/',
			secure: false
		}); 
	}
}

//----------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------

var menu = {

	hideSoftkeys: function () {
		//do nothing
	},
	
	//----------------------------------------------------------------------------------------------------------------------

	append: function (menuItemObj) {
		alert( StringTable.Code.iPhoneNotSupportedError );
	},
	
	//----------------------------------------------------------------------------------------------------------------------

	showSoftkeys: function () {
		alert( StringTable.Code.iPhoneNotSupportedError );
	}
}

//----------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------

function MenuItem(name, code)
{
	alert( StringTable.Code.iPhoneNotSupportedError );
}

//----------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------

function onOrientationChange()
{
	var element = document.getElementById( "body_id" );

	if( window.orientation == -90 || window.orientation == 90 )
		element.style.width = "480px";
	else
		element.style.width = "320px";

	onResize();
}