Adding Wikipedia Widget 1.0rc5
authorivanl
Tue, 09 Mar 2010 10:34:58 +0000
changeset 20 918767a9c8d3
parent 19 f3521a11d878
child 21 f7a5a40d5bc4
Adding Wikipedia Widget 1.0rc5
Wikipedia/.project
Wikipedia/Bookmarks.js
Wikipedia/FeedPresentation.js
Wikipedia/FeedUpdateBroker.js
Wikipedia/History.js
Wikipedia/Icon.png
Wikipedia/Info.plist
Wikipedia/RssReader.js
Wikipedia/WRTKit/Resources/CheckBox.png
Wikipedia/WRTKit/Resources/ContentPanelFoldIcons.png
Wikipedia/WRTKit/Resources/ControlAssemblyBackground.png
Wikipedia/WRTKit/Resources/DocumentBackground.png
Wikipedia/WRTKit/Resources/FormButtonCenter.png
Wikipedia/WRTKit/Resources/FormButtonCenterLarge.png
Wikipedia/WRTKit/Resources/FormButtonLeft.png
Wikipedia/WRTKit/Resources/FormButtonLeftLarge.png
Wikipedia/WRTKit/Resources/FormButtonRight.png
Wikipedia/WRTKit/Resources/FormButtonRightLarge.png
Wikipedia/WRTKit/Resources/ListViewCaptionBackground.png
Wikipedia/WRTKit/Resources/NotificationPopupBackground.png
Wikipedia/WRTKit/Resources/NotificationPopupTypeIndicator.png
Wikipedia/WRTKit/Resources/ProgressBar0.png
Wikipedia/WRTKit/Resources/ProgressBar10.png
Wikipedia/WRTKit/Resources/ProgressBar100.png
Wikipedia/WRTKit/Resources/ProgressBar20.png
Wikipedia/WRTKit/Resources/ProgressBar30.png
Wikipedia/WRTKit/Resources/ProgressBar40.png
Wikipedia/WRTKit/Resources/ProgressBar50.png
Wikipedia/WRTKit/Resources/ProgressBar60.png
Wikipedia/WRTKit/Resources/ProgressBar70.png
Wikipedia/WRTKit/Resources/ProgressBar80.png
Wikipedia/WRTKit/Resources/ProgressBar90.png
Wikipedia/WRTKit/Resources/ProgressBarUnknown.gif
Wikipedia/WRTKit/Resources/RadioButton.png
Wikipedia/WRTKit/Resources/ScrollbarThumbBottom.png
Wikipedia/WRTKit/Resources/ScrollbarThumbMiddle.png
Wikipedia/WRTKit/Resources/ScrollbarThumbTop.png
Wikipedia/WRTKit/Resources/ScrollbarTrackBottom.png
Wikipedia/WRTKit/Resources/ScrollbarTrackMiddle.png
Wikipedia/WRTKit/Resources/ScrollbarTrackTop.png
Wikipedia/WRTKit/Resources/SeparatorCenter.png
Wikipedia/WRTKit/Resources/SeparatorLeft.png
Wikipedia/WRTKit/Resources/SeparatorRight.png
Wikipedia/WRTKit/Resources/UI-large.css
Wikipedia/WRTKit/Resources/UI.css
Wikipedia/WRTKit/Resources/title-small.png
Wikipedia/WRTKit/Resources/title.png
Wikipedia/WRTKit/UI/ActionControl.js
Wikipedia/WRTKit/UI/Ajax.js
Wikipedia/WRTKit/UI/ContentPanel.js
Wikipedia/WRTKit/UI/Control.js
Wikipedia/WRTKit/UI/FormButton.js
Wikipedia/WRTKit/UI/ImageLabel.js
Wikipedia/WRTKit/UI/Label.js
Wikipedia/WRTKit/UI/ListView.js
Wikipedia/WRTKit/UI/NavigationButton.js
Wikipedia/WRTKit/UI/NotificationPopup.js
Wikipedia/WRTKit/UI/Scrollbar.js
Wikipedia/WRTKit/UI/SelectionControl.js
Wikipedia/WRTKit/UI/SelectionList.js
Wikipedia/WRTKit/UI/SelectionMenu.js
Wikipedia/WRTKit/UI/Separator.js
Wikipedia/WRTKit/UI/TextArea.js
Wikipedia/WRTKit/UI/TextEntryControl.js
Wikipedia/WRTKit/UI/TextField.js
Wikipedia/WRTKit/UI/TextPane.js
Wikipedia/WRTKit/UI/UIElement.js
Wikipedia/WRTKit/UI/UIInit.js
Wikipedia/WRTKit/UI/UIManager.js
Wikipedia/WRTKit/UI/View.js
Wikipedia/WRTKit/Utils/Logger.js
Wikipedia/WRTKit/WRTKit.js
Wikipedia/Wiki.js
Wikipedia/Wikipedia-logo.png
Wikipedia/blueright.png
Wikipedia/delete.png
Wikipedia/help.txt
Wikipedia/index.html
Wikipedia/lang.txt
Wikipedia/main.js
Wikipedia/miniview.png
Wikipedia/next.png
Wikipedia/prev.png
Wikipedia/preview/css/style.css
Wikipedia/preview/data/appManager_data.js
Wikipedia/preview/data/calendar_data.js
Wikipedia/preview/data/contact_data.js
Wikipedia/preview/data/landmarks_data.js
Wikipedia/preview/data/location_data.js
Wikipedia/preview/data/logging_data.js
Wikipedia/preview/data/mediaManagement_data.js
Wikipedia/preview/data/messaging_data.js
Wikipedia/preview/data/sensor_data.js
Wikipedia/preview/data/sysInfo_data.js
Wikipedia/preview/images/BrowserNotificationBar-Toogle.gif
Wikipedia/preview/images/Gradient0Background.png
Wikipedia/preview/images/IconArea-hover.png
Wikipedia/preview/images/TransperantImage.png
Wikipedia/preview/images/active-orientation-icon.png
Wikipedia/preview/images/battery-icon.png
Wikipedia/preview/images/console-clear-button.png
Wikipedia/preview/images/console-close-icon.png
Wikipedia/preview/images/console-icon.gif
Wikipedia/preview/images/console-open-icon.png
Wikipedia/preview/images/default-Icon.png
Wikipedia/preview/images/device/240x320/Landscape.png
Wikipedia/preview/images/device/240x320/Portrait.png
Wikipedia/preview/images/device/320x240/Landscape.png
Wikipedia/preview/images/device/320x240/Portrait.png
Wikipedia/preview/images/device/360x640/Landscape.png
Wikipedia/preview/images/device/360x640/Portrait.png
Wikipedia/preview/images/device/360x640/hs-landscape.png
Wikipedia/preview/images/device/360x640/hs-portrait.png
Wikipedia/preview/images/device/800x352/Landscape.png
Wikipedia/preview/images/device/MenuItem-keys-Bg2.png
Wikipedia/preview/images/device/menuKeys-bg.png
Wikipedia/preview/images/errorIcon.png
Wikipedia/preview/images/gradient-bg.png
Wikipedia/preview/images/hs-iframeMask.png
Wikipedia/preview/images/infoIcon.png
Wikipedia/preview/images/memory-icon.png
Wikipedia/preview/images/messaging-icon.png
Wikipedia/preview/images/normal-orientation-icon.png
Wikipedia/preview/images/settings-icon.png
Wikipedia/preview/images/statusBar_240x320.png
Wikipedia/preview/images/statusBar_320x240.png
Wikipedia/preview/images/statusBar_360x640.png
Wikipedia/preview/images/statusBar_640x360.png
Wikipedia/preview/images/statusBar_800x352.png
Wikipedia/preview/images/sub-menu-arrow.png
Wikipedia/preview/images/th-bg-gradient.png
Wikipedia/preview/images/warningIcon.png
Wikipedia/preview/images/wrt-help-icon.png
Wikipedia/preview/nopreview.html
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/000000_40x100_textures_05_inset_soft_25.png
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/0078a3_40x100_textures_02_glass_40.png
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/222222_11x11_icon_arrows_leftright.gif
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/222222_11x11_icon_arrows_updown.gif
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/222222_11x11_icon_close.gif
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/222222_11x11_icon_doc.gif
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/222222_11x11_icon_folder_closed.gif
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/222222_11x11_icon_folder_open.gif
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/222222_11x11_icon_minus.gif
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/222222_11x11_icon_plus.gif
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/222222_7x7_arrow_down.gif
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/222222_7x7_arrow_left.gif
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/222222_7x7_arrow_right.gif
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/222222_7x7_arrow_up.gif
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/555555_40x100_textures_02_glass_20.png
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/cccccc_11x11_icon_arrows_leftright.gif
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/cccccc_11x11_icon_arrows_updown.gif
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/cccccc_11x11_icon_close.gif
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/cccccc_11x11_icon_doc.gif
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/cccccc_11x11_icon_folder_closed.gif
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/cccccc_11x11_icon_folder_open.gif
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/cccccc_11x11_icon_minus.gif
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/cccccc_11x11_icon_plus.gif
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/cccccc_11x11_icon_resize_se.gif
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/cccccc_7x7_arrow_down.gif
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/cccccc_7x7_arrow_left.gif
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/cccccc_7x7_arrow_right.gif
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/cccccc_7x7_arrow_up.gif
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/f58400_40x100_textures_05_inset_soft_30.png
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/ffffff_11x11_icon_arrows_leftright.gif
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/ffffff_11x11_icon_arrows_updown.gif
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/ffffff_11x11_icon_close.gif
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/ffffff_11x11_icon_doc.gif
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/ffffff_11x11_icon_folder_closed.gif
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/ffffff_11x11_icon_folder_open.gif
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/ffffff_11x11_icon_minus.gif
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/ffffff_11x11_icon_plus.gif
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/ffffff_7x7_arrow_down.gif
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/ffffff_7x7_arrow_left.gif
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/ffffff_7x7_arrow_right.gif
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/ffffff_7x7_arrow_up.gif
Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/slider-handle.png
Wikipedia/preview/script/jquery-ui/css/ui-darkness/ui.all.css
Wikipedia/preview/script/jquery-ui/js/jquery-1.2.6.min.js
Wikipedia/preview/script/jquery-ui/js/jquery-ui-1.6.custom.min.js
Wikipedia/preview/script/lib/console.js
Wikipedia/preview/script/lib/device.js
Wikipedia/preview/script/lib/loader.js
Wikipedia/preview/script/lib/menu.js
Wikipedia/preview/script/lib/menuItem.js
Wikipedia/preview/script/lib/sapi/AppManager.js
Wikipedia/preview/script/lib/sapi/Calendar.js
Wikipedia/preview/script/lib/sapi/Contact.js
Wikipedia/preview/script/lib/sapi/Landmarks.js
Wikipedia/preview/script/lib/sapi/Location.js
Wikipedia/preview/script/lib/sapi/Logging.js
Wikipedia/preview/script/lib/sapi/MediaManagement.js
Wikipedia/preview/script/lib/sapi/Messaging.js
Wikipedia/preview/script/lib/sapi/Sensor.js
Wikipedia/preview/script/lib/sapi/SysInfo.js
Wikipedia/preview/script/lib/systeminfo.js
Wikipedia/preview/script/lib/widget.js
Wikipedia/preview/script/nokia.js
Wikipedia/preview/script/resolution.js
Wikipedia/preview/script/xml2json.js
Wikipedia/right.gif
Wikipedia/style.css
Wikipedia/titlebar.png
Wikipedia/todo.txt
Wikipedia/utils.js
Wikipedia/warning.png
Wikipedia/wiki.css
Wikipedia/wrt_preview_frame.html
Wikipedia/wrt_preview_main.html
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/.project	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>Wikipedia</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>com.nokia.wrt.widgetPreviewBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>com.nokia.wrt.WidgetProjectNature</nature>
+		<nature>com.aptana.ide.project.nature.web</nature>
+	</natures>
+</projectDescription>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/Bookmarks.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,295 @@
+// ////////////////////////////////////////////////////////////////////////////
+// Symbian Foundation Example Code
+//
+// This software is in the public domain. No copyright is claimed, and you 
+// may use it for any purpose without license from the Symbian Foundation.
+// No warranty for any purpose is expressed or implied by the authors or
+// the Symbian Foundation. 
+// ////////////////////////////////////////////////////////////////////////////
+
+var MILLIS_IN_A_DAY = 24*60*60*1000;
+
+function BookmarksViewItem(articleTitle, articleContent, articleBase, pos) {
+	var d = new Date();
+	this.articleTitle = articleTitle;
+	this.articleContent = articleContent; 
+	this.pos = pos;
+	this.articleBase = articleBase;
+	this.timestamp = d.getTime();
+}
+
+
+function BookmarksView (){
+	try {
+		ListView.prototype.init.call(this, null, null);	
+		var caption = new NavigationButton(1, "titlebar.png", "Bookmarks", true);
+		caption.addEventListener("ActionPerformed", function(){wikiHomeView.show();});
+		this.addControl(caption);
+		this.previousView = null;
+		this.items = new Array();
+		this.startindex = 0;
+		this.endindex = 0;
+		this.rendered = false;	
+		this.todayControl = null;
+		this.loadItems();
+	}catch(w) {alert(w);}
+}
+
+BookmarksView.prototype = new ListView(null, null);
+
+BookmarksView.prototype.items = null;
+
+
+BookmarksView.prototype.addItem = function(articleTitle, articleContent, articleBase){
+	try {
+		this.removeItem(articleTitle);
+		this.rendered = false;
+		var item = null;
+		item = new BookmarksViewItem(articleTitle, null /*articleContent*/, articleBase, this.endindex);
+		this.items[this.endindex - this.startindex] = item;
+		this.endindex++;
+		this.saveItem(item);
+	}catch(w) { alert(w);}
+}
+
+
+BookmarksView.prototype.saveItem = function(item){
+	if ( window.widget ) {
+//		alert("BM: Saving item: pos=" + item.pos +", title=" + item.articleTitle +", ts=" + item.timestamp
+//		+ "titlekey:" + getBookmarksTitleKey(item.pos) + ", timekey: " + getBookmarksTimeKey(item.pos)	);
+
+		widget.setPreferenceForKey(item.articleTitle, getBookmarksTitleKey(item.pos));
+		//widget.setPreferenceForKey(item.articleContent, getBookmarksContentKey(item.pos));
+		widget.setPreferenceForKey(item.articleBase, getBookmarksBaseKey(item.pos));
+		widget.setPreferenceForKey(""+item.timestamp, getBookmarksTimeKey(item.pos));
+		this.storeIndex();
+	}
+}
+
+BookmarksView.prototype.storeIndex = function () {
+	widget.setPreferenceForKey("" + this.startindex, "boox-start");
+	widget.setPreferenceForKey("" + this.endindex, "boox-end");
+//	alert("BM: index stored, start:"+this.startindex + ", end:"+this.endindex);
+}
+
+
+BookmarksView.prototype.clear = function(){
+	this.items = new Array();
+	if (window.widget) {
+		for (var i = this.startindex; i < this.endindex + 1; i++) {
+			widget.setPreferenceForKey(null, getBookmarksTitleKey(i));
+			widget.setPreferenceForKey(null, getBookmarksContentKey(i));
+			widget.setPreferenceForKey(null, getBookmarksBaseKey(i));
+			widget.setPreferenceForKey(null, getBookmarksTimeKey(i));
+		}
+		this.startindex = 0;
+		this.endindex = 0;
+		this.storeIndex();
+		this.rendered = false;
+		this.render();
+	}
+}
+
+BookmarksView.prototype.loadItems = function(){
+	uiManager.showNotification(-1, "wait", "Loading...");
+	var self = this;
+	setTimeout(function(){self.doLoadItems();},0);
+}
+
+
+BookmarksView.prototype.doLoadItems = function(){
+	if ( window.widget ) {
+		var d = new Date();
+		var now = d.getTime();
+		this.items = new Array();
+		var tmpstart 	= 	widget.preferenceForKey("boox-start");
+		var tmpend 		= 	widget.preferenceForKey("boox-end");
+
+		this.startindex = (( tmpstart != undefined && tmpstart != null ) ? parseInt(tmpstart) : 0);
+		this.endindex = (( tmpend != undefined && tmpend != null ) ? parseInt(tmpend) : 0);
+
+//		alert("BM: startindex=" + this.startindex +", endindex=" + this.endindex);
+
+		for (var i = this.startindex; i < this.endindex; i++) {
+			var pos =  i - this.startindex;
+			var title = widget.preferenceForKey(getBookmarksTitleKey(i));
+//			alert("BM: Examining item: i=" + i + ", pos=" + pos +", title=" + title );
+			if ( !title || title == null || title == "null") continue;
+			var item = new BookmarksViewItem(title,null,null,i);
+			item.articleContent = widget.preferenceForKey(getBookmarksContentKey(i));
+			item.articleBase = widget.preferenceForKey(getBookmarksBaseKey(i));
+			item.timestamp = parseFloat(widget.preferenceForKey(getBookmarksTimeKey(i)));
+			item.pos = i;
+			this.items[pos] = item;
+//			alert("BM: Loaded item: i=" + i + ", pos=" + pos +", title=" + title +", ts=" + item.timestamp);
+		}
+		this.rendered = false;
+	}
+	uiManager.hideNotification();
+}
+
+BookmarksView.prototype.render = function(){
+	if ( this.rendered ) return;
+	var d = new Date();
+	var now = d.getTime();
+	// clear components
+	this.removeAllControls();
+	var caption = new NavigationButton(1, "titlebar.png", "Bookmarks", true);
+	caption.addEventListener("ActionPerformed", function(){
+		wikiHomeView.show();
+	});
+	this.addControl(caption);
+	
+	// add components for bookmarks items, up to today
+	
+	var thecontrol = new ContentPanel(null, "All bookmarks", "", true, true);
+	thecontrol.setContent(this.renderBookmarksContent(0, now));
+	this.addControl(thecontrol);
+	this.rendered = true;
+}
+
+BookmarksView.prototype.renderBookmarksContent = function (from , to) {
+	var buf = "<table class='historytable'>";
+	for ( var i = this.endindex ; i >= this.startindex ; i -- ) {
+		var ind = i - this.startindex;
+		if ( this.items[ind] == undefined || this.items[ind] == null ) continue;
+		if ( this.items[ind].timestamp < from ) break;
+		if ( this.items[ind].timestamp < to ) {
+			buf += this.renderBookmarksItem(this.items[ind]);			
+		}
+	}
+	buf += "</table>"
+	return buf;
+}
+
+BookmarksView.prototype.renderBookmarksItem = function(item){
+	if ( item == undefined || item == null ) return "";
+    var buf = "<tr><td><small>";
+	buf += shortFormatTime(item.timestamp);
+	buf += "</small></td><td width=70%>";	 
+	buf += "<div class=\"FeedItemLink\">";
+	buf += "<a href=\"JavaScript:void(0)\" onclick=\"wikiBookmarksView.goTo(" ;
+	buf += item.pos;
+	buf +=  "); return false;\">";
+	buf += "<strong>";
+	buf += shorten(item.articleTitle, 30);
+	buf += "<strong></a>";
+	buf += "</div>";
+	buf += "</td><td><div class=\"FeedItemLink\">";
+	buf += "<a href=\"JavaScript:void(0)\" onclick=\"event.stopPropagation();wikiBookmarksView.deleteItem(" ;
+	buf += item.pos;
+	buf +=  "); wikiBookmarksView.render(); return false;\">";
+	buf += "<img src=delete.png border=0></a>";
+	buf += "</div>";
+	buf += "</td></tr>";
+	return buf;
+}
+
+BookmarksView.prototype.deleteItem = function(ind){	
+	try {
+	//	alert("BM: removeItem: ind=" + ind);
+		// remove item
+		this.items[ind-this.startindex] = null;
+		if (window.widget) {
+			widget.setPreferenceForKey(null, getBookmarksTitleKey(ind));
+			widget.setPreferenceForKey(null, getBookmarksContentKey(ind));
+			widget.setPreferenceForKey(null, getBookmarksBaseKey(ind));
+			widget.setPreferenceForKey(null, getBookmarksTimeKey(ind));
+		}
+		this.rendered = false;
+	}catch(ex) { alert(ex);}
+}
+
+BookmarksView.prototype.goTo = function(pos){
+	wikiBrowse(this.items[pos-this.startindex].articleTitle, false, this.items[pos-this.startindex].articleBase); // true means don't re-add to history	 	
+}
+
+
+
+BookmarksView.prototype.show = function(){
+	try {
+		this.render();
+	}catch(e){ alert(e);}
+	View.prototype.show.call(this);
+}
+
+
+// abstract function for updating per-view menu
+// only called if window.widget is defined
+BookmarksView.prototype.setupMenu = function(){
+	if ( window.widget ) {
+		menu.clear();
+		var clearMenuItem = new MenuItem("Clear", MENU_ITEM_BOOKMARKS_CLEAR);
+		var self = this; 
+		clearMenuItem.onSelect = function(){self.clear();};
+		menu.append(clearMenuItem);
+
+		var self = this;
+		var searchMenuItem = new MenuItem("Search", MENU_ITEM_MAIN_SEARCH); 
+		searchMenuItem.onSelect = function(){wikiHomeView.show();};
+		menu.append(searchMenuItem);
+		var historyMenuItem = new MenuItem("History", MENU_ITEM_MAIN_HISTORY); 
+		historyMenuItem.onSelect = function(){wikiHistoryView.previousView = self; wikiHistoryView.show();};
+		menu.append(historyMenuItem);
+		var bookmarksMenuItem = new MenuItem("Bookmarks", MENU_ITEM_MAIN_BOOKMARKS); 
+		bookmarksMenuItem.onSelect = function(){wikiBookmarksView.show();};
+		menu.append(bookmarksMenuItem);
+
+		addHelpMenuItems();
+	}
+}
+
+
+function getBookmarksKeyBase(pos) {
+	return "boox." + pos + "."; 
+}
+
+function getBookmarksTitleKey(pos) {
+	return getBookmarksKeyBase(pos) + "title"; 
+}
+
+function getBookmarksContentKey(pos) {
+	return getBookmarksKeyBase(pos) + "content"; 
+}
+
+function getBookmarksTimeKey(pos) {
+	return getBookmarksKeyBase(pos) + "time"; 
+}
+
+function getBookmarksBaseKey(pos) {
+	return getHistoryKeyBase(pos) + "base"; 
+}
+
+
+
+BookmarksView.prototype.removeItem = function(articleTitle){
+	// find index
+	var ind = this.findItemIdFromTitle(articleTitle)
+	if ( ind == -1 ) {
+		return;
+	}
+	deleteItem(ind);
+}
+
+BookmarksView.prototype.findItemIdFromTitle = function(title) {
+	var ind = -1;
+	for ( var i = this.startindex ; i < this.endindex + 1 ; i ++ ) {
+		var arrind = i-this.startindex;
+		if ( this.items[arrind] != undefined && this.items[arrind] != null && title == this.items[arrind].articleTitle) {
+			ind = i;
+			break;
+		}
+	}
+	return ind;
+}
+
+// return already downloaded content for an article or null
+// if we don't have it
+BookmarksView.prototype.getContentForArticle = function(articleTitle){
+	if (window.widget) {
+		var i = this.findItemIdFromTitle(articleTitle);
+		return widget.preferenceForKey(getBookmarksContentKey(i));
+	}
+	return null;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/FeedPresentation.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,162 @@
+// ////////////////////////////////////////////////////////////////////////////
+// Symbian Foundation Example Code
+//
+// This software is in the public domain. No copyright is claimed, and you 
+// may use it for any purpose without license from the Symbian Foundation.
+// No warranty for any purpose is expressed or implied by the authors or
+// the Symbian Foundation. 
+// ////////////////////////////////////////////////////////////////////////////
+
+// Feed presentation classes
+
+// Abstract class used to create controls to represent feed entries.
+function FeedPresenter(rssreader){
+	if (rssreader) {
+		this.init(rssreader);
+	}
+}
+
+// FeedPresenter "Constructor"
+FeedPresenter.prototype.init = function(rssreader){
+	this.rssreader = rssreader;
+}
+
+// Create a control that represents this item and add it to
+// parent rss reader
+FeedPresenter.prototype.show = function(item){
+}
+
+// Create and add controls to be shown before items list.
+FeedPresenter.prototype.addPreambleItems = function(){
+}
+
+// Create and add controls to be shown before items list.
+FeedPresenter.prototype.addFooterItems = function(){
+}
+
+// No items returned, show "No messages"
+FeedPresenter.prototype.showNoItems = function(){
+	var label = new Label(null, null, "No results");
+	this.rssreader.addFeedItemControl(label);
+}
+
+// Implementation of FeedPresenter that shows feed in a 
+// ContentPanel
+function HtmlFeedPresenter(rssreader) {
+	if (rssreader) {
+		this.init(rssreader);
+	}
+	this.expanded = false;
+}
+
+// HtmlFeedPresenter is a subclass of FeedPresenter
+HtmlFeedPresenter.prototype = new FeedPresenter(null);
+
+// HtmlFeedPresenter "constructor"
+HtmlFeedPresenter.prototype.init = function(rssreader) {
+	FeedPresenter.prototype.init.call(this, rssreader);
+}
+
+// Create a control that represents this item and add it to
+// parent rss reader
+HtmlFeedPresenter.prototype.show = function(item) {
+			// get a feed item control from the pool or create one and
+		// place it in the pool if there aren't enough feed item controls
+		var feedItemControl = new ContentPanel(null, null, null, true);
+
+		// initialize feed item control
+		feedItemControl.setCaption(item.title);
+		feedItemControl.setContent(this.getContentHTMLForFeedItem(item));
+		feedItemControl.setExpanded(this.expanded);
+		
+		// add the feed item control to the main view
+		this.rssreader.addFeedItemControl(feedItemControl);
+}
+
+// Returns the content HTML for a feed item.
+HtmlFeedPresenter.prototype.getContentHTMLForFeedItem = function (item){
+	var buf = "";
+	
+	// item date
+	if (item.date != null) {
+		buf += "<div class=\"FeedItemDate\">" ;
+		if ( item.author != null ) {
+			buf += item.author + ", ";
+		}
+		buf += item.date + "</div>";
+	}
+	
+	// item description
+	if (item.description != null) {
+		buf += "<div class=\"FeedItemDescription\">" + item.description + "</div>";
+	}
+
+	if (item.url != null) {
+		// blogs
+        buf += "<div class=\"FeedItemLink\">";
+//            buf += "<a href=\"JavaScript:void(0)\" onclick=\"openURL('" + item.title + "', '" + item.url + "'); return false;\">";
+            buf += "<a href=\"JavaScript:void(0)\" onclick=\"openURL('" + item.url + "'); return false;\">";
+            buf += "Read more...";
+            buf += "</a>";
+        buf += "</div>";
+	}
+	
+	return buf;
+}
+
+
+// Implementation of FeedPresenter that shows feed as a clickable
+// button that shows feed entry title as label
+function ButtonFeedPresenter(rssreader) {
+	if (rssreader) {
+		this.init(rssreader);
+	}
+	this.indexCounter = 0;
+	this.items = [];
+}
+
+// ButtonFeedPresenter is a subclass of FeedPresenter
+ButtonFeedPresenter.prototype = new FeedPresenter(null);
+
+// ButtonFeedPresenter "constructor"
+ButtonFeedPresenter.prototype.init = function(rssreader) {
+	FeedPresenter.prototype.init.call(this, rssreader);
+}
+
+// Create a control that represents this item and add it to
+// parent rss reader
+ButtonFeedPresenter.prototype.show = function(item) {
+	this.items[this.indexCounter] = item;
+	// get a feed item control from the pool or create one and
+	// place it in the pool if there aren't enough feed item controls
+	var feedItemControl = new NavigationButton(this.indexCounter, "right.gif", item.title);
+
+	// add button press handler
+    var self = this;
+	feedItemControl.addEventListener("ActionPerformed", 
+		function(event) { self.feedClicked(event); } );
+
+	this.indexCounter++;
+		
+	// add the feed item control to the main view
+	this.rssreader.addFeedItemControl(feedItemControl);
+}
+
+// Handle the button-press
+ButtonFeedPresenter.prototype.feedClicked = function(event){
+	var clickedButton = event.source;
+	var id = clickedButton.id;
+	var url = this.items[id].url;
+	
+	if (url.indexOf("/wiki/index.php")) {
+		// hack for printable wiki pages
+		var articleName = url.replace(wikiBaseUrl + "/", "");
+		url = wikiBaseUrl + "?title=" + articleName + "&action=render";
+		openURL(url);
+	}
+	else {
+		openURL(url);
+	}
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/FeedUpdateBroker.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,174 @@
+///////////////////////////////////////////////////////////////////////////////
+// The FeedUpdateBroker class implements a simple RSS fetcher and parser.
+// Adapted from WRTKit RssReader example
+
+// Constructor.
+function FeedUpdateBroker() {
+    this.httpReq = null;
+    this.feedAddress = null;
+    this.callback = null;
+	this.ignoreContent = false;
+	this.cancelled = false;
+	this.responseParser = this.handleRssResponse;
+	this.startFromItem = 0;
+	this.maxItems = 0;
+}
+
+// Fetches a feed from the specified URL and calls the callback when the feed
+// has been fetched and parsed, or if the process results in an error.
+FeedUpdateBroker.prototype.doFetchFeed = function(){    
+    // create new XML HTTP request
+    this.httpReq = new Ajax();
+    
+    // set callback
+    var self = this;
+    this.httpReq.onreadystatechange = function() { self.readyStateChanged(); };
+
+    // initiate the request
+    this.httpReq.open("GET", nocache(this.feedAddress), true);
+    this.httpReq.send(null);
+}
+
+// has been fetched and parsed, or if the process results in an error.
+FeedUpdateBroker.prototype.fetchFeed = function(feedURL, callback) {
+    // remember callback
+    this.callback = callback;
+    this.feedAddress = feedURL;
+	this.doFetchFeed();
+}
+
+// Callback for ready-state change events in the XML HTTP request.
+FeedUpdateBroker.prototype.readyStateChanged = function() {
+    // complete request?
+    if (this.httpReq.readyState == 4) {
+        // attempt to get response status
+        var responseStatus = null;
+        try {
+            responseStatus = this.httpReq.status;
+        } catch (noStatusException) {}
+        
+		// are we being prompted for login?
+		var text = this.httpReq.responseText;
+		
+        // handle the response and call the registered callback object
+		var response = this.httpReq.responseXML;
+		if (response == null) {
+			// if the content type is not set correctly, we get the response as text
+			var xmlparser = new DOMParser();
+		    response = xmlparser.parseFromString(this.httpReq.responseText, "text/xml");
+		}
+        this.callback.feedUpdateCompleted(this.handleResponse(responseStatus, response));
+    }
+}
+
+// Handles a completed response.
+FeedUpdateBroker.prototype.handleResponse = function(responseStatus, xmlDoc){
+	if (this.responseParser == null) {
+		return this.handleRssResponse(responseStatus, xmlDoc);
+	}
+	else {
+		return this.responseParser.call(this, this, responseStatus, xmlDoc);
+	}	
+}
+
+
+FeedUpdateBroker.prototype.handleRssResponse = function(broker, responseStatus, xmlDoc){
+	if ( this.cancelled ) {
+        return { status: "cancelled" };
+	}
+    if (responseStatus == 200 && xmlDoc != null) {
+        // node ref for iterating
+        var node;
+        
+        // get last modified time - default to current time
+        var lastModified = new Date().getTime();
+        var channelElements = xmlDoc.getElementsByTagName("channel");
+        if (channelElements.length > 0) {
+            node = channelElements[0].firstChild;
+            while (node != null) {
+                if (node.nodeType == Node.ELEMENT_NODE) {
+                    if (node.nodeName == "pubDate" ||
+                            node.nodeName == "lastBuildDate" ||
+                            node.nodeName == "dc:date") {
+                        lastModified = getTextOfNode(node);
+                        break;
+                    }
+                }
+                node = node.nextSibling;
+            }
+        }
+        
+        // init feed items array
+        var items = [];
+        
+        // we got the feed XML so now we'll parse it
+        var itemElements = xmlDoc.getElementsByTagName("item");
+		
+        for (var i = this.startFromItem; i < itemElements.length; i++) {
+			if ( this.maxItems > 0 && this.maxItems < i ) {
+				break;
+			}
+            // iterate through child nodes of this item and gather
+            // all the data we need for a feed item
+            var title = null;
+            var date = null;
+            var description = null;
+            var url = null;
+            var author = null;
+            node = itemElements[i].firstChild;
+            while (node != null) {
+                if (node.nodeType == Node.ELEMENT_NODE) {
+                    if (node.nodeName == "title") {
+                        // item title
+                        title = getTextOfNode(node);
+                    } else if (node.nodeName == "pubDate" || node.nodeName == "dc:date") {
+                        // item publishing date
+                        date = getTextOfNode(node);
+                    } else if (node.nodeName == "description" && !this.ignoreContent ) {
+                        // item description
+                        description = getTextOfNode(node);
+                    } else if (node.nodeName == "link") {
+                        // link URL
+                        url = getTextOfNode(node);
+                    } else if (node.nodeName == "dc:creator" ) {
+						author = getTextOfNode(node);
+					}
+                }
+                node = node.nextSibling;
+            }
+            
+            // create the item and add to the items array
+            items.push({ title: title, date: date, description: description, url: url, author: author });
+        }
+        
+        // update was completed successfully
+        return { status: "ok", lastModified: lastModified, items: items };
+    } else {
+        // update failed
+        return { status: "error" };
+    }
+}
+
+// Returns the text of a node.
+function getTextOfNode(node) {
+    var buf = "";
+	// iterate through all child elements and collect all text to the buffer
+	var child = node.firstChild;
+	while (child != null) {
+		if (child.nodeType == Node.TEXT_NODE || child.nodeType == Node.CDATA_SECTION_NODE) {
+			// append text to buffer
+			if (buf != "") {
+				buf += " ";
+			}
+			buf += child.nodeValue;
+		}
+		child = child.nextSibling;
+	}
+	
+	return buf;
+}
+
+FeedUpdateBroker.prototype.cancel = function() {
+	this.cancelled = true;
+	this.httpReq.abort();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/History.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,360 @@
+// ////////////////////////////////////////////////////////////////////////////
+// Symbian Foundation Example Code
+//
+// This software is in the public domain. No copyright is claimed, and you 
+// may use it for any purpose without license from the Symbian Foundation.
+// No warranty for any purpose is expressed or implied by the authors or
+// the Symbian Foundation. 
+// ////////////////////////////////////////////////////////////////////////////
+
+var MILLIS_IN_A_DAY = 24*60*60*1000;
+var KEEP_HISTORY_FOR = 90 * MILLIS_IN_A_DAY; // 90 days
+var KEEP_CONTENT = false;
+
+function HistoryViewItem(articleTitle, articleContent, articleBase, pos) {
+	var d = new Date();
+	this.articleTitle = articleTitle;
+	this.articleContent = articleContent; 
+	this.articleBase = articleBase;
+	this.pos = pos;
+	this.timestamp = d.getTime();
+}
+
+
+function HistoryView (){
+	try {
+		ListView.prototype.init.call(this, null, null);	
+		var caption = new NavigationButton(1, "titlebar.png", "History", true);
+		caption.addEventListener("ActionPerformed", function(){wikiHomeView.show();});
+		this.addControl(caption);
+		this.previousView = null;
+		this.items = new Array();
+		this.startindex = 0;
+		this.endindex = 0;
+		this.current = 0;
+		this.lastRender = 0;	
+		this.todayControl = null;
+		this.loadItems();
+	}catch(w) {alert(w);}
+}
+
+HistoryView.prototype = new ListView(null, null);
+
+HistoryView.prototype.items = null;
+
+
+HistoryView.prototype.addItem = function(articleTitle, articleContent, articleBase){
+	// do not store it if its the same as previous one
+	if ( this.items[this.current] != undefined && this.items[this.current] != null && articleTitle == this.items[this.current].articleTitle){
+		return;
+	}
+	var item = null;
+	this.current = this.endindex;
+	if ( KEEP_CONTENT ){
+		item = new HistoryViewItem(articleTitle, articleContent, articleBase, this.current);
+	} else {
+		item = new HistoryViewItem(articleTitle, null, articleBase, this.current);	
+	}
+	this.items[this.current-this.startindex]= item;
+	this.endindex++;
+	this.saveItem(item);
+}
+
+
+HistoryView.prototype.saveItem = function(item){
+	if ( window.widget ) {
+//		alert("Saving item: pos=" + item.pos +", title=" + item.articleTitle +", ts=" + item.timestamp
+//		+ "titlekey:" + getHistoryTitleKey(item.pos) + ", timekey: " + getHistoryTimeKey(item.pos)	);
+
+		widget.setPreferenceForKey(item.articleTitle, getHistoryTitleKey(item.pos));
+		if (KEEP_CONTENT) {
+			widget.setPreferenceForKey(item.articleContent, getHistoryContentKey(item.pos));
+		}
+		widget.setPreferenceForKey(item.articleBase, getHistoryBaseKey(item.pos));
+		widget.setPreferenceForKey(""+item.timestamp, getHistoryTimeKey(item.pos));
+		this.storeIndex();
+	}
+}
+
+HistoryView.prototype.storeIndex = function () {
+	widget.setPreferenceForKey("" + this.startindex, "history.start");
+	widget.setPreferenceForKey("" + this.endindex, "history.end");
+	widget.setPreferenceForKey("" + this.current, "history.current");
+//	alert("index stored, start:"+this.startindex + ", end:"+this.endindex + ", current:"+this.current);
+}
+
+
+HistoryView.prototype.clear = function(){
+	this.items = new Array();
+	if (window.widget) {
+		for (var i = this.startindex; i < this.endindex + 1; i++) {
+			widget.setPreferenceForKey(null, getHistoryTitleKey(i));
+			if (KEEP_CONTENT) {
+				widget.setPreferenceForKey(null, getHistoryContentKey(i));
+			}
+			widget.setPreferenceForKey(null, getHistoryTimeKey(i));
+		}
+		this.startindex = 0;
+		this.endindex = 0;
+		this.current = 0;
+		this.storeIndex();
+		this.lastRender = 0;
+		this.render();
+	}
+}
+
+HistoryView.prototype.loadItems = function(){
+	uiManager.showNotification(-1, "wait", "Loading...");
+	var self = this;
+	setTimeout(function(){self.doLoadItems();},0);
+}
+
+
+HistoryView.prototype.doLoadItems = function(){
+	if ( window.widget ) {
+		var d = new Date();
+		var now = d.getTime();
+		this.items = new Array();
+		var tmpstart 	= 	widget.preferenceForKey("history.start");
+		var tmpend 		= 	widget.preferenceForKey("history.end");
+		var tmpcurr		=	widget.preferenceForKey("history.current");
+
+		this.startindex = (( tmpstart != undefined && tmpstart != null ) ? parseInt(tmpstart) : 0);
+		this.endindex = (( tmpend != undefined && tmpend != null ) ? parseInt(tmpend) : 0);
+		this.current = (( tmpcurr != undefined && tmpcurr != null ) ? parseInt(tmpcurr) : 0);
+
+//		alert("startindex=" + this.startindex +", endindex=" + this.endindex+ ", current=" + this.current);
+
+		for (var i = this.startindex; i < this.endindex; i++) {
+			var pos =  i - this.startindex;
+			var title = widget.preferenceForKey(getHistoryTitleKey(i));
+//			alert("Examining item: i=" + i + ", pos=" + pos +", title=" + title );
+			if ( !title || title == null || title == "null") continue;
+			var item = new HistoryViewItem(title,null,null,i);
+			if (KEEP_CONTENT) {
+				item.articleContent = widget.preferenceForKey(getHistoryContentKey(i));
+			}
+			item.articleBase = widget.preferenceForKey(getHistoryBaseKey(i));
+			item.timestamp = parseFloat(widget.preferenceForKey(getHistoryTimeKey(i)));
+			// delete items older than KEEP_HISTORY_FOR
+			if (item.timestamp < (now - KEEP_HISTORY_FOR)) {
+//				alert("Deleting old item: ts="+ item.timestamp + ", th=" + (now - KEEP_HISTORY_FOR));
+				widget.setPreferenceForKey(null, getHistoryTitleKey(i));
+				if (KEEP_CONTENT) {
+					widget.setPreferenceForKey(null, getHistoryContentKey(i));
+				}
+				widget.setPreferenceForKey(null, getHistoryBaseKey(i));
+				widget.setPreferenceForKey(null, getHistoryTimeKey(i));
+			}
+			else {
+				item.pos = i;
+				this.items[pos] = item;
+			}
+//			alert("Loaded item: i=" + i + ", pos=" + pos +", title=" + title +", ts=" + item.timestamp);
+		}
+	}
+	uiManager.hideNotification();
+}
+
+HistoryView.prototype.render = function(){
+	var d = new Date();
+	var now = d.getTime();
+	// what needs to be rendered?
+
+	if (now - this.lastRender > MILLIS_IN_A_DAY || this.todayControl == null) { // render all
+		
+		// clear components
+		this.removeAllControls();
+		var caption = new NavigationButton(1, "titlebar.png", "History", true);
+		caption.addEventListener("ActionPerformed", function(){
+			wikiHomeView.show();
+		});
+		this.addControl(caption);
+		
+		// add components for history items, up to today
+		
+		this.todayControl = new ContentPanel(null, "Last 24 hours", "", true, true);
+		this.todayControl.setContent(this.renderHistoryContent(now-MILLIS_IN_A_DAY, now));
+		this.addControl(this.todayControl);
+		var weekControl = new ContentPanel(null, "Last 7 days", "", true, false);
+		weekControl.setContent(this.renderHistoryContent(now-7*MILLIS_IN_A_DAY,now-MILLIS_IN_A_DAY));
+		this.addControl(weekControl);
+		var moreControl = new ContentPanel(null, "More than 7 days", "", true, false);
+		moreControl.setContent(this.renderHistoryContent(0,now-7*MILLIS_IN_A_DAY));
+		this.addControl(moreControl);
+	} else {
+		// render only today
+		this.todayControl.setContent(this.renderHistoryContent(now-MILLIS_IN_A_DAY, now));
+	} 
+	
+	this.lastRender = now;		
+}
+
+HistoryView.prototype.renderHistoryContent = function (from , to) {
+	var buf = "<table class='historytable'>";
+	for ( var i = this.endindex ; i >= this.startindex ; i -- ) {
+		var ind = i - this.startindex;
+		if ( this.items[ind] == undefined || this.items[ind] == null ) continue;
+		if ( this.items[ind].timestamp < from ) break;
+		if ( this.items[ind].timestamp < to ) {
+			buf += this.renderHistoryItem(this.items[ind]);			
+		}
+	}
+	buf += "</table>"
+	return buf;
+}
+
+HistoryView.prototype.renderHistoryItem = function(item){
+	if ( item == undefined || item == null ) return "";
+    var buf = "<tr><td><small>";
+	buf += shortFormatTime(item.timestamp);
+	buf += "</small></td><td  width=70%>";	 
+	buf += "<div class=\"FeedItemLink\">";
+	buf += "<a href=\"JavaScript:void(0)\" onclick=\"event.stopPropagation();wikiHistoryView.goTo(" ;
+	buf += item.pos;
+	buf +=  "); return false;\">";
+	buf += "<strong>";
+	buf += shorten(item.articleTitle, 30);
+	buf += "</strong></a>";
+	buf += "</div>";
+	buf += "</td><td><div class=\"FeedItemLink\">";
+	buf += "<a href=\"JavaScript:void(0)\" onclick=\"event.stopPropagation();wikiHistoryView.deleteItem(" ;
+	buf += item.pos;
+	buf +=  "); return false;\">";
+	buf += "<img src=delete.png border=0></a>";
+	buf += "</div>";
+	buf += "</td></tr>";
+	return buf;
+}
+
+HistoryView.prototype.deleteItem = function(pos){	
+	this.items[pos-this.startindex] = null;
+	if ( window.widget ) {
+		widget.setPreferenceForKey(null, getHistoryTitleKey(pos));
+		if (KEEP_CONTENT) {
+			widget.setPreferenceForKey(null, getHistoryContentKey(pos));
+		}
+		widget.setPreferenceForKey(null, getHistoryBaseKey(pos));
+		widget.setPreferenceForKey(null, getHistoryTimeKey(pos));
+		this.storeIndex();
+	}
+	this.lastRender = 0;
+	this.render();
+}
+
+HistoryView.prototype.show = function(){
+	try {
+		this.render();
+	}catch(e){ alert(e);}
+	View.prototype.show.call(this);
+}
+
+HistoryView.prototype.goTo = function(pos){
+	this.current = pos;
+	wikiBrowse(this.items[pos-this.startindex].articleTitle, true, this.items[pos-this.startindex].articleBase); // true means don't re-add to history	 	
+}
+
+HistoryView.prototype.go = function(offset){
+	var newcurrent = this.current + offset;
+	var idx = newcurrent-this.startindex;
+	if ( newcurrent >= this.startindex && newcurrent <= this.endindex
+		 && idx >= 0 && this.items[idx] != undefined && this.items[idx] != null	) {
+		this.current = newcurrent;
+		wikiBrowse(this.items[idx].articleTitle, true, this.items[idx].articleBase);	 	
+	}
+}
+
+HistoryView.prototype.hasNext = function(){
+	var newidx = this.current + 1; 
+	return ( newidx < this.endindex && this.items[newidx] != undefined && this.items[newidx] != null );  
+}
+
+// abstract function for updating per-view menu
+// only called if window.widget is defined
+HistoryView.prototype.setupMenu = function(){
+	if ( window.widget ) {
+		menu.clear();
+		var clearMenuItem = new MenuItem("Clear", MENU_ITEM_HISTORY_CLEAR);
+		var self = this; 
+		clearMenuItem.onSelect = function(){self.clear();};
+		menu.append(clearMenuItem);
+
+		var self = this;
+		var searchMenuItem = new MenuItem("Search", MENU_ITEM_MAIN_SEARCH); 
+		searchMenuItem.onSelect = function(){wikiHomeView.show();};
+		menu.append(searchMenuItem);
+		var historyMenuItem = new MenuItem("History", MENU_ITEM_MAIN_HISTORY); 
+		historyMenuItem.onSelect = function(){wikiHistoryView.previousView = self; wikiHistoryView.show();};
+		menu.append(historyMenuItem);
+		var bookmarksMenuItem = new MenuItem("Bookmarks", MENU_ITEM_MAIN_BOOKMARKS); 
+		bookmarksMenuItem.onSelect = function(){wikiBookmarksView.show();};
+		menu.append(bookmarksMenuItem);
+
+		addHelpMenuItems();
+	}
+}
+
+
+function getHistoryKeyBase(pos) {
+	return "hist." + pos + "."; 
+}
+
+function getHistoryTitleKey(pos) {
+	return getHistoryKeyBase(pos) + "title"; 
+}
+
+function getHistoryContentKey(pos) {
+	return getHistoryKeyBase(pos) + "content"; 
+}
+
+function getHistoryBaseKey(pos) {
+	return getHistoryKeyBase(pos) + "base"; 
+}
+
+function getHistoryTimeKey(pos) {
+	return getHistoryKeyBase(pos) + "time"; 
+}
+
+
+//HistoryView.prototype.removeItem = function(articleTitle){
+//	// find index
+//	var ind = this.findItemIdFromTitle(articleTitle)
+//	if ( ind == -1 ) {
+//		return;
+//	}
+//
+//	// remove item
+//	this.items[ind-this.startindex] = null;
+//	if (window.widget) {
+//		widget.setPreferenceForKey(null, getHistoryTitleKey(ind));
+//		if (KEEP_CONTENT) {
+//			widget.setPreferenceForKey(null, getHistoryContentKey(ind));
+//		}
+//		widget.setPreferenceForKey(null, getHistoryTimeKey(ind));
+//	}
+//	this.current = ind;
+//	this.endindex = ind;
+//	this.render();
+//}
+
+//HistoryView.prototype.findItemIdFromTitle = function(title) {
+//	var ind = -1;
+//	for ( var i = this.startindex ; i < this.endindex + 1 ; i ++ ) {
+//		var arrind = i-this.startindex;
+//		if ( this.items[arrind] && this.items[arrind] != null && title == this.items[arrind].articleTitle) {
+//			ind = i;
+//			break;
+//		}
+//	}
+//	return ind;
+//}
+// return already downloaded content for an article or null
+// if we don't have it
+//HistoryView.prototype.getContentForArticle = function(articleTitle){
+//	if (window.widget && KEEP_CONTENT) {
+//		var i = this.findItemIdFromTitle(articleTitle);
+//		return widget.preferenceForKey(getHistoryContentKey(i));
+//	}
+//	return null;
+//}
+
Binary file Wikipedia/Icon.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/Info.plist	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Nokia//DTD PLIST 1.0//EN" "http://www.nokia.com/DTDs/plist-1.0.dtd">
+<plist version="1.0">
+    <dict>
+        <key>DisplayName</key>
+        <string>Wikipedia</string>
+        <key>Identifier</key>
+        <string>com.Wikipedia.basic.widget</string>
+        <key>Version</key>
+        <string>1.0</string>
+        <key>MainHTML</key>
+        <string>index.html</string>
+        <key>AllowNetworkAccess</key>
+        <true/>
+        <key>MiniViewEnabled</key>
+		<true/>
+    </dict>
+</plist>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/RssReader.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,165 @@
+///////////////////////////////////////////////////////////////////////////////
+// RSS Reader from WRTKit examples, modified for Wikipedia widget
+
+// RSS reader class
+
+function RssReader(aFeedName, aFeedUrl, aFeedPresenter, aParent, aResponseParser){
+	this.responseParser = aResponseParser;
+	this.feedUpdateBroker = null;
+	this.feedUpdateBrokerActive = false;
+	this.feedName = aFeedName;
+	this.feedURL = aFeedUrl;
+	this.feedUpdateForced = false;
+	this.feedItemControls = [];
+	this.feedLastModified = 0;
+	this.feedPresenter = aFeedPresenter;
+	this.ignoreContent = false;
+	this.hasData = false;
+	this.startFromItem = 0;
+	this.maxItems = 0;
+	this.feedPresenter = 0;
+	if ( aFeedName != undefined ) {
+		this.init(aFeedName, aFeedUrl, aFeedPresenter, aParent, aResponseParser);
+	}
+}
+
+RssReader.prototype = new ListView(null, null);
+	
+RssReader.prototype.init = function (aFeedName, aFeedUrl, aFeedPresenter, aParent, aResponseParser){
+	this.previousView = aParent;
+	this.feedPresenter = aFeedPresenter;
+	this.responseParser = aResponseParser;
+	this.feedName = aFeedName;
+	this.feedURL = aFeedUrl;
+	if (aFeedPresenter != null) {
+		this.feedPresenter = aFeedPresenter;
+		this.feedPresenter.init(this);
+	} else {
+		this.feedPresenter = new HtmlFeedPresenter(this);
+	}
+	ListView.prototype.init.call(this, null, null);
+	
+	var caption = new NavigationButton(1, "titlebar.png", aFeedName, true);
+	caption.addEventListener("ActionPerformed", function(){wikiHomeView.show();});
+	this.addControl(caption);
+	// add pre-amble items (latest posts, new thread, reply etc)
+	this.feedPresenter.addPreambleItems();
+}	
+
+	
+// Callback function that gets called when a feed update has completed.
+RssReader.prototype.feedUpdateCompleted = function(event){
+	// remove cancel button
+	this.setupSoftKeys();
+	if (event.status == "ok") {
+		// if there aren't any feed items yet, we'll hide the progress dialog
+		
+		// check if the feed has updated
+		if (event.lastModified != this.feedLastModified) {
+			// remember the last modified timestamp
+			this.feedLastModified = event.lastModified;
+			
+			// feed fetched and parsed successfully
+			this.setFeedItems(event.items);			
+			this.feedPresenter.addFooterItems();
+			this.focusFirst();
+		}
+		uiManager.hideNotification();
+	}
+	else if (event.status != "cancelled") {
+		// show error message
+		uiManager.showNotification(3000, "warning", "Error loading page!");
+	}
+	
+	// reset the broker 
+	this.feedUpdateBroker = null;
+	this.feedUpdateBrokerActive = false;
+	
+	// reset commanded feed update flag
+	this.feedUpdateForced = false;
+}
+	
+RssReader.prototype.focusFirst = function(){
+	// focus the first feed item control
+	// (but only if we are in the main view)
+	if (this.feedItemControls.length > 0) {
+		this.feedItemControls[0].setFocused(true);
+	}
+}
+	
+// Removes feed items.
+RssReader.prototype.removeFeedItems = function (){
+	// remove all current feed items from the main view
+	for (var i = 0; i < this.feedItemControls.length; i++) {
+		this.removeControl(this.feedItemControls[i]);
+	}
+	
+	// reset feed item control array
+	this.feedItemControls = [];
+}
+	
+// Sets feed items.
+RssReader.prototype.addFeedItemControl = function(c){
+	this.feedItemControls.push(c);
+	this.addControl(c);
+}
+
+// Sets feed items.
+RssReader.prototype.setFeedItems = function (items){
+	// start by removing all current feed items
+	this.removeFeedItems();
+	
+	if (items.length == 0) {
+		this.feedPresenter.showNoItems();
+	}
+	else {
+		// create new feed items and add them to the main view
+		// use feed item pool to recycle controls
+		for (var i = 0; i < items.length; i++) {
+			var item = items[i];
+			this.feedPresenter.show(item);
+		}
+		
+	}
+	this.hasData = true;
+}
+	
+	
+// Update feed
+RssReader.prototype.update = function(forceFeedUpdate, notification){
+	if ( this.hasData && !forceFeedUpdate ) {
+		return;
+	}		
+	this.feedUpdateForced = forceFeedUpdate;
+	
+	if ( notification == undefined ) {
+		notification = true;
+	}
+	
+	// check if a feed update has been scheduled, if it's time to update now,
+	// and if there's no update currently in progress and if we're in the main view
+	if ((this.feedURL != null) && (!this.feedUpdateBrokerActive) ) { //&& (uiManager.getView() == this) ) {
+		// fetch the feed from the specified URL
+		this.feedUpdateBrokerActive = true;
+		this.feedUpdateBroker = new FeedUpdateBroker();
+		this.feedUpdateBroker.startFromItem = this.startFromItem;
+		this.feedUpdateBroker.maxItems = this.maxItems;
+		
+		if ( this.responseParser != null ) {
+			this.feedUpdateBroker.responseParser = this.responseParser;
+		}
+		this.feedUpdateBroker.ignoreContent = this.ignoreContent;
+		this.feedUpdateBroker.fetchFeed(this.feedURL, this);
+		// allow cancelling
+	    if (window.widget) {
+			var self = this;
+			menu.setRightSoftkeyLabel("Cancel", function(){
+				self.feedUpdateBroker.cancel(); self.setupSoftKeys();
+				uiManager.hideNotification();
+				});
+	    }
+		if (notification) {
+			uiManager.showNotification(-1, "wait", "Loading...", -1);
+		}
+	}
+}
Binary file Wikipedia/WRTKit/Resources/CheckBox.png has changed
Binary file Wikipedia/WRTKit/Resources/ContentPanelFoldIcons.png has changed
Binary file Wikipedia/WRTKit/Resources/ControlAssemblyBackground.png has changed
Binary file Wikipedia/WRTKit/Resources/DocumentBackground.png has changed
Binary file Wikipedia/WRTKit/Resources/FormButtonCenter.png has changed
Binary file Wikipedia/WRTKit/Resources/FormButtonCenterLarge.png has changed
Binary file Wikipedia/WRTKit/Resources/FormButtonLeft.png has changed
Binary file Wikipedia/WRTKit/Resources/FormButtonLeftLarge.png has changed
Binary file Wikipedia/WRTKit/Resources/FormButtonRight.png has changed
Binary file Wikipedia/WRTKit/Resources/FormButtonRightLarge.png has changed
Binary file Wikipedia/WRTKit/Resources/ListViewCaptionBackground.png has changed
Binary file Wikipedia/WRTKit/Resources/NotificationPopupBackground.png has changed
Binary file Wikipedia/WRTKit/Resources/NotificationPopupTypeIndicator.png has changed
Binary file Wikipedia/WRTKit/Resources/ProgressBar0.png has changed
Binary file Wikipedia/WRTKit/Resources/ProgressBar10.png has changed
Binary file Wikipedia/WRTKit/Resources/ProgressBar100.png has changed
Binary file Wikipedia/WRTKit/Resources/ProgressBar20.png has changed
Binary file Wikipedia/WRTKit/Resources/ProgressBar30.png has changed
Binary file Wikipedia/WRTKit/Resources/ProgressBar40.png has changed
Binary file Wikipedia/WRTKit/Resources/ProgressBar50.png has changed
Binary file Wikipedia/WRTKit/Resources/ProgressBar60.png has changed
Binary file Wikipedia/WRTKit/Resources/ProgressBar70.png has changed
Binary file Wikipedia/WRTKit/Resources/ProgressBar80.png has changed
Binary file Wikipedia/WRTKit/Resources/ProgressBar90.png has changed
Binary file Wikipedia/WRTKit/Resources/ProgressBarUnknown.gif has changed
Binary file Wikipedia/WRTKit/Resources/RadioButton.png has changed
Binary file Wikipedia/WRTKit/Resources/ScrollbarThumbBottom.png has changed
Binary file Wikipedia/WRTKit/Resources/ScrollbarThumbMiddle.png has changed
Binary file Wikipedia/WRTKit/Resources/ScrollbarThumbTop.png has changed
Binary file Wikipedia/WRTKit/Resources/ScrollbarTrackBottom.png has changed
Binary file Wikipedia/WRTKit/Resources/ScrollbarTrackMiddle.png has changed
Binary file Wikipedia/WRTKit/Resources/ScrollbarTrackTop.png has changed
Binary file Wikipedia/WRTKit/Resources/SeparatorCenter.png has changed
Binary file Wikipedia/WRTKit/Resources/SeparatorLeft.png has changed
Binary file Wikipedia/WRTKit/Resources/SeparatorRight.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/WRTKit/Resources/UI-large.css	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,975 @@
+	/*
+� Copyright 2008 Nokia Corporation. All rights reserved.
+
+IMPORTANT:  The kia software ("WRTKit and Example Widget files") is supplied to you by Nokia
+Corporation (�Nokia�) in consideration of your agreement to the following terms. Your use, installation
+and/or redistribution of the WRTKit and Example Widget files constitutes acceptance of these terms. If
+you do not agree with these terms, please do not use, install, or redistribute the WRTKit and Example
+Widget files.
+
+In consideration of your agreement to abide by the following terms, and subject to these terms, Nokia
+grants you a personal, non-exclusive license, under Nokia�s copyrights in the WRTKit and Example
+Widget files, to use, reproduce, and redistribute the WRTKit and Example files, in text form (for HTML,
+CSS, or JavaScript files) or binary form (for associated images), for the sole purpose of creating S60
+Widgets.
+
+If you redistribute the WRTKit and Example files, you must retain this entire notice in all such
+redistributions of the WRTKit and Example files.
+
+You may not use the name, trademarks, service marks or logos of Nokia to endorse or promote products
+that include the WRTKit and Example files without the prior written explicit agreement with Nokia.
+Except as expressly stated in this notice, no other rights or licenses, express or implied, are granted by
+Nokia herein, including but not limited to any patent rights that may be infringed by your products that
+incorporate the WRTKit and Example files or by other works in which the WRTKit and Example files
+may be incorporated.
+
+The WRTKit and Example files are provided on an "AS IS" basis.  NOKIA MAKES NO
+WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
+WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE, REGARDING THE EXAMPLES OR ITS USE AND OPERATION
+ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+
+IN NO EVENT SHALL NOKIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, AND/OR
+DISTRIBUTION OF THE EXAMPLES, HOWEVER CAUSED AND WHETHER UNDER THEORY
+OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE,
+EVEN IF NOKIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+*/
+
+/******************************************************************************/
+/*        Definition of visuals for the WRTKit user interface toolkit         */
+/******************************************************************************/
+
+/* Fix for font size inheritance */
+html, body, div, span, object, iframe, h1, h2, h5, h6, p,
+blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl,
+dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody,
+tfoot, thead, tr, th, td {
+    font-weight: inherit;
+    font-size: inherit;
+    font-family: inherit;
+    font-style: inherit;
+}
+
+
+/******************************************************************************/
+/* Document body rules */
+
+body {
+    margin: 0px;
+    background: url("DocumentBackground.png") repeat;  /* repeat-x fixed; */
+    font: normal 24px Arial, sans-serif;
+    color: rgb(0,0,0);
+}
+
+
+/******************************************************************************/
+/* Override default WRT styling for HTML form controls */
+
+/* Textarea when focused */
+textarea:focus {
+    outline: none;
+}
+
+/* Textarea when hovering */
+textarea:hover {
+    outline: none;
+}
+
+/* Select elements when focused */
+select:focus {
+    outline: none;
+}
+
+/* Select elements when hovering */
+select:hover {
+    outline: none;
+}
+
+/* Input elements when focused */
+input:focus {
+    outline: none;
+}
+
+/* Input elements when hovering */
+input:hover {
+    outline: none;
+}
+
+/* Link elements */
+a {
+    text-decoration: none;
+    color: rgb(0,0,0);
+}
+
+/* Links when focused */
+a:focus {
+    background: none;
+    outline: none;
+}
+
+/* Links when hovering */
+a:hover {
+    background: none;
+    outline: none;
+}
+
+
+/******************************************************************************/
+/* Rules for default view and document scrollbar containers */
+
+/* Default view container rules */
+.ViewContainer {
+    margin: 0px 0px 0px 0px;
+}
+
+/* Default document scrollbar container rules */
+.DocumentScrollbarContainer {
+    position: fixed;
+    right: 0px;
+    top: 0px;
+    height: 100%;
+    width: 7px;
+}
+
+
+/******************************************************************************/
+/* View style rules */
+
+/* Rules for the list view */
+.ListView {
+    margin: 0px 0px 0px 0px;
+}
+
+/* Rules for the list view caption */
+.ListViewCaption {
+    background: url("ListViewCaptionBackground.png");
+    height: 35px;
+}
+
+/* Rules for the list view caption text */
+.ListViewCaptionText {
+    font-size: 1.1em;  
+    font-weight: bold;
+    padding: 7px 0px 0px 11px;
+}
+
+/* Rules for the list view control list element */
+.ListViewControlList {
+    margin: 1px 10px 1px 3px;
+}
+
+
+/******************************************************************************/
+/* Control style rules */
+
+/* Rules for control root element (rootElement) */
+.Control {
+	min-height: 70;
+}
+
+/* Rules for title bar element / right */
+.TitleBarControl {
+	padding: 0px 0px 0px 0px;
+	margin: 0px 0px 0px 0px;
+	min-height: 70;
+	background: url("title.png") no-repeat left top;
+}
+
+/* Control assembly rules (assemblyElement) */
+.ControlAssembly {
+    background: url("ControlAssemblyBackground.png") repeat-x;
+    padding: 1px 5px;
+	min-height: 60;
+}
+
+/* Control assembly in normal state */
+.ControlAssemblyNormal {
+    background-position: 0px 0px;
+}
+
+/* Control assembly in focused state */
+.ControlAssemblyFocus {
+    background-position: 0px -250px;
+}
+
+/* Control assembly in hovering state */
+.ControlAssemblyHover {
+    background-position: 0px -500px;
+}
+
+/* Control assembly in disabled state */
+.ControlAssemblyDisabled {
+    background-position: 0px 0px;
+}
+
+/* Caption for controls (captionElement) */
+.ControlCaption {
+    font-weight: bold;
+    padding: 3px 0px 0px 3px;
+}
+
+/* Caption for controls in normal state */
+.ControlCaptionNormal {
+    
+}
+
+/* Caption for controls when focused */
+.ControlCaptionFocus {
+    color: rgb(0,0,0);
+}
+
+/* Caption for controls when hovering */
+.ControlCaptionHover {
+    
+}
+
+/* Caption for controls when disabled */
+.ControlCaptionDisabled {
+    color: rgb(125,125,125);
+}
+
+/* Control element rules (controlElement) */
+.ControlElement {
+    padding: 3px 3px 3px 3px;
+}
+
+/******************************************************************************/
+/* Label */
+
+/* Rules for the text value of a Label control */
+.LabelText {
+    
+}
+
+/******************************************************************************/
+/* TextPane */
+
+/* Rules for the text value of a TextPane control */
+.TextPane {
+    background: transparent;
+    font: normal 15px Arial, sans-serif;
+}
+
+/******************************************************************************/
+/* ContentPanel */
+
+/* Caption area rules for non-foldable content panels */
+.ContentPanelCaptionNonFoldable {
+    padding: 3px 0px 0px 3px;
+}
+
+/* Caption area rules for foldable content panels */
+.ContentPanelCaptionFoldable {
+    padding: 4px 0px 3px 3px;
+}
+
+/* Rules for fold toggling element in content panel */
+.ContentPanelFoldToggle {
+    background: url("ContentPanelFoldIcons.png") no-repeat;
+    padding-left: 16px;
+}
+
+/* Collapsed fold */
+.ContentPanelFoldToggleCollapsed {
+    background-position: 0px 5px;
+}
+
+/* Expanded fold */
+.ContentPanelFoldToggleExpanded {
+    background-position: 0px -195px;
+}
+
+/* Rules for the content panel caption text */
+.ContentPanelCaptionText {
+    font-weight: bold;
+}
+
+/* Caption text for content panel in normal state */
+.ContentPanelCaptionTextNormal {
+    
+}
+
+/* Caption text for content panel when focused */
+.ContentPanelCaptionTextFocus {
+    color: rgb(0,0,0);
+}
+
+/* Caption text for content panel when hovering */
+.ContentPanelCaptionTextHover {
+    
+}
+
+/* Caption text for content panel when disabled */
+.ContentPanelCaptionTextDisabled {
+    color: rgb(125,125,125);
+}
+
+/* Rules for content in the content panel */
+.ContentPanelContent {
+    padding: 2px 2px 2px 8px;
+	font-size: 15px;
+}
+
+/* Rules for content in the content panel */
+.ContentPanelContent a.hover{
+	background-color: #87CDFF;
+}
+
+/******************************************************************************/
+/* FormButton */
+
+/* Rules for form button */
+.FormButton {
+    
+}
+
+/* Rules for form button control element */
+.FormButtonControlElement {
+    
+}
+
+/* Rules for form button table (table) */
+.FormButtonTable {
+    width: 100%;
+    border-spacing: 0px;
+    padding: 0px;
+    table-layout: fixed;
+}
+
+/* Form button row (tr) */
+.FormButtonRow {
+    padding: 0px;
+}
+
+/* Rules for form button left cell (td) */
+.FormButtonLeftCell {
+    width: 8px;
+    height: 60px;
+    background: url("FormButtonLeftLarge.png") no-repeat;
+    padding: 0px;
+}
+
+/* Rules for form button center cell (td) */
+.FormButtonCenterCell {
+    height: 60px;
+    background: url("FormButtonCenterLarge.png") repeat-x;
+    padding: 0px;
+    vertical-align: middle;
+    text-align: center;
+}
+
+/* Rules for form button right cell (td) */
+.FormButtonRightCell {
+    width: 8px;
+    height: 60px;
+    background: url("FormButtonRightLarge.png") no-repeat;
+    padding: 0px;
+}
+
+/* Rules for form button left cell in normal state (td) */
+.FormButtonLeftCellNormal {
+    background-position: 0px 0px;
+}
+
+/* Rules for form button left cell in focused state (td) */
+.FormButtonLeftCellFocus {
+    background-position: 0px -120px;
+}
+
+/* Rules for form button left cell in hover state (td) */
+.FormButtonLeftCellHover {
+    background-position: 0px -240px;
+}
+
+/* Rules for form button left cell in disabled state (td) */
+.FormButtonLeftCellDisabled {
+    background-position: 0px -360px;
+}
+
+/* Rules for form button center cell in normal state (td) */
+.FormButtonCenterCellNormal {
+    background-position: 0px 0px;
+}
+
+/* Rules for form button center cell in focused state (td) */
+.FormButtonCenterCellFocus {
+    background-position: 0px -120px;
+}
+
+/* Rules for form button center cell in hover state (td) */
+.FormButtonCenterCellHover {
+    background-position: 0px -240px;
+}
+
+/* Rules for form button center cell in disabled state (td) */
+.FormButtonCenterCellDisabled {
+    background-position: 0px -360px;
+}
+
+/* Rules for form button left cell in normal state (td) */
+.FormButtonRightCellNormal {
+    background-position: 0px 0px;
+}
+
+/* Rules for form button left cell in focused state (td) */
+.FormButtonRightCellFocus {
+    background-position: 0px -120px;
+}
+
+/* Rules for form button left cell in hover state (td) */
+.FormButtonRightCellHover {
+    background-position: 0px -240px;
+}
+
+/* Rules for form button left cell in disabled state (td) */
+.FormButtonRightCellDisabled {
+    background-position: 0px -360px;
+}
+
+/* Rules for form button text */
+.FormButtonText {
+    font-weight: bold;
+}
+
+/* Form button text in normal state */
+.FormButtonTextNormal {
+    color: rgb(255,255,255);
+}
+
+/* Form button text when focused */
+.FormButtonTextFocus {
+    color: rgb(255,255,255);
+}
+
+/* Form button text when hovering */
+.FormButtonTextHover {
+    color: rgb(255,255,255);
+}
+
+/* Form button text when disabled */
+.FormButtonTextDisabled {
+    color: rgb(200,200,200);
+}
+
+
+/******************************************************************************/
+/* NavigationButton */
+
+/* Rules for navigation button */
+.NavigationButton {
+    min-height: 50px;
+}
+
+/* Rules for navigation button control element */
+.NavigationButtonControlElement {
+    padding: 3px 3px 3px 3px;
+}
+
+/* Rules for navigation button table (table) */
+.NavigationButtonTable {
+    border-spacing: 0px;
+    padding: 0px;
+}
+
+/* Navigation button row (tr) */
+.NavigationButtonRow {
+    padding: 0px;
+}
+
+/* Rules for navigation button image cell (td) */
+.NavigationButtonImageCell {
+    line-height: 1px;
+    font-size: 1px;
+    vertical-align: middle;
+}
+
+/* Rules for navigation button text cell (td) */
+.NavigationButtonTextCell {
+    vertical-align: middle;
+    padding: 0px;
+}
+
+/* Rules for navigation button image */
+.NavigationButtonImage {
+    padding: 0px 5px 0px 0px;
+}
+
+/* Rules for navigation button text */
+.NavigationButtonText {
+    font-weight: bold;
+}
+
+/* Navigation button text in normal state */
+.NavigationButtonTextNormal {
+    
+}
+
+/* Navigation button text when focused */
+.NavigationButtonTextFocus {
+    color: rgb(0,0,0);
+}
+
+/* Navigation button text when hovering */
+.NavigationButtonTextHover {
+    
+}
+
+/* Navigation button text when disabled */
+.NavigationButtonTextDisabled {
+    color: rgb(125,125,125);
+}
+
+
+/******************************************************************************/
+/* TextField */
+
+/* Rules for textField */
+.TextField {
+    width: 100%;
+	min-height: 50px;
+    border: 1px solid rgb(0,0,0);
+    background: rgb(255,255,255);
+    margin: 0px 0px 3px 0px;
+}
+
+/* TextField in normal state */
+.TextFieldNormal {
+    
+}
+
+/* TextField in focus state */
+.TextFieldFocus {
+    
+}
+
+/* TextField in hover state */
+.TextFieldHover {
+    
+}
+
+/* TextField in disabled state */
+.TextFieldDisabled {
+    color: rgb(50,50,50);
+    background: rgb(200,200,200);
+}
+
+
+/******************************************************************************/
+/* TextArea */
+
+/* Rules for TextArea */
+.TextArea {
+    width: 100%;
+    border: 1px solid rgb(0,0,0);
+    background: rgb(255,255,255);
+    margin: 0px 0px 3px 0px;
+}
+
+/* TextArea in normal state */
+.TextAreaNormal {
+    
+}
+
+/* TextArea in focus state */
+.TextAreaFocus {
+    
+}
+
+/* TextArea in hover state */
+.TextAreaHover {
+    
+}
+
+/* TextArea in disabled state */
+.TextAreaDisabled {
+    color: rgb(50,50,50);
+    background: rgb(200,200,200);
+}
+
+
+/******************************************************************************/
+/* Separator */
+
+/* Rules for Separator (table) */
+.Separator {
+    width: 100%;
+    padding: 0px;
+    border-spacing: 0px;
+    table-layout: fixed;
+    margin: 3px 0px;
+}
+
+/* Separator row (tr) */
+.SeparatorRow {
+    padding: 0px;
+}
+
+/* Separator left cell (td) */
+.SeparatorLeftCell {
+    width: 5px;
+    height: 2px;
+    background: url("SeparatorLeft.png") no-repeat;
+    padding: 0px;
+}
+
+/* Separator center cell (td) */
+.SeparatorCenterCell {
+    height: 2px;
+    background: url("SeparatorCenter.png") repeat-x;
+    padding: 0px;
+}
+
+/* Separator right cell (td) */
+.SeparatorRightCell {
+    width: 6px;
+    height: 2px;
+    background: url("SeparatorRight.png") no-repeat;
+    padding: 0px;
+}
+
+
+/******************************************************************************/
+/* SelectionMenu */
+
+/* Rules for SelectionMenu select element */
+.SelectionMenu {
+    width: 100%;
+    border: 1px solid rgb(0,0,0);
+    background: rgb(255,255,255);
+    margin: 0px 0px 3px 0px;
+}
+
+/* SelectionMenu in normal state */
+.SelectionMenuNormal {
+    
+}
+
+/* SelectionMenu in focus state */
+.SelectionMenuFocus {
+    
+}
+
+/* SelectionMenu in hover state */
+.SelectionMenuHover {
+    
+}
+
+/* SelectionMenu in disabled state */
+.SelectionMenuDisabled {
+    color: rgb(50,50,50);
+    background: rgb(200,200,200);
+}
+
+/* Rules for SelectionMenu option elements */
+.SelectionMenuOption {
+	min-height: 60;
+    background: rgb(255,255,255);
+}
+
+/* SelectionMenu option in normal state */
+.SelectionMenuOptionNormal {
+    
+}
+
+/* SelectionMenu option in focus state */
+.SelectionMenuOptionFocus {
+    
+}
+
+/* SelectionMenu option in hover state */
+.SelectionMenuOptionHover {
+    
+}
+
+/* SelectionMenu option in disabled state */
+.SelectionMenuOptionDisabled {
+    color: rgb(50,50,50);
+    background: rgb(200,200,200);
+}
+
+
+/******************************************************************************/
+/* SelectionList */
+
+/* SelectionList option list element */
+.SelectionList {
+    
+}
+
+/* SelectionList option list element in normal state */
+.SelectionListNormal {
+    
+}
+
+/* SelectionList option list element in focus state */
+.SelectionListFocus {
+    
+}
+
+/* SelectionList option list element in hover state */
+.SelectionListHover {
+    
+}
+
+/* SelectionList option list element in disabled state */
+.SelectionListDisabled {
+    
+}
+
+/* SelectionList option element in single selection mode */
+.SelectionListOptionSingle {
+    padding-left: 19px;
+    background: url("RadioButton.png") no-repeat;
+    min-height: 50px;
+}
+
+/* SelectionList option element in single selection mode, unchecked normal state */
+.SelectionListOptionSingleUncheckedNormal {
+    background-position: 0px 10px;
+}
+
+/* SelectionList option element in single selection mode, unchecked focus state */
+.SelectionListOptionSingleUncheckedFocus {
+    background-position: 0px -40px;
+}
+
+/* SelectionList option element in single selection mode, unchecked diabled state */
+.SelectionListOptionSingleUncheckedDisabled {
+    background-position: 0px -90px;
+}
+
+/* SelectionList option element in single selection mode, checked normal state */
+.SelectionListOptionSingleCheckedNormal {
+    background-position: 0px -140px;
+}
+
+/* SelectionList option element in single selection mode, checked focus state */
+.SelectionListOptionSingleCheckedFocus {
+    background-position: 0px -190px;
+}
+
+/* SelectionList option element in single selection mode, checked diabled state */
+.SelectionListOptionSingleCheckedDisabled {
+    background-position: 0px -240px;
+}
+
+/* SelectionList option element in multi selection mode */
+.SelectionListOptionMulti {
+    padding-left: 19px;
+    background: url("CheckBox.png") no-repeat;
+    min-height: 50px;
+}
+
+/* SelectionList option element in multi selection mode, unchecked normal state */
+.SelectionListOptionMultiUncheckedNormal {
+    background-position: 0px 0px;
+}
+
+/* SelectionList option element in multi selection mode, unchecked focus state */
+.SelectionListOptionMultiUncheckedFocus {
+    background-position: 0px -50px;
+}
+
+/* SelectionList option element in multi selection mode, unchecked diabled state */
+.SelectionListOptionMultiUncheckedDisabled {
+    background-position: 0px -100px;
+}
+
+/* SelectionList option element in multi selection mode, checked normal state */
+.SelectionListOptionMultiCheckedNormal {
+    background-position: 0px -150px;
+}
+
+/* SelectionList option element in multi selection mode, checked focus state */
+.SelectionListOptionMultiCheckedFocus {
+    background-position: 0px -200px;
+}
+
+/* SelectionList option element in multi selection mode, checked diabled state */
+.SelectionListOptionMultiCheckedDisabled {
+    background-position: 0px -250px;
+}
+
+/* SelectionList option text */
+.SelectionListOptionText {
+    
+}
+
+/* SelectionList option text in normal state */
+.SelectionListOptionTextNormal {
+    
+}
+
+/* SelectionList option text in focus state */
+.SelectionListOptionTextFocus {
+    color: rgb(0,0,0);
+}
+
+/* SelectionList option text in hover state */
+.SelectionListOptionTextHover {
+    
+}
+
+/* SelectionList option text in disabled state */
+.SelectionListOptionTextDisabled {
+    color: rgb(125,125,125);
+}
+
+
+/******************************************************************************/
+/* Scrollbar */
+
+/* Scrollbar root element */
+.Scrollbar {
+    position: absolute;
+    height: 100%;
+    width: 7px;
+}
+
+/* Top portion of scrollbar track */
+.ScrollbarTrackTop {
+    position: absolute;
+    background: url("ScrollbarTrackTop.png") no-repeat;
+    width: 7px;
+    height: 4px;
+}
+
+/* Middle portion of scrollbar track */
+.ScrollbarTrackMiddle {
+    position: absolute;
+    background: url("ScrollbarTrackMiddle.png") repeat-y;
+    width: 7px;
+}
+
+/* Bottom portion of scrollbar track */
+.ScrollbarTrackBottom {
+    position: absolute;
+    background: url("ScrollbarTrackBottom.png") no-repeat;
+    width: 7px;
+    height: 4px;
+}
+
+/* Top portion of scrollbar thumb */
+.ScrollbarThumbTop {
+    position: absolute;
+    background: url("ScrollbarThumbTop.png") no-repeat;
+    width: 7px;
+    height: 5px;
+}
+
+/* Middle portion of scrollbar thumb */
+.ScrollbarThumbMiddle {
+    position: absolute;
+    background: url("ScrollbarThumbMiddle.png") repeat-y;
+    width: 7px;
+}
+
+/* Bottom portion of scrollbar thumb */
+.ScrollbarThumbBottom {
+    position: absolute;
+    background: url("ScrollbarThumbBottom.png") no-repeat;
+    width: 7px;
+    height: 5px;
+}
+
+
+/******************************************************************************/
+/* NotificationPopup */
+
+/* Container that defines the area for the popup dialog */
+.NotificationPopupContainer {
+    position: fixed;
+    bottom: 0px;
+    left: 50%;
+    margin-left: -115px;
+    width: 230px;
+    height: 85px;
+}
+
+/* Notification popup dialog */
+.NotificationPopup {
+    position: absolute;
+    width: 230px;
+    height: 85px;
+    background: url("NotificationPopupBackground.png") repeat-x;
+    border: 1px solid rgb(0,0,0);
+}
+
+/* Notification type indicator */
+.NotificationPopupTypeIndicator {
+    position: absolute;
+    left: 195px;
+    top: 10px;
+    width: 24px;
+    height: 34px;
+    background: url("NotificationPopupTypeIndicator.png") no-repeat;
+}
+
+/* Notification type indicator for notifications of undefined type */
+.NotificationPopupTypeIndicatorNone {
+    background-position: 0px 0px;
+}
+
+/* Notification type indicator for info notifications */
+.NotificationPopupTypeIndicatorInfo {
+    background-position: 0px -50px;
+}
+
+/* Notification type indicator for warning notifications */
+.NotificationPopupTypeIndicatorWarning {
+    background-position: 0px -100px;
+}
+
+/* Notification type indicator for wait notifications */
+.NotificationPopupTypeIndicatorWait {
+    background-position: 0px -150px;
+}
+
+/* Notification text area */
+.NotificationPopupText {
+    position: absolute;
+    left: 10px;
+    top: 8px;
+    width: 180px;
+    height: 50px;
+}
+
+/* Progress bar */
+.NotificationPopupProgressBar {
+    position: absolute;
+    left: 6px;
+    top: 60px;
+    width: 218px;
+    height: 16px;
+}
+
+
+table.historytable {
+	width: 99%;
+}
+table.historytable,
+table.historytable tbody,
+table.historytable tr,
+table.historytable th,
+table.historytable td {
+	border-bottom:1px solid #AAAAAA;
+	border-collapse:collapse;
+	border-spacing:1px;
+	border-top:1px solid #AAAAAA;
+	clear:both;
+	margin-bottom:2px;
+	padding-top: 3px;
+	padding-bottom: 3px;
+}
+
+table.historytable th {
+	font-weight: bold;	
+}
+
+.language {
+	font-size: 1.2em;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/WRTKit/Resources/UI.css	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,963 @@
+	/*
+� Copyright 2008 Nokia Corporation. All rights reserved.
+
+IMPORTANT:  The Nokia software ("WRTKit and Example Widget files") is supplied to you by Nokia
+Corporation (�Nokia�) in consideration of your agreement to the following terms. Your use, installation
+and/or redistribution of the WRTKit and Example Widget files constitutes acceptance of these terms. If
+you do not agree with these terms, please do not use, install, or redistribute the WRTKit and Example
+Widget files.
+
+In consideration of your agreement to abide by the following terms, and subject to these terms, Nokia
+grants you a personal, non-exclusive license, under Nokia�s copyrights in the WRTKit and Example
+Widget files, to use, reproduce, and redistribute the WRTKit and Example files, in text form (for HTML,
+CSS, or JavaScript files) or binary form (for associated images), for the sole purpose of creating S60
+Widgets.
+
+If you redistribute the WRTKit and Example files, you must retain this entire notice in all such
+redistributions of the WRTKit and Example files.
+
+You may not use the name, trademarks, service marks or logos of Nokia to endorse or promote products
+that include the WRTKit and Example files without the prior written explicit agreement with Nokia.
+Except as expressly stated in this notice, no other rights or licenses, express or implied, are granted by
+Nokia herein, including but not limited to any patent rights that may be infringed by your products that
+incorporate the WRTKit and Example files or by other works in which the WRTKit and Example files
+may be incorporated.
+
+The WRTKit and Example files are provided on an "AS IS" basis.  NOKIA MAKES NO
+WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
+WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE, REGARDING THE EXAMPLES OR ITS USE AND OPERATION
+ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+
+IN NO EVENT SHALL NOKIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, AND/OR
+DISTRIBUTION OF THE EXAMPLES, HOWEVER CAUSED AND WHETHER UNDER THEORY
+OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE,
+EVEN IF NOKIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+*/
+
+/******************************************************************************/
+/*        Definition of visuals for the WRTKit user interface toolkit         */
+/******************************************************************************/
+
+/* Fix for font size inheritance */
+html, body, div, span, object, iframe, h1, h2, h5, h6, p,
+blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl,
+dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody,
+tfoot, thead, tr, th, td {
+    font-weight: inherit;
+    font-style: inherit;
+    font-size: 100%;
+    font-family: inherit;
+}
+
+
+/******************************************************************************/
+/* Document body rules */
+
+body {
+    margin: 0px;
+    background: url("DocumentBackground.png") repeat;  /* repeat-x fixed; */
+    font: normal 14px Arial, sans-serif;
+    color: rgb(0,0,0);
+}
+
+
+/******************************************************************************/
+/* Override default WRT styling for HTML form controls */
+
+/* Textarea when focused */
+textarea:focus {
+    outline: none;
+}
+
+/* Textarea when hovering */
+textarea:hover {
+    outline: none;
+}
+
+/* Select elements when focused */
+select:focus {
+    outline: none;
+}
+
+/* Select elements when hovering */
+select:hover {
+    outline: none;
+}
+
+/* Input elements when focused */
+input:focus {
+    outline: none;
+}
+
+/* Input elements when hovering */
+input:hover {
+    outline: none;
+}
+
+/* Link elements */
+a {
+    text-decoration: none;
+    color: rgb(0,0,0);
+}
+
+/* Links when focused */
+a:focus {
+    background: none;
+    outline: none;
+}
+
+/* Links when hovering */
+a:hover {
+    background: none;
+    outline: none;
+}
+
+
+/******************************************************************************/
+/* Rules for default view and document scrollbar containers */
+
+/* Default view container rules */
+.ViewContainer {
+    margin: 0px 0px 0px 0px;
+}
+
+/* Default document scrollbar container rules */
+.DocumentScrollbarContainer {
+    position: fixed;
+    right: 0px;
+    top: 0px;
+    height: 100%;
+    width: 7px;
+}
+
+
+/******************************************************************************/
+/* View style rules */
+
+/* Rules for the list view */
+.ListView {
+    margin: 0px 0px 0px 0px;
+}
+
+/* Rules for the list view caption */
+.ListViewCaption {
+    background: url("ListViewCaptionBackground.png");
+    height: 35px;
+}
+
+/* Rules for the list view caption text */
+.ListViewCaptionText {
+    font-size: 1.2em;
+    font-weight: bold;
+    padding: 7px 0px 0px 11px;
+}
+
+/* Rules for the list view control list element */
+.ListViewControlList {
+    margin: 1px 10px 1px 3px;
+}
+
+
+/******************************************************************************/
+/* Control style rules */
+
+/* Rules for control root element (rootElement) */
+.Control {
+
+}
+
+/* Rules for title bar element / right */
+.TitleBarControl {
+	padding: 0px 0px;
+	margin: 0px 0px;
+	min-height: 40;
+	background: url("title-small.png") no-repeat left top;
+}
+
+/* Control assembly rules (assemblyElement) */
+.ControlAssembly {
+    background: url("ControlAssemblyBackground.png") repeat-x;
+    padding: 1px 5px;
+}
+
+/* Control assembly in normal state */
+.ControlAssemblyNormal {
+    background-position: 0px 0px;
+}
+
+/* Control assembly in focused state */
+.ControlAssemblyFocus {
+    background-position: 0px -250px;
+}
+
+/* Control assembly in hovering state */
+.ControlAssemblyHover {
+    background-position: 0px -500px;
+}
+
+/* Control assembly in disabled state */
+.ControlAssemblyDisabled {
+    background-position: 0px 0px;
+}
+
+/* Caption for controls (captionElement) */
+.ControlCaption {
+    font-weight: bold;
+    padding: 3px 0px 0px 3px;
+}
+
+/* Caption for controls in normal state */
+.ControlCaptionNormal {
+    
+}
+
+/* Caption for controls when focused */
+.ControlCaptionFocus {
+    color: rgb(0,0,0);
+}
+
+/* Caption for controls when hovering */
+.ControlCaptionHover {
+    
+}
+
+/* Caption for controls when disabled */
+.ControlCaptionDisabled {
+    color: rgb(125,125,125);
+}
+
+/* Control element rules (controlElement) */
+.ControlElement {
+    padding: 3px 3px 3px 3px;
+}
+
+/******************************************************************************/
+/* Label */
+
+/* Rules for the text value of a Label control */
+.LabelText {
+    
+}
+
+/******************************************************************************/
+/* TextPane */
+
+/* Rules for the text value of a TextPane control */
+.TextPane {
+    background: transparent;
+    font: normal 14px Arial, sans-serif;
+}
+
+/******************************************************************************/
+/* ContentPanel */
+
+/* Caption area rules for non-foldable content panels */
+.ContentPanelCaptionNonFoldable {
+    padding: 3px 0px 0px 3px;
+}
+
+/* Caption area rules for foldable content panels */
+.ContentPanelCaptionFoldable {
+    padding: 4px 0px 3px 3px;
+}
+
+/* Rules for fold toggling element in content panel */
+.ContentPanelFoldToggle {
+    background: url("ContentPanelFoldIcons.png") no-repeat;
+    padding-left: 16px;
+}
+
+/* Collapsed fold */
+.ContentPanelFoldToggleCollapsed {
+    background-position: 0px 0px;
+}
+
+/* Expanded fold */
+.ContentPanelFoldToggleExpanded {
+    background-position: 0px -200px;
+}
+
+/* Rules for the content panel caption text */
+.ContentPanelCaptionText {
+    font-weight: bold;
+}
+
+/* Caption text for content panel in normal state */
+.ContentPanelCaptionTextNormal {
+    
+}
+
+/* Caption text for content panel when focused */
+.ContentPanelCaptionTextFocus {
+    color: rgb(0,0,0);
+}
+
+/* Caption text for content panel when hovering */
+.ContentPanelCaptionTextHover {
+    
+}
+
+/* Caption text for content panel when disabled */
+.ContentPanelCaptionTextDisabled {
+    color: rgb(125,125,125);
+}
+
+/* Rules for content in the content panel */
+.ContentPanelContent {
+    padding: 2px 2px 2px 8px;
+}
+
+/* Rules for content in the content panel */
+.ContentPanelContent a.hover{
+	background-color: #87CDFF;
+}
+
+/******************************************************************************/
+/* FormButton */
+
+/* Rules for form button */
+.FormButton {
+    
+}
+
+/* Rules for form button control element */
+.FormButtonControlElement {
+    
+}
+
+/* Rules for form button table (table) */
+.FormButtonTable {
+    width: 100%;
+    border-spacing: 0px;
+    padding: 0px;
+    table-layout: fixed;
+}
+
+/* Form button row (tr) */
+.FormButtonRow {
+    padding: 0px;
+}
+
+/* Rules for form button left cell (td) */
+.FormButtonLeftCell {
+    width: 8px;
+    height: 26px;
+    background: url("FormButtonLeft.png") no-repeat;
+    padding: 0px;
+}
+
+/* Rules for form button center cell (td) */
+.FormButtonCenterCell {
+    height: 26px;
+    background: url("FormButtonCenter.png") repeat-x;
+    padding: 0px;
+    vertical-align: middle;
+    text-align: center;
+}
+
+/* Rules for form button right cell (td) */
+.FormButtonRightCell {
+    width: 8px;
+    height: 26px;
+    background: url("FormButtonRight.png") no-repeat;
+    padding: 0px;
+}
+
+/* Rules for form button left cell in normal state (td) */
+.FormButtonLeftCellNormal {
+    background-position: 0px 0px;
+}
+
+/* Rules for form button left cell in focused state (td) */
+.FormButtonLeftCellFocus {
+    background-position: 0px -50px;
+}
+
+/* Rules for form button left cell in hover state (td) */
+.FormButtonLeftCellHover {
+    background-position: 0px -100px;
+}
+
+/* Rules for form button left cell in disabled state (td) */
+.FormButtonLeftCellDisabled {
+    background-position: 0px -150px;
+}
+
+/* Rules for form button center cell in normal state (td) */
+.FormButtonCenterCellNormal {
+    background-position: 0px 0px;
+}
+
+/* Rules for form button center cell in focused state (td) */
+.FormButtonCenterCellFocus {
+    background-position: 0px -50px;
+}
+
+/* Rules for form button center cell in hover state (td) */
+.FormButtonCenterCellHover {
+    background-position: 0px -100px;
+}
+
+/* Rules for form button center cell in disabled state (td) */
+.FormButtonCenterCellDisabled {
+    background-position: 0px -150px;
+}
+
+/* Rules for form button left cell in normal state (td) */
+.FormButtonRightCellNormal {
+    background-position: 0px 0px;
+}
+
+/* Rules for form button left cell in focused state (td) */
+.FormButtonRightCellFocus {
+    background-position: 0px -50px;
+}
+
+/* Rules for form button left cell in hover state (td) */
+.FormButtonRightCellHover {
+    background-position: 0px -100px;
+}
+
+/* Rules for form button left cell in disabled state (td) */
+.FormButtonRightCellDisabled {
+    background-position: 0px -150px;
+}
+
+/* Rules for form button text */
+.FormButtonText {
+    font-weight: bold;
+}
+
+/* Form button text in normal state */
+.FormButtonTextNormal {
+    color: rgb(255,255,255);
+}
+
+/* Form button text when focused */
+.FormButtonTextFocus {
+    color: rgb(255,255,255);
+}
+
+/* Form button text when hovering */
+.FormButtonTextHover {
+    color: rgb(255,255,255);
+}
+
+/* Form button text when disabled */
+.FormButtonTextDisabled {
+    color: rgb(200,200,200);
+}
+
+
+/******************************************************************************/
+/* NavigationButton */
+
+/* Rules for navigation button */
+.NavigationButton {
+    
+}
+
+/* Rules for navigation button control element */
+.NavigationButtonControlElement {
+    padding: 3px 3px 3px 3px;
+}
+
+/* Rules for navigation button table (table) */
+.NavigationButtonTable {
+    border-spacing: 0px;
+    padding: 0px;
+}
+
+/* Navigation button row (tr) */
+.NavigationButtonRow {
+    padding: 0px;
+}
+
+/* Rules for navigation button image cell (td) */
+.NavigationButtonImageCell {
+    line-height: 1px;
+    font-size: 1px;
+    vertical-align: middle;
+}
+
+/* Rules for navigation button text cell (td) */
+.NavigationButtonTextCell {
+    vertical-align: middle;
+    padding: 0px;
+}
+
+/* Rules for navigation button image */
+.NavigationButtonImage {
+    padding: 0px 5px 0px 0px;
+}
+
+/* Rules for navigation button text */
+.NavigationButtonText {
+    font-weight: bold;
+}
+
+/* Navigation button text in normal state */
+.NavigationButtonTextNormal {
+    
+}
+
+/* Navigation button text when focused */
+.NavigationButtonTextFocus {
+    color: rgb(0,0,0);
+}
+
+/* Navigation button text when hovering */
+.NavigationButtonTextHover {
+    
+}
+
+/* Navigation button text when disabled */
+.NavigationButtonTextDisabled {
+    color: rgb(125,125,125);
+}
+
+
+/******************************************************************************/
+/* TextField */
+
+/* Rules for textField */
+.TextField {
+    width: 100%;
+    border: 1px solid rgb(0,0,0);
+    background: rgb(255,255,255);
+    margin: 0px 0px 3px 0px;
+}
+
+/* TextField in normal state */
+.TextFieldNormal {
+    
+}
+
+/* TextField in focus state */
+.TextFieldFocus {
+    
+}
+
+/* TextField in hover state */
+.TextFieldHover {
+    
+}
+
+/* TextField in disabled state */
+.TextFieldDisabled {
+    color: rgb(50,50,50);
+    background: rgb(200,200,200);
+}
+
+/******************************************************************************/
+/* TextArea */
+
+/* Rules for TextArea */
+.TextArea {
+    width: 100%;
+    border: 1px solid rgb(0,0,0);
+    background: rgb(255,255,255);
+    margin: 0px 0px 3px 0px;
+}
+
+/* TextArea in normal state */
+.TextAreaNormal {
+    
+}
+
+/* TextArea in focus state */
+.TextAreaFocus {
+    
+}
+
+/* TextArea in hover state */
+.TextAreaHover {
+    
+}
+
+/* TextArea in disabled state */
+.TextAreaDisabled {
+    color: rgb(50,50,50);
+    background: rgb(200,200,200);
+}
+
+
+/******************************************************************************/
+/* Separator */
+
+/* Rules for Separator (table) */
+.Separator {
+    width: 100%;
+    padding: 0px;
+    border-spacing: 0px;
+    table-layout: fixed;
+    margin: 3px 0px;
+}
+
+/* Separator row (tr) */
+.SeparatorRow {
+    padding: 0px;
+}
+
+/* Separator left cell (td) */
+.SeparatorLeftCell {
+    width: 5px;
+    height: 2px;
+    background: url("SeparatorLeft.png") no-repeat;
+    padding: 0px;
+}
+
+/* Separator center cell (td) */
+.SeparatorCenterCell {
+    height: 2px;
+    background: url("SeparatorCenter.png") repeat-x;
+    padding: 0px;
+}
+
+/* Separator right cell (td) */
+.SeparatorRightCell {
+    width: 6px;
+    height: 2px;
+    background: url("SeparatorRight.png") no-repeat;
+    padding: 0px;
+}
+
+
+/******************************************************************************/
+/* SelectionMenu */
+
+/* Rules for SelectionMenu select element */
+.SelectionMenu {
+    width: 100%;
+    border: 1px solid rgb(0,0,0);
+    background: rgb(255,255,255);
+    margin: 0px 0px 3px 0px;
+}
+
+/* SelectionMenu in normal state */
+.SelectionMenuNormal {
+    
+}
+
+/* SelectionMenu in focus state */
+.SelectionMenuFocus {
+    
+}
+
+/* SelectionMenu in hover state */
+.SelectionMenuHover {
+    
+}
+
+/* SelectionMenu in disabled state */
+.SelectionMenuDisabled {
+    color: rgb(50,50,50);
+    background: rgb(200,200,200);
+}
+
+/* Rules for SelectionMenu option elements */
+.SelectionMenuOption {
+    background: rgb(255,255,255);
+}
+
+/* SelectionMenu option in normal state */
+.SelectionMenuOptionNormal {
+    
+}
+
+/* SelectionMenu option in focus state */
+.SelectionMenuOptionFocus {
+    
+}
+
+/* SelectionMenu option in hover state */
+.SelectionMenuOptionHover {
+    
+}
+
+/* SelectionMenu option in disabled state */
+.SelectionMenuOptionDisabled {
+    color: rgb(50,50,50);
+    background: rgb(200,200,200);
+}
+
+
+/******************************************************************************/
+/* SelectionList */
+
+/* SelectionList option list element */
+.SelectionList {
+    
+}
+
+/* SelectionList option list element in normal state */
+.SelectionListNormal {
+    
+}
+
+/* SelectionList option list element in focus state */
+.SelectionListFocus {
+    
+}
+
+/* SelectionList option list element in hover state */
+.SelectionListHover {
+    
+}
+
+/* SelectionList option list element in disabled state */
+.SelectionListDisabled {
+    
+}
+
+/* SelectionList option element in single selection mode */
+.SelectionListOptionSingle {
+    padding-left: 19px;
+    background: url("RadioButton.png") no-repeat;
+    height: 25px;
+}
+
+/* SelectionList option element in single selection mode, unchecked normal state */
+.SelectionListOptionSingleUncheckedNormal {
+    background-position: 0px 0px;
+}
+
+/* SelectionList option element in single selection mode, unchecked focus state */
+.SelectionListOptionSingleUncheckedFocus {
+    background-position: 0px -50px;
+}
+
+/* SelectionList option element in single selection mode, unchecked diabled state */
+.SelectionListOptionSingleUncheckedDisabled {
+    background-position: 0px -100px;
+}
+
+/* SelectionList option element in single selection mode, checked normal state */
+.SelectionListOptionSingleCheckedNormal {
+    background-position: 0px -150px;
+}
+
+/* SelectionList option element in single selection mode, checked focus state */
+.SelectionListOptionSingleCheckedFocus {
+    background-position: 0px -200px;
+}
+
+/* SelectionList option element in single selection mode, checked diabled state */
+.SelectionListOptionSingleCheckedDisabled {
+    background-position: 0px -250px;
+}
+
+/* SelectionList option element in multi selection mode */
+.SelectionListOptionMulti {
+    padding-left: 19px;
+    background: url("CheckBox.png") no-repeat;
+    height: 25px;
+}
+
+/* SelectionList option element in multi selection mode, unchecked normal state */
+.SelectionListOptionMultiUncheckedNormal {
+    background-position: 0px 0px;
+}
+
+/* SelectionList option element in multi selection mode, unchecked focus state */
+.SelectionListOptionMultiUncheckedFocus {
+    background-position: 0px -50px;
+}
+
+/* SelectionList option element in multi selection mode, unchecked diabled state */
+.SelectionListOptionMultiUncheckedDisabled {
+    background-position: 0px -100px;
+}
+
+/* SelectionList option element in multi selection mode, checked normal state */
+.SelectionListOptionMultiCheckedNormal {
+    background-position: 0px -150px;
+}
+
+/* SelectionList option element in multi selection mode, checked focus state */
+.SelectionListOptionMultiCheckedFocus {
+    background-position: 0px -200px;
+}
+
+/* SelectionList option element in multi selection mode, checked diabled state */
+.SelectionListOptionMultiCheckedDisabled {
+    background-position: 0px -250px;
+}
+
+/* SelectionList option text */
+.SelectionListOptionText {
+    
+}
+
+/* SelectionList option text in normal state */
+.SelectionListOptionTextNormal {
+    
+}
+
+/* SelectionList option text in focus state */
+.SelectionListOptionTextFocus {
+    color: rgb(0,0,0);
+}
+
+/* SelectionList option text in hover state */
+.SelectionListOptionTextHover {
+    
+}
+
+/* SelectionList option text in disabled state */
+.SelectionListOptionTextDisabled {
+    color: rgb(125,125,125);
+}
+
+
+/******************************************************************************/
+/* Scrollbar */
+
+/* Scrollbar root element */
+.Scrollbar {
+    position: absolute;
+    height: 100%;
+    width: 7px;
+}
+
+/* Top portion of scrollbar track */
+.ScrollbarTrackTop {
+    position: absolute;
+    background: url("ScrollbarTrackTop.png") no-repeat;
+    width: 7px;
+    height: 4px;
+}
+
+/* Middle portion of scrollbar track */
+.ScrollbarTrackMiddle {
+    position: absolute;
+    background: url("ScrollbarTrackMiddle.png") repeat-y;
+    width: 7px;
+}
+
+/* Bottom portion of scrollbar track */
+.ScrollbarTrackBottom {
+    position: absolute;
+    background: url("ScrollbarTrackBottom.png") no-repeat;
+    width: 7px;
+    height: 4px;
+}
+
+/* Top portion of scrollbar thumb */
+.ScrollbarThumbTop {
+    position: absolute;
+    background: url("ScrollbarThumbTop.png") no-repeat;
+    width: 7px;
+    height: 5px;
+}
+
+/* Middle portion of scrollbar thumb */
+.ScrollbarThumbMiddle {
+    position: absolute;
+    background: url("ScrollbarThumbMiddle.png") repeat-y;
+    width: 7px;
+}
+
+/* Bottom portion of scrollbar thumb */
+.ScrollbarThumbBottom {
+    position: absolute;
+    background: url("ScrollbarThumbBottom.png") no-repeat;
+    width: 7px;
+    height: 5px;
+}
+
+
+/******************************************************************************/
+/* NotificationPopup */
+
+/* Container that defines the area for the popup dialog */
+.NotificationPopupContainer {
+    position: fixed;
+    bottom: 0px;
+    left: 50%;
+    margin-left: -115px;
+    width: 230px;
+    height: 85px;
+}
+
+/* Notification popup dialog */
+.NotificationPopup {
+    position: absolute;
+    width: 230px;
+    height: 85px;
+    background: url("NotificationPopupBackground.png") repeat-x;
+    border: 1px solid rgb(0,0,0);
+}
+
+/* Notification type indicator */
+.NotificationPopupTypeIndicator {
+    position: absolute;
+    left: 195px;
+    top: 10px;
+    width: 24px;
+    height: 34px;
+    background: url("NotificationPopupTypeIndicator.png") no-repeat;
+}
+
+/* Notification type indicator for notifications of undefined type */
+.NotificationPopupTypeIndicatorNone {
+    background-position: 0px 0px;
+}
+
+/* Notification type indicator for info notifications */
+.NotificationPopupTypeIndicatorInfo {
+    background-position: 0px -50px;
+}
+
+/* Notification type indicator for warning notifications */
+.NotificationPopupTypeIndicatorWarning {
+    background-position: 0px -100px;
+}
+
+/* Notification type indicator for wait notifications */
+.NotificationPopupTypeIndicatorWait {
+    background-position: 0px -150px;
+}
+
+/* Notification text area */
+.NotificationPopupText {
+    position: absolute;
+    left: 10px;
+    top: 8px;
+    width: 180px;
+    height: 50px;
+}
+
+/* Progress bar */
+.NotificationPopupProgressBar {
+    position: absolute;
+    left: 6px;
+    top: 60px;
+    width: 218px;
+    height: 16px;
+}
+
+table.historytable {
+	width: 99%;
+}
+table.historytable,
+table.historytable tbody,
+table.historytable tr,
+table.historytable th,
+table.historytable td {
+	border-bottom:1px solid #AAAAAA;
+	border-collapse:collapse;
+	border-spacing:1px;
+	border-top:1px solid #AAAAAA;
+	clear:both;
+	margin-bottom:2px;
+}
+
+table.historytable th {
+	font-weight: bold;	
+}
Binary file Wikipedia/WRTKit/Resources/title-small.png has changed
Binary file Wikipedia/WRTKit/Resources/title.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/WRTKit/UI/ActionControl.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,144 @@
+/*
+© Copyright 2008 Nokia Corporation. All rights reserved.
+
+IMPORTANT:  The Nokia software ("WRTKit and Example Widget files") is supplied to you by Nokia
+Corporation (ÒNokiaÓ) in consideration of your agreement to the following terms. Your use, installation
+and/or redistribution of the WRTKit and Example Widget files constitutes acceptance of these terms. If
+you do not agree with these terms, please do not use, install, or redistribute the WRTKit and Example
+Widget files.
+
+In consideration of your agreement to abide by the following terms, and subject to these terms, Nokia
+grants you a personal, non-exclusive license, under NokiaÕs copyrights in the WRTKit and Example
+Widget files, to use, reproduce, and redistribute the WRTKit and Example files, in text form (for HTML,
+CSS, or JavaScript files) or binary form (for associated images), for the sole purpose of creating S60
+Widgets.
+
+If you redistribute the WRTKit and Example files, you must retain this entire notice in all such
+redistributions of the WRTKit and Example files.
+
+You may not use the name, trademarks, service marks or logos of Nokia to endorse or promote products
+that include the WRTKit and Example files without the prior written explicit agreement with Nokia.
+Except as expressly stated in this notice, no other rights or licenses, express or implied, are granted by
+Nokia herein, including but not limited to any patent rights that may be infringed by your products that
+incorporate the WRTKit and Example files or by other works in which the WRTKit and Example files
+may be incorporated.
+
+The WRTKit and Example files are provided on an "AS IS" basis.  NOKIA MAKES NO
+WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
+WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE, REGARDING THE EXAMPLES OR ITS USE AND OPERATION
+ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+
+IN NO EVENT SHALL NOKIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, AND/OR
+DISTRIBUTION OF THE EXAMPLES, HOWEVER CAUSED AND WHETHER UNDER THEORY
+OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE,
+EVEN IF NOKIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// The ActionControl class is an abstract base class for action controls like
+// buttons. Don't use ActionControl directly.
+
+// Constructor.
+function ActionControl(id, caption) {
+    if (id != UI_NO_INIT_ID) {
+        this.init(id, caption);
+    }
+}
+
+// ActionControl inherits from Control.
+ActionControl.prototype = new Control(UI_NO_INIT_ID);
+
+// Reference to the button element.
+ActionControl.prototype.buttonElement = null;
+
+// Reference to the link element.
+ActionControl.prototype.linkElement = null;
+
+// Enabled status.
+ActionControl.prototype.enabled = false;
+
+// Initializer - called from constructor.
+ActionControl.prototype.init = function(id, caption) {
+    uiLogger.debug("ActionControl.init(" + id + ", " + caption + ")");
+    
+    // call superclass initializer
+    Control.prototype.init.call(this, id, caption);
+    
+    // the control defaults to enabled
+    this.enabled = true;
+}
+
+// Common event listeners hookup function called from subclasses.
+ActionControl.prototype.bindActionControlListeners = function() {
+    var self = this;
+    this.linkElement.addEventListener("focus", function() { self.focusStateChanged(true); }, false);
+    this.linkElement.addEventListener("blur", function() { self.focusStateChanged(false); }, false);
+    this.buttonElement.addEventListener("mouseover", function() { self.hoverStateChanged(true); }, false);
+    this.buttonElement.addEventListener("mouseout", function() { self.hoverStateChanged(false); }, false);
+    this.buttonElement.addEventListener("mousedown", function(event) {
+                                                       self.controlClicked(event);
+                                                       event.stopPropagation();
+                                                       event.preventDefault();
+                                                   }, true);
+    this.buttonElement.addEventListener("keydown", function(event) {
+                                                    // center and enter trigger the action
+                                                    if (event.keyCode == 0 || event.keyCode == 13) {
+                                                        self.controlClicked();
+                                                        event.stopPropagation();
+                                                        event.preventDefault();
+                                                    }
+                                                 }, true);
+}
+
+// Returns the enabled state.
+ActionControl.prototype.isEnabled = function() {
+    return this.enabled;
+}
+
+// Sets the enabled state.
+ActionControl.prototype.setEnabled = function(enabled) {
+    uiLogger.debug("ActionControl.setEnabled(" + enabled + ")");
+    // switch the state
+    this.enabled = enabled;
+}
+
+// Sets the focused state for the control.
+// Note: This may not always succeed.
+ActionControl.prototype.setFocused = function(focused) {
+    uiLogger.debug("ActionControl.setFocused(" + focused + ")");
+    if (this.enabled) {
+        if (focused) {
+            this.linkElement.focus();
+        } else {
+            this.linkElement.blur();
+        }
+    }
+}
+
+// Callback for clicks.
+ActionControl.prototype.controlClicked = function(event) {
+    uiLogger.debug("ActionControl.controlClicked()");
+    
+    // if we're enabled then a click results in an action performed event
+    if (this.enabled) {
+        // focus when clicked
+        if (!this.focused) {
+            this.linkElement.focus();
+        }
+        
+        // notify event listeners
+        this.actionPerformed(event);
+    }
+}
+
+// Callback for action performed events.
+ActionControl.prototype.actionPerformed = function(event) {
+    uiLogger.debug("ActionControl.actionPerformed()");
+    // notify event listeners
+    this.fireEvent(this.createEvent("ActionPerformed", event));
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/WRTKit/UI/Ajax.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,103 @@
+/*
+� Copyright 2008 Nokia Corporation. All rights reserved.
+
+IMPORTANT:  The Nokia software ("WRTKit and Example Widget files") is supplied to you by Nokia
+Corporation (�Nokia�) in consideration of your agreement to the following terms. Your use, installation
+and/or redistribution of the WRTKit and Example Widget files constitutes acceptance of these terms. If
+you do not agree with these terms, please do not use, install, or redistribute the WRTKit and Example
+Widget files.
+
+In consideration of your agreement to abide by the following terms, and subject to these terms, Nokia
+grants you a personal, non-exclusive license, under Nokia�s copyrights in the WRTKit and Example
+Widget files, to use, reproduce, and redistribute the WRTKit and Example files, in text form (for HTML,
+CSS, or JavaScript files) or binary form (for associated images), for the sole purpose of creating S60
+Widgets.
+
+If you redistribute the WRTKit and Example files, you must retain this entire notice in all such
+redistributions of the WRTKit and Example files.
+
+You may not use the name, trademarks, service marks or logos of Nokia to endorse or promote products
+that include the WRTKit and Example files without the prior written explicit agreement with Nokia.
+Except as expressly stated in this notice, no other rights or licenses, express or implied, are granted by
+Nokia herein, including but not limited to any patent rights that may be infringed by your products that
+incorporate the WRTKit and Example files or by other works in which the WRTKit and Example files
+may be incorporated.
+
+The WRTKit and Example files are provided on an "AS IS" basis.  NOKIA MAKES NO
+WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
+WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE, REGARDING THE EXAMPLES OR ITS USE AND OPERATION
+ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+
+IN NO EVENT SHALL NOKIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, AND/OR
+DISTRIBUTION OF THE EXAMPLES, HOWEVER CAUSED AND WHETHER UNDER THEORY
+OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE,
+EVEN IF NOKIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// Ajax utility calss to create XmlHttpRequest object
+function Ajax() 
+{
+	//	xmlHttpRequest object	
+	var request = null;
+
+    // branch for native XMLHttpRequest object
+    if(window.XMLHttpRequest && !(window.ActiveXObject)) {
+    	try 
+		{
+			request = new XMLHttpRequest();
+			try
+			{
+				//	attach the Bypass code, if the browser is firefox
+				if(netscape.security.PrivilegeManager.enablePrivilege)
+				{
+					//	duplicate the function
+					request._open = request.open;
+					
+					//	redefine the function definition
+					request.open = function(method, url, flag)
+					{
+						try
+						{
+							// Enable Universal Browser Read
+							netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
+
+							//	call the native XmlHttpRequest.open method
+							this._open(method, url, flag);
+						}catch(e)
+						{
+							//	call the native XmlHttpRequest.open method
+							this._open(method, url, flag);
+						}
+					}
+				}
+			}
+			catch(e)
+			{
+				//	eatup all exceptions
+			}
+		} 
+		catch(e) {
+			request = null;
+        }
+    // branch for IE/Windows ActiveX version
+    } else if(window.ActiveXObject) {
+       	try {
+        	request = new ActiveXObject("Msxml2.XMLHTTP");
+      	} catch(e) {
+        	try {
+          		request = new ActiveXObject("Microsoft.XMLHTTP");
+        	} catch(e) {
+          		alert('Failed to create XmlHttprequest');
+				return null;
+        	}
+		}
+    }
+	
+	return (request);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/WRTKit/UI/ContentPanel.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,372 @@
+/*
+� Copyright 2008 Nokia Corporation. All rights reserved.
+
+IMPORTANT:  The Nokia software ("WRTKit and Example Widget files") is supplied to you by Nokia
+Corporation (�Nokia�) in consideration of your agreement to the following terms. Your use, installation
+and/or redistribution of the WRTKit and Example Widget files constitutes acceptance of these terms. If
+you do not agree with these terms, please do not use, install, or redistribute the WRTKit and Example
+Widget files.
+
+In consideration of your agreement to abide by the following terms, and subject to these terms, Nokia
+grants you a personal, non-exclusive license, under Nokia�s copyrights in the WRTKit and Example
+Widget files, to use, reproduce, and redistribute the WRTKit and Example files, in text form (for HTML,
+CSS, or JavaScript files) or binary form (for associated images), for the sole purpose of creating S60
+Widgets.
+
+If you redistribute the WRTKit and Example files, you must retain this entire notice in all such
+redistributions of the WRTKit and Example files.
+
+You may not use the name, trademarks, service marks or logos of Nokia to endorse or promote products
+that include the WRTKit and Example files without the prior written explicit agreement with Nokia.
+Except as expressly stated in this notice, no other rights or licenses, express or implied, are granted by
+Nokia herein, including but not limited to any patent rights that may be infringed by your products that
+incorporate the WRTKit and Example files or by other works in which the WRTKit and Example files
+may be incorporated.
+
+The WRTKit and Example files are provided on an "AS IS" basis.  NOKIA MAKES NO
+WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
+WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE, REGARDING THE EXAMPLES OR ITS USE AND OPERATION
+ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+
+IN NO EVENT SHALL NOKIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, AND/OR
+DISTRIBUTION OF THE EXAMPLES, HOWEVER CAUSED AND WHETHER UNDER THEORY
+OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE,
+EVEN IF NOKIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// The ContentPanel class is a control for displaying content. The panel
+// can be expanded and collapsed.
+
+// Constructor.
+function ContentPanel(id, caption, content, foldable, expanded) {
+    if (id != UI_NO_INIT_ID) {
+        this.init(id, caption, content, foldable, expanded);
+    }
+}
+
+// ContentPanel inherits from Control.
+ContentPanel.prototype = new Control(UI_NO_INIT_ID);
+
+// The element hierarchy in a content panel is as follows:
+//
+// rootElement
+//     assemblyElement
+//         captionElement
+//             foldToggleElement
+//                 captionLinkElement
+//                     captionTextElement
+//     contentElement
+//
+// captionTextElement is moved under foldToggleElement if disabled
+// or captionElement if not foldable
+
+// The fold toggle element used for folding content panels.
+ContentPanel.prototype.foldToggleElement = null;
+
+// The caption link element of this control.
+ContentPanel.prototype.captionLinkElement = null;
+
+// The caption text element of this control.
+ContentPanel.prototype.captionTextElement = null;
+
+// The content element of this control.
+ContentPanel.prototype.contentElement = null;
+
+// The foldable state of this control.
+ContentPanel.prototype.foldable = false;
+
+// The expanded state of this control.
+ContentPanel.prototype.expanded = false;
+
+// Enabled status.
+ContentPanel.prototype.enabled = false;
+
+// Initializer - called from constructor.
+ContentPanel.prototype.init = function(id, caption, content, foldable, expanded) {
+    uiLogger.debug("ContentPanel.init(" + id + ", " + caption + ", " + content + ", " + foldable + ", " + expanded + ")");
+    
+    // call superclass initializer
+    Control.prototype.init.call(this, id, caption);
+    
+    // the control defaults to enabled
+    this.enabled = true;
+    
+    // create caption text element
+    this.captionTextElement = document.createElement("span");
+    
+    // disconnect the control element
+    this.assemblyElement.removeChild(this.controlElement);
+    
+    // set the foldable state
+    this.foldable = foldable;
+    
+    var self = this;
+    // is this a foldable content panel?
+    if (foldable) {
+        // create fold toggle element
+        this.foldToggleElement = document.createElement("div");
+        this.captionElement.appendChild(this.foldToggleElement);
+        
+        // create caption link and add to caption element
+        this.captionLinkElement = document.createElement("a");
+        this.captionLinkElement.href = "JavaScript:void(0)";
+        this.foldToggleElement.appendChild(this.captionLinkElement);
+        
+        // add the text element to the link element
+        this.captionLinkElement.appendChild(this.captionTextElement);
+        
+        // bind event listeners
+        this.captionLinkElement.addEventListener("focus", function() { self.focusStateChanged(true); }, false);
+        this.captionLinkElement.addEventListener("blur", function() { self.focusStateChanged(false); }, false);
+        this.foldToggleElement.addEventListener("mouseover", function() { self.hoverStateChanged(true); }, false);
+        this.foldToggleElement.addEventListener("mouseout", function() { self.hoverStateChanged(false); }, false);
+        this.foldToggleElement.addEventListener("mousedown", function(event) {
+                                                                 self.captionClicked();
+                                                                 event.stopPropagation();
+                                                                 event.preventDefault();
+                                                             }, true);
+        this.foldToggleElement.addEventListener("keydown", function(event) {
+                                                               // center and enter trigger the action
+                                                               if (event.keyCode == 0 || event.keyCode == 13) {
+                                                                   self.captionClicked();
+                                                                   event.stopPropagation();
+                                                                   event.preventDefault();
+                                                               }
+                                                           }, true);
+        this.expanded = expanded;
+    } else {
+        // since this is not a foldable panel the content should be expanded
+        this.expanded = true;
+        
+        // add the text element directly to the caption element
+        this.captionElement.appendChild(this.captionTextElement);
+    }
+    
+    // create content element
+    this.contentElement = document.createElement("div");
+    this.contentElement.style.display = this.expanded ? "block" : "none";
+    this.rootElement.appendChild(this.contentElement);
+	
+	if (foldable) {
+		this.contentElement.onclick = function(event){
+			self.captionClicked();
+		};
+	}
+    // set caption, content and expanded state
+    this.setCaption(caption);
+    this.setContent(content);
+    
+    // update style
+    this.updateStyleFromState();
+}
+
+// Returns the enabled state.
+ContentPanel.prototype.isEnabled = function() {
+    return this.enabled;
+}
+
+// Sets the enabled state.
+ContentPanel.prototype.setEnabled = function(enabled) {
+    uiLogger.debug("ContentPanel.setEnabled(" + enabled + ")");
+    
+    // bail out early if there is no change in state
+    if (this.enabled == enabled) {
+        return;
+    }
+    
+    // set the enabled state
+    this.enabled = enabled;
+    
+    // is this a foldable content?
+    if (this.foldable) {
+         // the caption link must be disabled
+        if (this.enabled) {
+            // diabled -> enabled
+            this.foldToggleElement.removeChild(this.captionTextElement);
+            this.foldToggleElement.appendChild(this.captionLinkElement);
+            this.captionLinkElement.appendChild(this.captionTextElement);
+        } else {
+            // enabled -> diabled
+            this.captionLinkElement.removeChild(this.captionTextElement);
+            this.foldToggleElement.removeChild(this.captionLinkElement);
+            this.foldToggleElement.appendChild(this.captionTextElement);
+        }
+    }
+    
+    // update style
+    this.updateStyleFromState();    
+}
+
+// Returns the caption; null if none.
+ContentPanel.prototype.getCaption = function() {
+    return this.caption;
+}
+
+// Sets the caption; null if none.
+ContentPanel.prototype.setCaption = function(caption) {
+    // bail out if the caption text element has not been created
+    // this is to prevent the superclass init calling this before
+    // we've initialized our custom caption
+    if (this.captionTextElement == null)
+        return;
+    
+    uiLogger.debug("ContentPanel.setCaption(" + caption + ")");
+    
+    // set the display style
+    this.captionElement.style.display = (caption == null) ? "none" : "block";
+    
+    // set the caption
+    this.caption = caption;
+    this.captionTextElement.innerHTML = (caption == null) ? "" : caption;
+    
+    // update style
+    this.updateStyleFromState();
+}
+
+// Returns the content.
+ContentPanel.prototype.getContent = function() {
+    return this.contentElement.innerHTML;
+}
+
+// Sets the content.
+ContentPanel.prototype.setContent = function(content) {
+    uiLogger.debug("ContentPanel.setContent(" + content + ")");
+    this.contentElement.innerHTML = (content == null) ? "" : content;
+}
+
+// Returns the focusable state for the control.
+ContentPanel.prototype.isFocusable = function() {
+    // a content panel is focusable if it's foldable and enabled
+    return (this.foldable && this.enabled);
+}
+
+// Sets the focused state for the control.
+// Note: This may not always succeed.
+ContentPanel.prototype.setFocused = function(focused) {
+    uiLogger.debug("ContentPanel.setFocused(" + focused + ")");
+    if (this.enabled && this.foldable) {
+        if (focused) {
+            this.captionLinkElement.focus();
+        } else {
+            this.captionLinkElement.blur();
+        }
+    }
+    // note that this.focused gets set as a result of focusStateChanged() being called
+    // rather than setting it explicitly here
+}
+
+// Returns the expanded state.
+ContentPanel.prototype.isExpanded = function() {
+    return this.expanded;
+}
+
+// Sets the expanded state.
+ContentPanel.prototype.setExpanded = function(expanded) {
+    uiLogger.debug("ContentPanel.setExpanded(" + expanded + ")");
+    
+    // make sure only foldable content panels are folded
+    if (!this.foldable) {
+        uiLogger.warn("Cannot fold a non-foldable content panel!");
+        return;
+    }
+    
+    this.expanded = expanded;
+    if (this.expanded) {
+        // expand
+        this.contentElement.style.display = "block";
+        
+        // find out control top and bottom
+        var controlTop = this.getAbsoluteTop(this.rootElement);
+        var controlHeight = this.rootElement.clientHeight;
+        var controlBottom = controlTop + controlHeight;
+        
+        // find out the viewport top and bottom
+        var viewportTop = window.scrollY;
+        var viewportHeight = window.innerHeight;
+        var viewportBottom = viewportTop + viewportHeight;
+        
+        // make sure the control is positioned so that it can be seen
+        var overflow = controlBottom - viewportBottom;
+        if (overflow > 0) {
+            // there's overflow so we need to scroll to get the control
+            // into the viewport - however not so far that the control
+            // goes past the viewport top.
+            var distanceToTop = controlTop - viewportTop;
+            var scrollAmount = Math.min(overflow, distanceToTop);
+            window.scrollBy(0, scrollAmount);
+        }
+    } else {
+        // collapse
+        this.contentElement.style.display = "none";
+    }
+    
+    // notify event listeners
+    this.fireEvent(this.createEvent("ExpandedStateChanged", this.expanded));
+    
+    // update the style
+    this.updateStyleFromState();
+}
+
+// Returns the absolute position (y) of the given element.
+ContentPanel.prototype.getAbsoluteTop = function(element) {
+    // traverse from element to root and add top-offset
+    // for each element we find on the way
+    var absTop = 0;
+    while (element != null) {
+        absTop += element.offsetTop;
+        element = element.offsetParent;
+    }
+    return absTop;
+}
+
+// Callback for when the caption is clicked.
+ContentPanel.prototype.captionClicked = function() {
+    uiLogger.debug("ContentPanel.captionClicked()");
+    
+    // if we're enabled then a click results toggling the expanded state
+    if (this.enabled) {
+        // focus when clicked
+        if (!this.focused) {
+            this.captionLinkElement.focus();
+        }
+        
+        // toggle the expanded state
+        this.setExpanded(!this.expanded);
+    }
+}
+
+// Updates the style of the control to reflects the state of the control.
+ContentPanel.prototype.updateStyleFromState = function() {
+    uiLogger.debug("ContentPanel.updateStyleFromState()");
+
+    // determine the state name
+    var stateName = this.getStyleStateName();
+    
+    // set root element class name
+    this.setClassName(this.rootElement, "Control");
+
+    // set the control assembly class names
+    this.setClassName(this.assemblyElement, "ControlAssembly ControlAssembly" + stateName);
+    
+    if (this.foldable) {
+        // foldable content panel
+        this.setClassName(this.captionElement, "ContentPanelCaptionFoldable");
+        this.setClassName(this.foldToggleElement, "ContentPanelFoldToggle ContentPanelFoldToggle" + (this.expanded ? "Expanded" : "Collapsed"));
+    } else {
+        // non-folding
+        this.setClassName(this.captionElement, "ContentPanelCaptionNonFoldable");
+    }
+    
+    // set the content caption text class names
+    this.setClassName(this.captionTextElement, "ContentPanelCaptionText ContentPanelCaptionText" + stateName);
+    
+    // set the content element class names
+    this.setClassName(this.contentElement, "ContentPanelContent");
+	
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/WRTKit/UI/Control.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,231 @@
+/*
+© Copyright 2008 Nokia Corporation. All rights reserved.
+
+IMPORTANT:  The Nokia software ("WRTKit and Example Widget files") is supplied to you by Nokia
+Corporation (“Nokia”) in consideration of your agreement to the following terms. Your use, installation
+and/or redistribution of the WRTKit and Example Widget files constitutes acceptance of these terms. If
+you do not agree with these terms, please do not use, install, or redistribute the WRTKit and Example
+Widget files.
+
+In consideration of your agreement to abide by the following terms, and subject to these terms, Nokia
+grants you a personal, non-exclusive license, under Nokia’s copyrights in the WRTKit and Example
+Widget files, to use, reproduce, and redistribute the WRTKit and Example files, in text form (for HTML,
+CSS, or JavaScript files) or binary form (for associated images), for the sole purpose of creating S60
+Widgets.
+
+If you redistribute the WRTKit and Example files, you must retain this entire notice in all such
+redistributions of the WRTKit and Example files.
+
+You may not use the name, trademarks, service marks or logos of Nokia to endorse or promote products
+that include the WRTKit and Example files without the prior written explicit agreement with Nokia.
+Except as expressly stated in this notice, no other rights or licenses, express or implied, are granted by
+Nokia herein, including but not limited to any patent rights that may be infringed by your products that
+incorporate the WRTKit and Example files or by other works in which the WRTKit and Example files
+may be incorporated.
+
+The WRTKit and Example files are provided on an "AS IS" basis.  NOKIA MAKES NO
+WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
+WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE, REGARDING THE EXAMPLES OR ITS USE AND OPERATION
+ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+
+IN NO EVENT SHALL NOKIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, AND/OR
+DISTRIBUTION OF THE EXAMPLES, HOWEVER CAUSED AND WHETHER UNDER THEORY
+OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE,
+EVEN IF NOKIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// The Control class is an abstract base class for all user interface controls.
+
+// Constructor.
+function Control(id, caption) {
+    if (id != UI_NO_INIT_ID) {
+        this.init(id, caption);
+    }
+}
+
+// Control inherits from UIElement.
+Control.prototype = new UIElement(UI_NO_INIT_ID);
+
+// The view that control belongs to.
+Control.prototype.view = null;
+
+// Is the control focused?
+Control.prototype.focused = false;
+
+// Is the pointer over this control?
+Control.prototype.hovering = false;
+
+// The element hierarchy in a control is as follows:
+//
+// rootElement
+//     assemblyElement
+//         captionElement
+//         controlElement
+//
+// The assembly element groups the portion of a control that typically handle
+// the visual effects for focus and hover states. Having a separate root and
+// assembly elements allows other elements to be added to a control without
+// them being affected by the CSS rules of the assembly element.
+
+// The assembly element of this control.
+Control.prototype.assemblyElement = null;
+
+// The caption of this control; null if none.
+Control.prototype.caption = null;
+
+// The caption element of this control.
+Control.prototype.captionElement = null;
+
+// The control element of this control.
+Control.prototype.controlElement = null;
+
+// Initializer - called from constructor.
+Control.prototype.init = function(id, caption) {
+    uiLogger.debug("Control.init(" + id + ", " + caption + ")");
+    
+    // call superclass initializer
+    UIElement.prototype.init.call(this, id);
+    
+    // create assembly, caption and control elements
+    this.assemblyElement = document.createElement("div");
+    this.captionElement = document.createElement("div");
+    this.assemblyElement.appendChild(this.captionElement);
+    this.controlElement = document.createElement("div");
+    this.assemblyElement.appendChild(this.controlElement);
+    this.rootElement.appendChild(this.assemblyElement);
+    
+    // set the caption
+    // style is not updated because the subclass will update the style later
+    // when it has completely initialized the component
+    this.setCaption(caption, true);
+}
+
+// Returns the caption; null if none.
+Control.prototype.getCaption = function() {
+    return this.caption;
+}
+
+// Sets the caption; null if none.
+Control.prototype.setCaption = function(caption, noStyleUpdate) {
+    uiLogger.debug("Control.setCaption(" + caption + ")");
+    
+    // set the display style
+    this.captionElement.style.display = (caption == null) ? "none" : "block";
+    
+    // set the caption
+    this.caption = caption;
+    this.captionElement.innerHTML = (caption == null) ? "" : caption;
+    
+    // update style
+    if (!noStyleUpdate) {
+        this.updateStyleFromState();
+    }
+}
+
+// Returns the enabled state.
+// Override this in subclasses as required to implement the state change.
+Control.prototype.isEnabled = function() {
+    return false;
+}
+
+// Sets the enabled state.
+// Override this in subclasses as required to implement the state change.
+Control.prototype.setEnabled = function(enabled) {
+    uiLogger.debug("Control.setEnabled(" + enabled + ")");
+}
+
+// Returns the focusable state for the control.
+// Defaults focusable if enabled - override this in subclasses as required.
+Control.prototype.isFocusable = function() {
+    return this.isEnabled();
+}
+
+// Returns the focused state for the control.
+Control.prototype.isFocused = function() {
+    return this.focused;
+}
+
+// Sets the focused state for the control.
+// Note: This may not always succeed.
+// Override this in subclasses as required to implement the state change.
+Control.prototype.setFocused = function(focused) {
+    uiLogger.debug("Control.setFocused(" + focused + ")");
+    // note that this.focused gets set as a result of focusStateChanged() being called
+    // rather than setting it explicitly here
+}
+
+// Called when the focus state has changed for this control.
+Control.prototype.focusStateChanged = function(focused) {
+    uiLogger.debug("Control.focusStateChanged(" + focused + ")");
+    if (this.focused != focused) {
+        this.focused = focused;
+        
+        // let the view know about the focus change
+        if (this.view != null) {
+            this.view.focusedControlChanged(focused ? this : null);
+        }
+        
+        // update the style from the current state
+        this.updateStyleFromState();
+        
+        // notify event listeners
+        this.fireEvent(this.createEvent("FocusStateChanged", focused));
+    }
+}
+
+// Called when the hover state has changed for this control.
+Control.prototype.hoverStateChanged = function(hovering) {
+    uiLogger.debug("Control.hoverStateChanged(" + hovering + ")");
+    if (this.hovering != hovering) {
+        this.hovering = hovering;
+        
+        // update the style from the current state
+        this.updateStyleFromState();
+        
+        // notify event listeners
+        this.fireEvent(this.createEvent("HoverStateChanged", hovering));
+    }
+}
+
+// Helper method that returns the state name for the current state.
+Control.prototype.getStyleStateName = function() {
+    var focusable = this.isFocusable();
+    if (focusable && this.focused) {
+        return "Focus";
+    } else if (focusable && this.hovering) {
+        return "Hover";
+    } else if (!this.isEnabled()) {
+        return "Disabled";
+    } else {
+        return "Normal";
+    }
+}
+
+// Resets the state tracking for focus and hover.
+// Override this in subclasses as required to implement the state reset.
+Control.prototype.resetFocusState = function() {
+    uiLogger.debug("Control.resetFocusState()");
+    this.hovering = false;
+    this.focused = false;
+    this.updateStyleFromState();
+}
+
+// Helper function that sets a classname for an element.
+// Only sets the class name if it actually is different from the current value.
+Control.prototype.setClassName = function(element, className) {
+    if (element.className != className) {
+        element.className = className;
+    }
+}
+
+// Updates the style of the control to reflects the state of the control.
+// Override this in subclasses as required to implement the state change.
+Control.prototype.updateStyleFromState = function() {
+    uiLogger.debug("Control.updateStyleFromState()");
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/WRTKit/UI/FormButton.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,177 @@
+/*
+© Copyright 2008 Nokia Corporation. All rights reserved.
+
+IMPORTANT:  The Nokia software ("WRTKit and Example Widget files") is supplied to you by Nokia
+Corporation (“Nokia”) in consideration of your agreement to the following terms. Your use, installation
+and/or redistribution of the WRTKit and Example Widget files constitutes acceptance of these terms. If
+you do not agree with these terms, please do not use, install, or redistribute the WRTKit and Example
+Widget files.
+
+In consideration of your agreement to abide by the following terms, and subject to these terms, Nokia
+grants you a personal, non-exclusive license, under Nokia’s copyrights in the WRTKit and Example
+Widget files, to use, reproduce, and redistribute the WRTKit and Example files, in text form (for HTML,
+CSS, or JavaScript files) or binary form (for associated images), for the sole purpose of creating S60
+Widgets.
+
+If you redistribute the WRTKit and Example files, you must retain this entire notice in all such
+redistributions of the WRTKit and Example files.
+
+You may not use the name, trademarks, service marks or logos of Nokia to endorse or promote products
+that include the WRTKit and Example files without the prior written explicit agreement with Nokia.
+Except as expressly stated in this notice, no other rights or licenses, express or implied, are granted by
+Nokia herein, including but not limited to any patent rights that may be infringed by your products that
+incorporate the WRTKit and Example files or by other works in which the WRTKit and Example files
+may be incorporated.
+
+The WRTKit and Example files are provided on an "AS IS" basis.  NOKIA MAKES NO
+WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
+WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE, REGARDING THE EXAMPLES OR ITS USE AND OPERATION
+ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+
+IN NO EVENT SHALL NOKIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, AND/OR
+DISTRIBUTION OF THE EXAMPLES, HOWEVER CAUSED AND WHETHER UNDER THEORY
+OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE,
+EVEN IF NOKIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// The FormButton class implements a button control for use in form-style UIs.
+
+// Constructor.
+function FormButton(id, text) {
+    if (id != UI_NO_INIT_ID) {
+        this.init(id, text);
+    }
+}
+
+// FormButton inherits from ActionControl.
+FormButton.prototype = new ActionControl(UI_NO_INIT_ID);
+
+// Button table element.
+FormButton.prototype.tableElement = null;
+
+// Button table row element.
+FormButton.prototype.tableRowElement = null;
+
+// Button table left cell element.
+FormButton.prototype.tableLeftCellElement = null;
+
+// Button table center cell element.
+FormButton.prototype.tableCenterCellElement = null;
+
+// Button text element.
+FormButton.prototype.textElement = null;
+
+// Button table right cell element.
+FormButton.prototype.tableRightCellElement = null;
+
+// Initializer - called from constructor.
+FormButton.prototype.init = function(id, text) {
+    uiLogger.debug("FormButton.init(" + id + ", " + text + ")");
+    
+    // call superclass initializer
+    ActionControl.prototype.init.call(this, id, null);
+    
+    // remove caption element
+    this.assemblyElement.removeChild(this.captionElement);
+    
+    // construct the button
+    this.buttonElement = document.createElement("div");
+    this.tableElement = document.createElement("table");
+    this.tableRowElement = document.createElement("tr");
+    this.tableLeftCellElement = document.createElement("td");
+    this.tableCenterCellElement = document.createElement("td");
+    this.linkElement = document.createElement("a");
+    this.linkElement.href = "JavaScript:void(0)";
+    this.textElement = document.createElement("span");
+    this.tableRightCellElement = document.createElement("td");
+    this.tableElement.appendChild(this.tableRowElement);
+    this.tableRowElement.appendChild(this.tableLeftCellElement);
+    this.tableRowElement.appendChild(this.tableCenterCellElement);
+    this.tableCenterCellElement.appendChild(this.linkElement);
+    this.linkElement.appendChild(this.textElement);
+    this.tableRowElement.appendChild(this.tableRightCellElement);
+    this.buttonElement.appendChild(this.tableElement);
+    this.controlElement.appendChild(this.buttonElement);
+    
+    // set the text
+    this.setText(text);
+    
+    // bind event listeners
+    this.bindActionControlListeners();
+    
+    // update the style
+    this.updateStyleFromState();
+}
+
+// Sets the enabled state.
+FormButton.prototype.setEnabled = function(enabled) {
+    uiLogger.debug("FormButton.setEnabled(" + enabled + ")");
+    
+    // bail out early if there is no change in state
+    if (this.enabled == enabled) {
+        return;
+    }
+    
+    // set the enabled state
+    this.enabled = enabled;
+    
+    if (this.enabled) {
+        // diabled -> enabled
+        this.tableCenterCellElement.removeChild(this.textElement);
+        this.tableCenterCellElement.appendChild(this.linkElement);
+        this.linkElement.appendChild(this.textElement);
+    } else {
+        // enabled -> diabled
+        this.linkElement.removeChild(this.textElement);
+        this.tableCenterCellElement.removeChild(this.linkElement);
+        this.tableCenterCellElement.appendChild(this.textElement);
+    }
+    
+    // update the style
+    this.updateStyleFromState();
+}
+
+// Returns the button text.
+FormButton.prototype.getText = function() {
+    return this.textElement.innerHTML;
+}
+
+// Sets the button text.
+FormButton.prototype.setText = function(text) {
+    uiLogger.debug("FormButton.setText(" + text + ")");
+    this.textElement.innerHTML = (text == null) ? "" : text;;
+}
+
+// Updates the style of the control to reflects the state of the control.
+FormButton.prototype.updateStyleFromState = function() {
+    uiLogger.debug("FormButton.updateStyleFromState()");
+    
+    // determine the state name
+    var stateName = this.getStyleStateName();
+    
+    // set root element class name
+    this.setClassName(this.rootElement, "Control");
+    
+    // set the control assembly class names
+    this.setClassName(this.assemblyElement, "ControlAssembly ControlAssemblyNormal");
+    
+    // control element
+    this.setClassName(this.controlElement, "ControlElement FormButtonControlElement");
+    
+    // set the button table class names
+    this.setClassName(this.buttonElement, "FormButton");
+    this.setClassName(this.tableElement, "FormButtonTable");
+    this.setClassName(this.tableRowElement, "FormButtonRow");
+    this.setClassName(this.tableLeftCellElement, "FormButtonLeftCell FormButtonLeftCell" + stateName);
+    this.setClassName(this.tableCenterCellElement, "FormButtonCenterCell FormButtonLeftCell" + stateName);
+    this.setClassName(this.tableRightCellElement, "FormButtonRightCell FormButtonLeftCell" + stateName);
+    
+    // set the button text class name
+    this.setClassName(this.textElement, "FormButtonText FormButtonText" + stateName);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/WRTKit/UI/ImageLabel.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,100 @@
+// ////////////////////////////////////////////////////////////////////////////
+// Symbian Foundation Example Code
+//
+// This software is in the public domain. No copyright is claimed, and you 
+// may use it for any purpose without license from the Symbian Foundation.
+// No warranty for any purpose is expressed or implied by the authors or
+// the Symbian Foundation. 
+// ////////////////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////////////////
+// The ImageLabel class implements a control that displays an image
+
+// Constructor.
+function ImageLabel(id, caption, image) {
+    if (id != UI_NO_INIT_ID) {
+        this.init(id, caption, image);
+    }
+}
+
+// Label inherits from Control.
+ImageLabel.prototype = new Control(UI_NO_INIT_ID);
+
+// Content element for the ImageLabel
+ImageLabel.prototype.contentElement = null;
+
+// DOM element for image 
+ImageLabel.prototype.imageElement = null;
+
+// Initializer - called from constructor.
+ImageLabel.prototype.init = function(id, caption, image) {
+    uiLogger.debug("ImageLabel.init(" + id + ", " + caption + ", " + image + ")");
+    
+    // call superclass initializer
+    Control.prototype.init.call(this, id, caption);
+    
+    // create content element
+    this.contentElement = document.createElement("div");
+    this.controlElement.appendChild(this.contentElement);
+    
+    // set the image
+    this.setImage(image);
+}
+
+// Returns the enabled state for the control.
+ImageLabel.prototype.isEnabled = function() {
+    return true;
+}
+
+// Returns the focusable state for the control.
+ImageLabel.prototype.isFocusable = function() {
+    return false;
+}
+
+// Returns the button image (URL); null if none.
+ImageLabel.prototype.getImage = function() {
+    return (this.imageElement != null) ? this.imageElement.src : null;
+}
+
+// Sets the button image (URL); null if none.
+ImageLabel.prototype.setImage = function(image) {
+    uiLogger.debug("NavigationButton.setImage(" + image + ")");
+    
+    if (image == null) {
+        // remove image - if any
+        if (this.imageElement != null) {
+            this.contentElement.removeChild(this.imageElement);
+        }
+    } else {
+        // default to not append image element
+        var append = false;
+        
+        // create image element if one doesn't exist
+        if (this.imageElement == null) {
+            this.imageElement = document.createElement("img");
+            this.imageElement.setAttribute("alt", "");
+            append = true;
+        }
+        
+        // set image source URL
+        this.imageElement.src = image;
+        
+        // append the image element to the left cell?
+        if (append) {
+            this.contentElement.appendChild(this.imageElement);
+        }
+    }
+}
+
+
+// Updates the style of the control to reflects the state of the control.
+ImageLabel.prototype.updateStyleFromState = function() {
+    uiLogger.debug("Label.updateStyleFromState()");
+    
+    // set element class names
+    this.setClassName(this.rootElement, "Control");
+    this.setClassName(this.assemblyElement, "ControlAssembly ControlAssemblyNormal");
+    this.setClassName(this.captionElement, "ControlCaption ControlCaptionNormal");
+    this.setClassName(this.controlElement, "ControlElement");
+    this.setClassName(this.contentElement, "LabelText");
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/WRTKit/UI/Label.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,105 @@
+/*
+� Copyright 2008 Nokia Corporation. All rights reserved.
+
+IMPORTANT:  The Nokia software ("WRTKit and Example Widget files") is supplied to you by Nokia
+Corporation (�Nokia�) in consideration of your agreement to the following terms. Your use, installation
+and/or redistribution of the WRTKit and Example Widget files constitutes acceptance of these terms. If
+you do not agree with these terms, please do not use, install, or redistribute the WRTKit and Example
+Widget files.
+
+In consideration of your agreement to abide by the following terms, and subject to these terms, Nokia
+grants you a personal, non-exclusive license, under Nokia�s copyrights in the WRTKit and Example
+Widget files, to use, reproduce, and redistribute the WRTKit and Example files, in text form (for HTML,
+CSS, or JavaScript files) or binary form (for associated images), for the sole purpose of creating S60
+Widgets.
+
+If you redistribute the WRTKit and Example files, you must retain this entire notice in all such
+redistributions of the WRTKit and Example files.
+
+You may not use the name, trademarks, service marks or logos of Nokia to endorse or promote products
+that include the WRTKit and Example files without the prior written explicit agreement with Nokia.
+Except as expressly stated in this notice, no other rights or licenses, express or implied, are granted by
+Nokia herein, including but not limited to any patent rights that may be infringed by your products that
+incorporate the WRTKit and Example files or by other works in which the WRTKit and Example files
+may be incorporated.
+
+The WRTKit and Example files are provided on an "AS IS" basis.  NOKIA MAKES NO
+WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
+WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE, REGARDING THE EXAMPLES OR ITS USE AND OPERATION
+ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+
+IN NO EVENT SHALL NOKIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, AND/OR
+DISTRIBUTION OF THE EXAMPLES, HOWEVER CAUSED AND WHETHER UNDER THEORY
+OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE,
+EVEN IF NOKIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// The Label class implements a control that displays textual content.
+
+// Constructor.
+function Label(id, caption, text) {
+    if (id != UI_NO_INIT_ID) {
+        this.init(id, caption, text);
+    }
+}
+
+// Label inherits from Control.
+Label.prototype = new Control(UI_NO_INIT_ID);
+
+// Content element for label text.
+Label.prototype.contentElement = null;
+
+// Initializer - called from constructor.
+Label.prototype.init = function(id, caption, text) {
+    uiLogger.debug("Label.init(" + id + ", " + caption + ", " + text + ")");
+    
+    // call superclass initializer
+    Control.prototype.init.call(this, id, caption);
+    
+    // create content element
+    this.contentElement = document.createElement("div");
+    this.controlElement.appendChild(this.contentElement);
+    
+    // set the text
+    this.setText(text);
+}
+
+// Returns the enabled state for the control.
+Label.prototype.isEnabled = function() {
+    return true;
+}
+
+// Returns the focusable state for the control.
+Label.prototype.isFocusable = function() {
+    return false;
+}
+
+// Returns the control text.
+Label.prototype.getText = function() {
+    return this.contentElement.innerHTML;
+}
+
+// Sets the text for the control.
+Label.prototype.setText = function(text) {
+    uiLogger.debug("Label.setText(" + text + ")");
+    this.contentElement.innerHTML = (text == null) ? "" : text;
+    this.updateStyleFromState();
+}
+
+// Updates the style of the control to reflects the state of the control.
+Label.prototype.updateStyleFromState = function() {
+    uiLogger.debug("Label.updateStyleFromState()");
+    
+    // set element class names
+    this.setClassName(this.rootElement, "Control");
+    this.setClassName(this.assemblyElement, "ControlAssembly ControlAssemblyNormal");
+    this.setClassName(this.captionElement, "ControlCaption ControlCaptionNormal");
+    this.setClassName(this.controlElement, "ControlElement");
+    this.setClassName(this.contentElement, "LabelText");
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/WRTKit/UI/ListView.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,199 @@
+/*
+� Copyright 2008 Nokia Corporation. All rights reserved.
+
+IMPORTANT:  The Nokia software ("WRTKit and Example Widget files") is supplied to you by Nokia
+Corporation (�Nokia�) in consideration of your agreement to the following terms. Your use, installation
+and/or redistribution of the WRTKit and Example Widget files constitutes acceptance of these terms. If
+you do not agree with these terms, please do not use, install, or redistribute the WRTKit and Example
+Widget files.
+
+In consideration of your agreement to abide by the following terms, and subject to these terms, Nokia
+grants you a personal, non-exclusive license, under Nokia�s copyrights in the WRTKit and Example
+Widget files, to use, reproduce, and redistribute the WRTKit and Example files, in text form (for HTML,
+CSS, or JavaScript files) or binary form (for associated images), for the sole purpose of creating S60
+Widgets.
+
+If you redistribute the WRTKit and Example files, you must retain this entire notice in all such
+redistributions of the WRTKit and Example files.
+
+You may not use the name, trademarks, service marks or logos of Nokia to endorse or promote products
+that include the WRTKit and Example files without the prior written explicit agreement with Nokia.
+Except as expressly stated in this notice, no other rights or licenses, express or implied, are granted by
+Nokia herein, including but not limited to any patent rights that may be infringed by your products that
+incorporate the WRTKit and Example files or by other works in which the WRTKit and Example files
+may be incorporated.
+
+The WRTKit and Example files are provided on an "AS IS" basis.  NOKIA MAKES NO
+WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
+WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE, REGARDING THE EXAMPLES OR ITS USE AND OPERATION
+ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+
+IN NO EVENT SHALL NOKIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, AND/OR
+DISTRIBUTION OF THE EXAMPLES, HOWEVER CAUSED AND WHETHER UNDER THEORY
+OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE,
+EVEN IF NOKIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// The ListView class implements a vertical list view that hosts controls
+// as child components.
+
+// Constructor.
+function ListView(id, caption) {
+    if (id != UI_NO_INIT_ID) {
+        this.init(id, caption);
+    }
+}
+
+// ListView inherits from View.
+ListView.prototype = new View(UI_NO_INIT_ID);
+
+// The caption of this view; null if none.
+ListView.prototype.caption = null;
+
+// The caption element of this view.
+ListView.prototype.captionElement = null;
+
+// The caption text element of this view.
+ListView.prototype.captionTextElement = null;
+
+// Root HTML element for controls.
+ListView.prototype.listElement = null;
+
+// List of controls in the view.
+ListView.prototype.controls = null;
+
+// Initializer for ListView.
+ListView.prototype.init = function(id, caption) {
+    uiLogger.debug("ListView.init(" + id + ", " + caption + ")");
+    
+    // call superclass initializer
+    View.prototype.init.call(this, id);
+    
+    // init control array
+    this.controls = [];
+    
+    // set style class name for root element
+    this.rootElement.className = "ListView";
+    
+    // create caption and caption text elements
+    this.captionElement = document.createElement("div");
+    this.captionElement.className = "ListViewCaptionText";
+    this.rootElement.appendChild(this.captionElement);
+    
+    // create root element for controls and add to the view root element
+    this.listElement = document.createElement("div");
+    this.listElement.className = "ListViewControlList";
+    this.rootElement.appendChild(this.listElement);
+    
+    // set the caption
+    this.setCaption(caption);
+}
+
+// Returns the caption; null if none.
+ListView.prototype.getCaption = function() {
+    return this.caption;
+}
+
+// Sets the caption; null if none.
+ListView.prototype.setCaption = function(caption) {
+    uiLogger.debug("ListView.setCaption(" + caption + ")");
+    
+    // set the display style
+    this.captionElement.style.display = (caption == null) ? "none" : "block";
+    
+    // set the caption
+    this.caption = caption;
+    this.captionElement.innerHTML = (caption == null) ? "" : caption;
+}
+
+// Returns an array of controls in the view.
+ListView.prototype.getControls = function() {
+    return this.controls;
+}
+
+// Adds a control to the view.
+ListView.prototype.addControl = function(control) {
+    uiLogger.debug("ListView.addControl(" + control + ")");
+    
+    // add the control to the controls array and attach it to the list element
+    this.controls.push(control);
+    this.listElement.appendChild(control.rootElement);
+    control.view = this;
+}
+
+// Inserts a control to the view before the specified control.
+ListView.prototype.insertControl = function(control, beforeControl) {
+    uiLogger.debug("ListView.insertControl(" + control + ", " + beforeControl + ")");
+    
+    // iterate through current controls
+    for (var i = 0; i < this.controls.length; i++) {
+        // is this the control we should insert before?
+        if (this.controls[i] == beforeControl) {
+            // we found the control to insert before - insert here and connect to list element
+            this.controls.splice(i, 0, control);
+            this.listElement.insertBefore(control.rootElement, beforeControl.rootElement);
+            control.view = this;
+            return;
+        }
+    }
+    
+    // the control wasn't found so we'll add it last
+    this.addControl(control);
+}
+
+// Removes a control from the view.
+ListView.prototype.removeControl = function(control) {
+    uiLogger.debug("ListView.removeControl(" + control + ")");
+    
+    // iterate through current controls
+    for (var i = 0; i < this.controls.length; i++) {
+        // is this the control we should remove?
+        if (this.controls[i] == control) {
+            // we found the control to remove - remove it from the list element
+            this.controls.splice(i, 1);
+            this.listElement.removeChild(control.rootElement);
+            control.view = null;
+        }
+    }
+}
+
+// Removes a control from the view.
+ListView.prototype.removeAllControls = function() {
+    // iterate through current controls
+    for (var i = 0; i < this.controls.length; i++) {
+        // we found the control to remove - remove it from the list element
+		var control = this.controls[i];
+        this.listElement.removeChild(control.rootElement);
+        control.view = null;
+    }
+    this.controls = new Array();
+}
+
+
+// Attempts to focus the first focusable control.
+ListView.prototype.focusFirstControl = function() {
+    uiLogger.debug("ListView.focusFirstControl()");
+    for (var i = 0; i < this.controls.length; i++) {
+        // is this control focusable?
+        var control = this.controls[i];
+        if (control.isFocusable()) {
+            control.setFocused(true);
+            break;
+        }
+    }
+}
+
+// Attempts to reset all control focus states.
+// Override in subclasses as required.
+ListView.prototype.resetControlFocusStates = function() {
+    uiLogger.debug("ListView.resetControlFocusStates()");
+    for (var i = 0; i < this.controls.length; i++) {
+        this.controls[i].resetFocusState();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/WRTKit/UI/NavigationButton.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,232 @@
+/*
+� Copyright 2008 Nokia Corporation. All rights reserved.
+
+IMPORTANT:  The Nokia software ("WRTKit and Example Widget files") is supplied to you by Nokia
+Corporation (�Nokia�) in consideration of your agreement to the following terms. Your use, installation
+and/or redistribution of the WRTKit and Example Widget files constitutes acceptance of these terms. If
+you do not agree with these terms, please do not use, install, or redistribute the WRTKit and Example
+Widget files.
+
+In consideration of your agreement to abide by the following terms, and subject to these terms, Nokia
+grants you a personal, non-exclusive license, under Nokia�s copyrights in the WRTKit and Example
+Widget files, to use, reproduce, and redistribute the WRTKit and Example files, in text form (for HTML,
+CSS, or JavaScript files) or binary form (for associated images), for the sole purpose of creating S60
+Widgets.
+
+If you redistribute the WRTKit and Example files, you must retain this entire notice in all such
+redistributions of the WRTKit and Example files.
+
+You may not use the name, trademarks, service marks or logos of Nokia to endorse or promote products
+that include the WRTKit and Example files without the prior written explicit agreement with Nokia.
+Except as expressly stated in this notice, no other rights or licenses, express or implied, are granted by
+Nokia herein, including but not limited to any patent rights that may be infringed by your products that
+incorporate the WRTKit and Example files or by other works in which the WRTKit and Example files
+may be incorporated.
+
+The WRTKit and Example files are provided on an "AS IS" basis.  NOKIA MAKES NO
+WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
+WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE, REGARDING THE EXAMPLES OR ITS USE AND OPERATION
+ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+
+IN NO EVENT SHALL NOKIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, AND/OR
+DISTRIBUTION OF THE EXAMPLES, HOWEVER CAUSED AND WHETHER UNDER THEORY
+OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE,
+EVEN IF NOKIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// The NavigationButton class implements a button control for use in
+// navigational contexts in menu-style UIs.
+
+// Constructor.
+function NavigationButton(id, image, text, titleBar) {
+    if (id != UI_NO_INIT_ID) {
+        this.init(id, image, text, titleBar);
+    }
+}
+
+// NavigationButton inherits from ActionControl.
+NavigationButton.prototype = new ActionControl(UI_NO_INIT_ID);
+
+// Button table element.
+NavigationButton.prototype.tableElement = null;
+
+// Button table row element.
+NavigationButton.prototype.tableRowElement = null;
+
+// Button table left cell element.
+NavigationButton.prototype.tableLeftCellElement = null;
+
+// Button table right cell element.
+NavigationButton.prototype.tableRightCellElement = null;
+
+// Button image element.
+NavigationButton.prototype.imageElement = null;
+
+// Button link element.
+NavigationButton.prototype.linkElement = null;
+
+// Button text element.
+NavigationButton.prototype.textElement = null;
+
+// Button table element.
+NavigationButton.prototype.titleBar = false;
+
+
+// Initializer - called from constructor.
+NavigationButton.prototype.init = function(id, image, text, titleBar) {
+    uiLogger.debug("NavigationButton.init(" + id + ", " + image + ", " + text + ")");
+    
+    // call superclass initializer
+    ActionControl.prototype.init.call(this, id, null);
+    
+	if ( titleBar != undefined ) {
+		this.titleBar = titleBar;
+	}
+    // remove caption element
+    this.assemblyElement.removeChild(this.captionElement);
+    
+    // construct the button
+    this.buttonElement = document.createElement("div");
+    this.tableElement = document.createElement("table");
+    this.tableRowElement = document.createElement("tr");
+    this.tableLeftCellElement = document.createElement("td");
+    this.tableRightCellElement = document.createElement("td");
+    this.imageElement = null;
+    this.linkElement = document.createElement("a");
+    this.linkElement.href = "JavaScript:void(0)";
+    this.textElement = document.createElement("span");
+    this.tableElement.appendChild(this.tableRowElement);
+    this.tableRowElement.appendChild(this.tableLeftCellElement);
+    this.tableRowElement.appendChild(this.tableRightCellElement);
+    this.tableRightCellElement.appendChild(this.linkElement);
+    this.linkElement.appendChild(this.textElement);
+    this.buttonElement.appendChild(this.tableElement);
+	this.controlElement.appendChild(this.buttonElement);
+
+    // set the image and text
+    this.setImage(image);
+    this.setText(text);
+    
+    // bind event listeners
+    this.bindActionControlListeners();
+    
+    // update the style
+    this.updateStyleFromState();
+}
+
+// Sets the enabled state.
+NavigationButton.prototype.setEnabled = function(enabled) {
+    uiLogger.debug("NavigationButton.setEnabled(" + enabled + ")");
+    
+    // bail out early if there is no change in state
+    if (this.enabled == enabled) {
+        return;
+    }
+    
+    // set the enabled state
+    this.enabled = enabled;
+    
+    if (this.enabled) {
+        // diabled -> enabled
+        this.tableRightCellElement.removeChild(this.textElement);
+        this.tableRightCellElement.appendChild(this.linkElement);
+        this.linkElement.appendChild(this.textElement);
+    } else {
+        // enabled -> diabled
+        this.linkElement.removeChild(this.textElement);
+        this.tableRightCellElement.removeChild(this.linkElement);
+        this.tableRightCellElement.appendChild(this.textElement);
+    }
+    
+    // update the style
+    this.updateStyleFromState();
+}
+
+// Returns the button image (URL); null if none.
+NavigationButton.prototype.getImage = function() {
+    return (this.imageElement != null) ? this.imageElement.src : null;
+}
+
+// Sets the button image (URL); null if none.
+NavigationButton.prototype.setImage = function(image) {
+    uiLogger.debug("NavigationButton.setImage(" + image + ")");
+    
+    if (image == null) {
+        // remove image - if any
+        if (this.imageElement != null) {
+            this.tableLeftCellElement.removeChild(this.imageElement);
+        }
+    } else {
+        // default to not append image element
+        var append = false;
+        
+        // create image element if one doesn't exist
+        if (this.imageElement == null) {
+            this.imageElement = document.createElement("img");
+            this.imageElement.setAttribute("id", "wrtnavimg");
+            this.imageElement.style.width = "auto";
+            append = true;
+        }
+        
+        this.imageElement.src = image;
+        
+        // append the image element to the left cell?
+        if (append) {
+            this.tableLeftCellElement.appendChild(this.imageElement);
+        }
+    }
+}
+
+// Returns the button text.
+NavigationButton.prototype.getText = function() {
+    return this.textElement.innerHTML;
+}
+
+// Sets the button text.
+NavigationButton.prototype.setText = function(text) {
+    uiLogger.debug("NavigationButton.setText(" + text + ")");
+    this.textElement.innerHTML = (text == null) ? "" : text;;
+}
+
+// Updates the style of the control to reflects the state of the control.
+NavigationButton.prototype.updateStyleFromState = function() {
+    uiLogger.debug("NavigationButton.updateStyleFromState()");
+    
+    // determine the state name
+    var stateName = this.getStyleStateName();
+    
+	if (this.titleBar) {
+		// set root element class name
+		this.setClassName(this.rootElement, "TitleBarControl");
+	}
+	else {
+		// set root element class name
+		this.setClassName(this.rootElement, "Control");
+	}
+    // set the control assembly class names
+    this.setClassName(this.assemblyElement, "ControlAssembly ControlAssembly" + stateName);
+    
+    // control element
+    this.setClassName(this.controlElement, "ControlElement NavigationButtonControlElement");
+    
+    // set the button table class names
+    this.setClassName(this.buttonElement, "NavigationButton");
+    this.setClassName(this.tableElement, "NavigationButtonTable");
+    this.setClassName(this.tableRowElement, "NavigationButtonRow");
+    this.setClassName(this.tableLeftCellElement, "NavigationButtonImageCell");
+    this.setClassName(this.tableRightCellElement, "NavigationButtonTextCell");
+    
+    // set image class names
+    if (this.imageElement) {
+        this.setClassName(this.imageElement, "NavigationButtonImage");
+    }
+    
+    // set the button text class name
+    this.setClassName(this.textElement, "NavigationButtonText NavigationButtonText" + stateName);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/WRTKit/UI/NotificationPopup.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,321 @@
+/*
+� Copyright 2008 Nokia Corporation. All rights reserved.
+
+IMPORTANT:  The Nokia software ("WRTKit and Example Widget files") is supplied to you by Nokia
+Corporation (�Nokia�) in consideration of your agreement to the following terms. Your use, installation
+and/or redistribution of the WRTKit and Example Widget files constitutes acceptance of these terms. If
+you do not agree with these terms, please do not use, install, or redistribute the WRTKit and Example
+Widget files.
+
+In consideration of your agreement to abide by the following terms, and subject to these terms, Nokia
+grants you a personal, non-exclusive license, under Nokia�s copyrights in the WRTKit and Example
+Widget files, to use, reproduce, and redistribute the WRTKit and Example files, in text form (for HTML,
+CSS, or JavaScript files) or binary form (for associated images), for the sole purpose of creating S60
+Widgets.
+
+If you redistribute the WRTKit and Example files, you must retain this entire notice in all such
+redistributions of the WRTKit and Example files.
+
+You may not use the name, trademarks, service marks or logos of Nokia to endorse or promote products
+that include the WRTKit and Example files without the prior written explicit agreement with Nokia.
+Except as expressly stated in this notice, no other rights or licenses, express or implied, are granted by
+Nokia herein, including but not limited to any patent rights that may be infringed by your products that
+incorporate the WRTKit and Example files or by other works in which the WRTKit and Example files
+may be incorporated.
+
+The WRTKit and Example files are provided on an "AS IS" basis.  NOKIA MAKES NO
+WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
+WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE, REGARDING THE EXAMPLES OR ITS USE AND OPERATION
+ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+
+IN NO EVENT SHALL NOKIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, AND/OR
+DISTRIBUTION OF THE EXAMPLES, HOWEVER CAUSED AND WHETHER UNDER THEORY
+OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE,
+EVEN IF NOKIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// The NotificationPopup class handles the display of notifications such as
+// warnings, information messages and progress indication.
+
+// Constructor.
+function NotificationPopup() {
+    // create notification popup
+    this.containerElement = document.createElement("div");
+    this.containerElement.className = "NotificationPopupContainer";
+    this.popupElement = document.createElement("div");
+    this.popupElement.className = "NotificationPopup";
+    this.typeIndicatorElement = document.createElement("div");
+    this.typeIndicatorElement.className = "NotificationPopupTypeIndicator";
+    this.textElement = document.createElement("div");
+    this.textElement.className = "NotificationPopupText";
+    this.progressBarElement = document.createElement("div");
+    this.progressBarElement.className = "NotificationPopupProgressBar";
+    
+    // assemble popup
+    this.popupElement.appendChild(this.typeIndicatorElement);
+    this.popupElement.appendChild(this.textElement);
+    this.popupElement.appendChild(this.progressBarElement);
+    this.containerElement.appendChild(this.popupElement);
+    
+    // create progress bar image element and initialize it
+    this.progressBarImageElement = document.createElement("img");
+    var self = this;
+    this.progressBarImageElement.addEventListener("load", function() { self.progressBarImageLoadingCompleted(); }, false);
+    this.progressBarImageElement.setAttribute("alt", "");
+    this.progressBarImageURL = this.getProgressBarImage(this.PROGRESS_BAR_IMAGE_NONE);
+    this.progressBarImageElement.src = this.progressBarImageURL;
+    this.progressBarElement.appendChild(this.progressBarImageElement);
+    
+    // init the popup to be fully down
+    this.popupElement.style.top = "100%";
+    
+    // set default popup contents
+    this.setPopupContents(null, null, null);
+}
+
+// Notification container element.
+NotificationPopup.prototype.containerElement = null;
+
+// Notification popup element.
+NotificationPopup.prototype.popupElement = null;
+
+// Type indicator element.
+NotificationPopup.prototype.typeIndicatorElement = null;
+
+// Notification text element.
+NotificationPopup.prototype.textElement = null;
+
+// Progress bar element.
+NotificationPopup.prototype.progressBarElement = null;
+
+// Progress bar image element.
+NotificationPopup.prototype.progressBarImageElement = null;
+
+// Progress bar image URL.
+NotificationPopup.prototype.progressBarImageURL = null;
+
+// Has the progress bar image been loaded?
+NotificationPopup.prototype.progressBarImageLoaded = false;
+
+// Flag that tracks whether we're in the middle of starting to
+// show a notification popup.
+NotificationPopup.prototype.processingShowNotification = false;
+
+// Notification popup position (0 = hidden, 1 = showing).
+NotificationPopup.prototype.popupPosition = 0;
+
+// Interval for timer ticks (in milliseconds)
+NotificationPopup.prototype.ANIM_TIMER_INTERVAL = 25;
+
+// Animation timer identifier or null if no active timer.
+NotificationPopup.prototype.animTimerId = null;
+
+// Time in milliseconds for the popup animation to complete
+NotificationPopup.prototype.ANIM_TIME = 300;
+
+// Flag that determines the behavior of showNotification(). If set to true
+// the popup will snap open when showNotification() is called instead of
+// animation.
+NotificationPopup.prototype.SHOW_SNAPS_OPEN = true;
+
+// Animation direction (0 = no movement, -1 hiding, +1 = showing).
+NotificationPopup.prototype.animDir = 0;
+
+// Auto-hide timer identifier or null if no active timer.
+NotificationPopup.prototype.autoHideTimerId = null;
+
+// The commanded display time.
+NotificationPopup.prototype.displayTime = -1;
+
+NotificationPopup.prototype.PROGRESS_BAR_IMAGE_NONE = 0;
+
+// Displays a notification.
+NotificationPopup.prototype.showNotification = function(displayTime, type, text, progress) {
+    uiLogger.debug("NotificationPopup.showNotification(" + displayTime + ", " + type + ", " + text + ", " + progress + ")");
+    
+    // mark that showNotification() has been called and that we are in
+    // the middle of starting to show the notification popup
+    this.processingShowNotification = true;
+    
+    // remember the display time
+    this.displayTime = displayTime;
+    
+    // attach the popup to the document if not attached
+    if (this.containerElement.parentNode == null) {
+        document.body.appendChild(this.containerElement);
+        uiLogger.debug("Notification popup attached to document");
+    }
+    
+    // set popup contents and update style
+    this.setPopupContents(type, text, progress);
+    
+    // if the progress image is loaded then we can complete the showing
+    // of the notification popup immediately - otherwise the image loaded
+    // allback will complete the process.
+    if (this.progressBarImageLoaded) {
+        this.completeShowNotification();
+    }
+}
+
+// Completes displaying of a notification.
+// Note: Used internally - don't call this directly.
+NotificationPopup.prototype.completeShowNotification = function() {
+    uiLogger.debug("NotificationPopup.completeShowNotification()");
+    
+    // animation direction is +1 for showing the popup
+    if (this.popupPosition != 1) {
+        if (this.SHOW_SNAPS_OPEN) {
+            if (this.popupPosition == 0) {
+                this.popupPosition = 1;
+            }
+        }
+        this.animatePopup(1);
+    }
+    
+    // setup auto hiding if a display time is specified
+    if (this.displayTime > 0) {
+        // stop any existing timer
+        if (this.autoHideTimerId != null) {
+            clearTimeout(this.autoHideTimerId);
+            uiLogger.debug("Auto hide timer stopped");
+        }
+        // set timer to hide notification
+        var self = this;
+        this.autoHideTimerId = setTimeout(function() {
+                                              if (self.displayTime > 0) {
+                                                  self.hideNotification();
+                                              }
+                                          }, this.ANIM_TIME + this.displayTime);
+        uiLogger.debug("Auto hide timer started");
+    }
+    
+    // mark us as no longer processing a show notification call
+    this.processingShowNotification = false;
+}
+
+// Hides the currently displayed notification.
+NotificationPopup.prototype.hideNotification = function() {
+    uiLogger.debug("NotificationPopup.hideNotification()");
+    // mark us as no longer processing a show notification call
+    this.processingShowNotification = false;
+    
+    // animation direction is -1 for hiding the popup
+    if (this.popupPosition != 0) {
+        this.animatePopup(-1);
+    }
+    
+    // stop auto hide timer if one is set
+    if (this.autoHideTimerId != null) {
+        clearTimeout(this.autoHideTimerId);
+        this.autoHideTimerId = null;
+        uiLogger.debug("Auto hide timer stopped");
+    }
+}
+
+// Starts animation of the popup (1 to show, -1 to hide).
+NotificationPopup.prototype.animatePopup = function(direction) {
+    uiLogger.debug("NotificationPopup.animatePopup(" + direction + ")");
+    // set the direction and star the animation timer
+    this.animDir = direction;
+    if (this.animTimerId == null) {
+        var self = this;
+        this.animTimerId = setInterval(function() { self.animate(); }, this.ANIM_TIMER_INTERVAL);
+        uiLogger.debug("Notification popup animation started");
+    }
+}
+
+// Callback for animation timer.
+NotificationPopup.prototype.animate = function() {
+    // calculate new popup position and clamp
+    var animStep = (this.ANIM_TIMER_INTERVAL / this.ANIM_TIME) * this.animDir;
+    var newPos = this.popupPosition + animStep;
+    if (newPos < 0) {
+        newPos = 0;
+    } else if (newPos > 1) {
+        newPos = 1;
+    }
+    
+    // set the new position to the popup element
+    this.popupPosition = newPos;
+    this.popupElement.style.top = (100 - Math.round(this.popupPosition * 100)) + "%";
+    
+    // have we reached the end of the animation?
+    if (newPos == 0 || newPos == 1) {
+        // reset animation direction
+        this.animDir = 0;
+        
+        // remove the popup from the body if its hidden
+        if (newPos == 0) {
+            document.body.removeChild(this.containerElement);
+            uiLogger.debug("Notification popup detached from document");
+        }
+        
+        // stop timer
+        clearTimeout(this.animTimerId);
+        this.animTimerId = null;
+        uiLogger.debug("Notification popup animation stopped");
+    }
+}
+
+// Returns a URL for the progress bar image to use for the specified progress.
+NotificationPopup.prototype.getProgressBarImage = function(progress) {
+    // path for progress bar images
+    var progressBarImagePath = "WRTKit/Resources/";
+    
+    // unknown progress
+    return progressBarImagePath + "ProgressBarUnknown.gif";
+}
+
+// Sets the contents of the popup.
+NotificationPopup.prototype.setPopupContents = function(type, text, progress) {
+    uiLogger.debug("NotificationPopup.setPopupContents(" + type + ", " + text + ", " + progress + ")");
+    
+    // figure out notification type style name
+    var typeName = (type == null) ? "none" : type.toLowerCase();
+    typeName = typeName.charAt(0).toUpperCase() + typeName.substring(1);
+    
+    // set type element class names
+    this.typeIndicatorElement.className = "NotificationPopupTypeIndicator NotificationPopupTypeIndicator" + typeName;
+    
+    // set notification text
+    this.textElement.innerHTML = (text == null) ? "" : text;
+    
+    // set progress
+    this.progressBarElement.style.display = (progress == null) ? "none" : "block";
+    if (progress != null) {
+        var imgURL = this.getProgressBarImage(progress);
+        if (imgURL != this.progressBarImageURL) {
+            // load new image
+            this.progressBarImageLoaded = false;
+            this.progressBarImageURL = imgURL;
+            this.progressBarImageElement.src = imgURL;
+        } else {
+            // the correct image is already loaded
+            this.progressBarImageLoaded = true;
+        }
+    } else {
+        // there is no progress bar so there is no need
+        // to load any progress bar image
+        this.progressBarImageLoaded = true;
+    }
+}
+
+// Callback for notifying the object that its progress bar image completed loading.
+NotificationPopup.prototype.progressBarImageLoadingCompleted = function() {
+    uiLogger.debug("NotificationPopup.progressBarImageLoadingCompleted()");
+    
+    // mark the progress bar image as loaded
+    this.progressBarImageLoaded = true;
+    
+    // complete the process of displaying the notification popup
+    // if it has been commanded but not yet completed
+    if (this.processingShowNotification) {
+        this.completeShowNotification();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/WRTKit/UI/Scrollbar.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,173 @@
+/*
+© Copyright 2008 Nokia Corporation. All rights reserved.
+
+IMPORTANT:  The Nokia software ("WRTKit and Example Widget files") is supplied to you by Nokia
+Corporation (“Nokia”) in consideration of your agreement to the following terms. Your use, installation
+and/or redistribution of the WRTKit and Example Widget files constitutes acceptance of these terms. If
+you do not agree with these terms, please do not use, install, or redistribute the WRTKit and Example
+Widget files.
+
+In consideration of your agreement to abide by the following terms, and subject to these terms, Nokia
+grants you a personal, non-exclusive license, under Nokia’s copyrights in the WRTKit and Example
+Widget files, to use, reproduce, and redistribute the WRTKit and Example files, in text form (for HTML,
+CSS, or JavaScript files) or binary form (for associated images), for the sole purpose of creating S60
+Widgets.
+
+If you redistribute the WRTKit and Example files, you must retain this entire notice in all such
+redistributions of the WRTKit and Example files.
+
+You may not use the name, trademarks, service marks or logos of Nokia to endorse or promote products
+that include the WRTKit and Example files without the prior written explicit agreement with Nokia.
+Except as expressly stated in this notice, no other rights or licenses, express or implied, are granted by
+Nokia herein, including but not limited to any patent rights that may be infringed by your products that
+incorporate the WRTKit and Example files or by other works in which the WRTKit and Example files
+may be incorporated.
+
+The WRTKit and Example files are provided on an "AS IS" basis.  NOKIA MAKES NO
+WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
+WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE, REGARDING THE EXAMPLES OR ITS USE AND OPERATION
+ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+
+IN NO EVENT SHALL NOKIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, AND/OR
+DISTRIBUTION OF THE EXAMPLES, HOWEVER CAUSED AND WHETHER UNDER THEORY
+OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE,
+EVEN IF NOKIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// The Scrollbar class is an implementation of a user interface element that
+// indicates the current viewport position in a document.
+
+// Constructor.
+function Scrollbar(parentElement) {
+    uiLogger.debug("Scrollbar(" + parentElement + ")");
+    
+    // get the parent element
+    this.parentElement = parentElement;
+    
+    // create the root element
+    this.rootElement = document.createElement("div");
+    this.rootElement.className = "Scrollbar";
+    this.rootElement.style.visibility = "hidden";
+    
+    // create the scrollbar
+    // the scrollbar consists of a root element with six children
+    // (three track elements and three thumb elements)
+    
+    // track
+    this.trackTopElement = document.createElement("div");
+    this.trackTopElement.className = "ScrollbarTrackTop";
+    this.trackMiddleElement = document.createElement("div");
+    this.trackMiddleElement.className = "ScrollbarTrackMiddle";
+    this.trackBottomElement = document.createElement("div");
+    this.trackBottomElement.className = "ScrollbarTrackBottom";
+    
+    // thumb
+    this.thumbTopElement = document.createElement("div");
+    this.thumbTopElement.className = "ScrollbarThumbTop";
+    this.thumbMiddleElement = document.createElement("div");
+    this.thumbMiddleElement.className = "ScrollbarThumbMiddle";
+    this.thumbBottomElement = document.createElement("div");
+    this.thumbBottomElement.className = "ScrollbarThumbBottom";
+    
+    // assemble and attach the scrollbar
+    this.rootElement.appendChild(this.trackTopElement);
+    this.rootElement.appendChild(this.trackMiddleElement);
+    this.rootElement.appendChild(this.trackBottomElement);
+    this.rootElement.appendChild(this.thumbTopElement);
+    this.rootElement.appendChild(this.thumbMiddleElement);
+    this.rootElement.appendChild(this.thumbBottomElement);
+    this.parentElement.appendChild(this.rootElement);
+    
+    // bring the scrollbar up to date
+    this.update(0, 100, 100);
+}
+
+// Parent element for the scrollbar.
+Scrollbar.prototype.parentElement = null;
+
+// Root HTML element in the scrollbar.
+Scrollbar.prototype.rootElement = null;
+
+// Scrollbar track top element.
+Scrollbar.prototype.trackTopElement = null;
+
+// Scrollbar track middle element.
+Scrollbar.prototype.trackMiddleElement = null;
+
+// Scrollbar track bottom element.
+Scrollbar.prototype.trackBottomElement = null;
+
+// Scrollbar thumb top element.
+Scrollbar.prototype.thumbTopElement = null;
+
+// Scrollbar thumb middle element.
+Scrollbar.prototype.thumbMiddleElement = null;
+
+// Scrollbar thumb bottom element.
+Scrollbar.prototype.thumbBottomElement = null;
+
+// Is the scrollbar needed?
+Scrollbar.prototype.scrollbarNeeded = false;
+
+// Updates the scrollbar.
+Scrollbar.prototype.update = function(scrollY, viewportHeight, documentHeight) {
+    // figure out current heights
+    var scrollbarHeight = this.rootElement.clientHeight;
+    var trackTopHeight = this.trackTopElement.clientHeight;
+    var trackBottomHeight = this.trackBottomElement.clientHeight;
+    var thumbTopHeight = this.thumbTopElement.clientHeight;
+    var thumbBottomHeight = this.thumbBottomElement.clientHeight;
+    
+    // scrollable height is the larger of document and viewport heights
+    var scrollableHeight = documentHeight;
+    var scrollbarNeeded = true;
+    if (viewportHeight >= documentHeight) {
+        scrollableHeight = viewportHeight;
+        scrollbarNeeded = false;
+    }
+    
+    // show or hide scrollbar?
+    if (scrollbarNeeded != this.scrollbarNeeded) {
+        this.scrollbarNeeded = scrollbarNeeded;
+        this.rootElement.style.visibility = scrollbarNeeded ? "visible" : "hidden";
+    }
+    
+    // calculate thumb top position...
+    var thumbTopPct = scrollY / scrollableHeight;
+    var thumbTop = scrollbarHeight * thumbTopPct;
+    // ...and bottom position...
+    var thumbBottomPct = (scrollY + viewportHeight) / scrollableHeight;
+    var thumbBottom = scrollbarHeight * thumbBottomPct;
+    
+    // ...and thumb height
+    var thumbHeight = thumbBottom - thumbTop;
+    
+    // ensure that the thumb is not too small
+    var thumbMinHeight = thumbTopHeight + thumbBottomHeight;
+    if (thumbHeight < thumbMinHeight) {
+        var underflow = thumbMinHeight - thumbHeight;
+        // adjust thumb top pos assuming a shorter scrollbar track
+        var thumbMid = (scrollbarHeight - underflow) * ((thumbTopPct + thumbBottomPct) / 2) + (underflow / 2);
+        thumbTop = thumbMid - (thumbMinHeight / 2);
+        thumbBottom = thumbTop + thumbMinHeight;
+        thumbHeight = thumbBottom - thumbTop;
+    }
+    
+    // position and size track element (add 1 to the middle section height for rounding errors)
+    this.trackTopElement.style.top = "0px";
+    this.trackMiddleElement.style.top = Math.round(trackTopHeight) + "px";
+    this.trackMiddleElement.style.height = Math.round(scrollbarHeight - trackTopHeight - trackBottomHeight + 1) + "px";
+    this.trackBottomElement.style.top = Math.round(scrollbarHeight - trackTopHeight) + "px";
+    
+    // position and size thumb element (add 1 to the middle section height for rounding errors)
+    this.thumbTopElement.style.top = Math.round(thumbTop) + "px";
+    this.thumbMiddleElement.style.top = Math.round(thumbTop + thumbTopHeight) + "px";
+    this.thumbMiddleElement.style.height = Math.round(thumbHeight - thumbTopHeight - thumbBottomHeight + 1) + "px";
+    this.thumbBottomElement.style.top = Math.round(thumbBottom - thumbBottomHeight) + "px";
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/WRTKit/UI/SelectionControl.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,189 @@
+/*
+© Copyright 2008 Nokia Corporation. All rights reserved.
+
+IMPORTANT:  The Nokia software ("WRTKit and Example Widget files") is supplied to you by Nokia
+Corporation (“Nokia”) in consideration of your agreement to the following terms. Your use, installation
+and/or redistribution of the WRTKit and Example Widget files constitutes acceptance of these terms. If
+you do not agree with these terms, please do not use, install, or redistribute the WRTKit and Example
+Widget files.
+
+In consideration of your agreement to abide by the following terms, and subject to these terms, Nokia
+grants you a personal, non-exclusive license, under Nokia’s copyrights in the WRTKit and Example
+Widget files, to use, reproduce, and redistribute the WRTKit and Example files, in text form (for HTML,
+CSS, or JavaScript files) or binary form (for associated images), for the sole purpose of creating S60
+Widgets.
+
+If you redistribute the WRTKit and Example files, you must retain this entire notice in all such
+redistributions of the WRTKit and Example files.
+
+You may not use the name, trademarks, service marks or logos of Nokia to endorse or promote products
+that include the WRTKit and Example files without the prior written explicit agreement with Nokia.
+Except as expressly stated in this notice, no other rights or licenses, express or implied, are granted by
+Nokia herein, including but not limited to any patent rights that may be infringed by your products that
+incorporate the WRTKit and Example files or by other works in which the WRTKit and Example files
+may be incorporated.
+
+The WRTKit and Example files are provided on an "AS IS" basis.  NOKIA MAKES NO
+WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
+WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE, REGARDING THE EXAMPLES OR ITS USE AND OPERATION
+ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+
+IN NO EVENT SHALL NOKIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, AND/OR
+DISTRIBUTION OF THE EXAMPLES, HOWEVER CAUSED AND WHETHER UNDER THEORY
+OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE,
+EVEN IF NOKIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// The SelectionControl class is an abstract base class for controls that lets
+// the user select one or more options from a list of options. Don't use
+// SelectionControl directly.
+
+// Constructor.
+function SelectionControl(id, caption, options, multipleSelection, selected) {
+    if (id != UI_NO_INIT_ID) {
+        this.init(id, caption, options, multipleSelection, selected);
+    }
+}
+
+// SelectionControl inherits from Control.
+SelectionControl.prototype = new Control(UI_NO_INIT_ID);
+
+// List of options.
+SelectionControl.prototype.options = null;
+
+// The single selected option in single selection controls
+// or list of options in multi selection controls.
+SelectionControl.prototype.selected = null;
+
+// Single or multiple selection.
+SelectionControl.prototype.multipleSelection = false;
+
+// Initializer - called from constructor.
+SelectionControl.prototype.init = function(id, caption, options, multipleSelection, selected) {
+    uiLogger.debug("SelectionControl.init(" + id + ", " + caption + ", " + options + ", " + multipleSelection + ", " + selected + ")");
+    
+    // call superclass initializer
+    Control.prototype.init.call(this, id, caption);
+    
+    // set the multiple selection property
+    this.multipleSelection = multipleSelection;
+    
+    // init options and selected (makes copies of the original arrays)
+    this.options = (options != null) ? options.slice(0) : [];
+    if (multipleSelection) {
+        this.selected = (selected == null) ? [] : selected.slice(0);
+    } else {
+        this.selected = selected;
+    }
+    this.validateSelected();
+}
+
+// Returns true if the control is a multiple selection control; false if single.
+SelectionControl.prototype.isMultipleSelection = function() {
+    return this.multipleSelection;
+}
+
+// Returns true if the specified option is selected; false if not.
+SelectionControl.prototype.isSelected = function(option) {
+    if (this.multipleSelection) {
+        // multiple selection
+        // iterate through all selected options and look for the specified option
+        for (var i = 0; i < this.selected.length; i++) {
+            if (this.selected[i] == option) {
+                return true;
+            }
+        }
+        return false;
+    } else {
+        // single selection
+        return (this.selected == option);
+    }
+}
+
+// Returns the currently selected option in a single selection control or
+// an array of selected options in a multiple selection control. If there are
+// no selected options a single selection control returns null and a multiple
+// selection control returns an empty array.
+SelectionControl.prototype.getSelected = function() {
+    return this.multipleSelection ? this.selected.slice(0) : this.selected;
+}
+
+// Sets the currently selected options. Pass a single option in a single selection
+// control or an array of selected controls in a multiple selection control. To
+// deselect all options pass null in a single selection control and an empty array
+// in a multiple selection control.
+// Override in sublcasses to provide full implementation.
+SelectionControl.prototype.setSelected = function(selected) {
+    this.selected = this.multipleSelection ? selected.slice(0) : selected;
+    // make sure the selected option or options are legal
+    this.validateSelected();
+}
+
+// Ensures that the selected option or options exist among the options in this control.
+SelectionControl.prototype.validateSelected = function() {
+    if (this.multipleSelection) {
+        // multiple selection
+        // iterate through all selected options and ensure they exist among the options
+        for (var i = 0; i < this.selected.length; i++) {
+            // check that the selected option exists among the options
+            var found = false;
+            for (var j = 0; j < this.options.length; j++) {
+                if (this.options[j] == this.selected[i]) {
+                    // found - stop looking for this option
+                    found = true;
+                    break;
+                }
+            }
+            // not found - remove this selected element
+            if (!found) {
+                this.selected.splice(i, 1);
+                // since we removed an entry we must re-check this position
+                i--;
+            }
+        }
+    } else {
+        // single selection
+        if (this.selected != null) {
+            // check that the selected option exists among the options
+            for (var i = 0; i < this.options.length; i++) {
+                if (this.options[i] == this.selected) {
+                    // found - we're done
+                    return;
+                }
+            }
+            // not found - remove the selection
+            this.selected = null;
+        }
+    }
+}
+
+// Returns the options in the control as an array of option objects with
+// a value and text property.
+SelectionControl.prototype.getOptions = function() {
+    return this.options;
+}
+
+// Sets the options in the control.
+// Override in sublcasses to provide full implementation.
+SelectionControl.prototype.setOptions = function(options) {
+    this.options = options.slice(0);
+    // make sure the selected option or options are legal
+    this.validateSelected();
+}
+
+// Returns the option that has the specified value; null if none.
+SelectionControl.prototype.getOptionForValue = function(value) {
+    // iterate through all options and look for a match
+    for (var i = 0; i < this.options.length; i++) {
+        if (this.options[i].value == value) {
+            return this.options[i];
+        }
+    }
+    return null;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/WRTKit/UI/SelectionList.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,355 @@
+/*
+© Copyright 2008 Nokia Corporation. All rights reserved.
+
+IMPORTANT:  The Nokia software ("WRTKit and Example Widget files") is supplied to you by Nokia
+Corporation (“Nokia”) in consideration of your agreement to the following terms. Your use, installation
+and/or redistribution of the WRTKit and Example Widget files constitutes acceptance of these terms. If
+you do not agree with these terms, please do not use, install, or redistribute the WRTKit and Example
+Widget files.
+
+In consideration of your agreement to abide by the following terms, and subject to these terms, Nokia
+grants you a personal, non-exclusive license, under Nokia’s copyrights in the WRTKit and Example
+Widget files, to use, reproduce, and redistribute the WRTKit and Example files, in text form (for HTML,
+CSS, or JavaScript files) or binary form (for associated images), for the sole purpose of creating S60
+Widgets.
+
+If you redistribute the WRTKit and Example files, you must retain this entire notice in all such
+redistributions of the WRTKit and Example files.
+
+You may not use the name, trademarks, service marks or logos of Nokia to endorse or promote products
+that include the WRTKit and Example files without the prior written explicit agreement with Nokia.
+Except as expressly stated in this notice, no other rights or licenses, express or implied, are granted by
+Nokia herein, including but not limited to any patent rights that may be infringed by your products that
+incorporate the WRTKit and Example files or by other works in which the WRTKit and Example files
+may be incorporated.
+
+The WRTKit and Example files are provided on an "AS IS" basis.  NOKIA MAKES NO
+WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
+WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE, REGARDING THE EXAMPLES OR ITS USE AND OPERATION
+ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+
+IN NO EVENT SHALL NOKIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, AND/OR
+DISTRIBUTION OF THE EXAMPLES, HOWEVER CAUSED AND WHETHER UNDER THEORY
+OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE,
+EVEN IF NOKIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// The SelectionList class implements a single or multi selection control
+// that lets users select one or more options from a list of options.
+
+// Constructor.
+function SelectionList(id, caption, options, multipleSelection, selected) {
+    if (id != UI_NO_INIT_ID) {
+        this.init(id, caption, options, multipleSelection, selected);
+    }
+}
+
+// SelectionList inherits from SelectionControl.
+SelectionList.prototype = new SelectionControl(UI_NO_INIT_ID);
+
+// Root element for options.
+SelectionList.prototype.optionListElement = null;
+
+// Array for tracking option elements.
+SelectionList.prototype.optionElements = null;
+
+// Tracking for currently focused option; null if none.
+SelectionList.prototype.focusedOption = null;
+
+// Enabled status.
+SelectionList.prototype.enabled = false;
+
+// Initializer - called from constructor.
+SelectionList.prototype.init = function(id, caption, options, multipleSelection, selected) {
+    uiLogger.debug("SelectionList.init(" + id + ", " + caption + ", " + options + ", " + multipleSelection + ", " + selected + ")");
+    
+    // call superclass initializer
+    SelectionControl.prototype.init.call(this, id, caption, options, multipleSelection, selected);
+    
+    // create option list element
+    this.optionListElement = document.createElement("div");
+    this.controlElement.appendChild(this.optionListElement);
+    
+    // the control defaults to enabled
+    this.enabled = true;
+    
+    // init option element arrays
+    this.optionElements = [];
+    
+    // update the option elements to match the options in this control
+    this.updateOptionElements();
+}
+
+// Returns the enabled state.
+SelectionList.prototype.isEnabled = function() {
+    return this.enabled;
+}
+
+// Sets the enabled state.
+SelectionList.prototype.setEnabled = function(enabled) {
+    uiLogger.debug("SelectionList.setEnabled(" + enabled + ")");
+    // switch the state and update the the control
+    this.enabled = enabled;
+    this.updateOptionElements();
+}
+
+// Sets the focused state for the control.
+// Note: This may not always succeed.
+SelectionList.prototype.setFocused = function(focused) {
+    uiLogger.debug("SelectionList.setFocused(" + focused + ")");
+    if (this.enabled && this.optionElements.length > 0) {
+        if (focused) {
+            this.optionElements[0].link.focus();
+        } else {
+            this.optionElements[0].link.blur();
+        }
+    }
+}
+
+// Sets the currently selected options. Pass a single option in a single selection
+// control or an array of selected controls in a multiple selection control. To
+// deselect all options pass null in a single selection control and an empty array
+// in a multiple selection control.
+SelectionList.prototype.setSelected = function(selected) {
+    // call superclass setSelected()
+    SelectionControl.prototype.setSelected.call(this, selected);
+    this.updateStyleFromState();
+}
+
+// Sets the options in the control.
+SelectionList.prototype.setOptions = function(options) {
+    // call superclass setOptions()
+    SelectionControl.prototype.setOptions.call(this, options);
+    this.updateOptionElements();
+}
+
+// Updates the option elements for the control element.
+SelectionList.prototype.updateOptionElements = function() {
+    uiLogger.debug("SelectionControl.updateOptionElements()");
+    
+    // start by removing all current options from the option list element
+    while (this.optionListElement.firstChild != null) {
+        this.optionListElement.removeChild(this.optionListElement.firstChild);
+    }
+    
+    // iterate through the options and add (and possibly create) a
+    // properly configured option element for each option
+    for (var i = 0; i < this.options.length; i++) {
+        // get the option and option element we're working on
+        var option = this.options[i];
+        
+        // option, link and text elements for this option
+        var optionElement;
+        var optionLinkElement;
+        var optionTextElement;
+        
+        // get the elements
+        if (i == this.optionElements.length) {
+            // we need to create a new option element...
+            optionElement = document.createElement("div");
+            
+            // ...and a new option link element...
+            optionLinkElement = document.createElement("a");
+            optionLinkElement.href = "JavaScript:void(0)";
+            
+            // ...and a new option text element
+            optionTextElement = document.createElement("span");
+            
+            // hook up event listeners to the element
+            var self = this;
+            optionLinkElement.addEventListener("focus", function(event) { self.optionFocusStateChanged(event, true); }, false);
+            optionLinkElement.addEventListener("blur", function(event) { self.optionFocusStateChanged(event, false); }, false);
+            optionElement.addEventListener("mouseover", function() { self.hoverStateChanged(true); }, false);
+            optionElement.addEventListener("mouseout", function() { self.hoverStateChanged(false); }, false);
+            optionElement.addEventListener("mousedown", function(event) {
+                                                               self.optionClicked(event)
+                                                               event.stopPropagation();
+                                                               event.preventDefault();
+                                                        }, true);
+            optionElement.addEventListener("keydown", function(event) {
+                                                            // center and enter trigger the action
+                                                            if (event.keyCode == 0 || event.keyCode == 13) {
+                                                                self.optionClicked(event)
+                                                                event.stopPropagation();
+                                                                event.preventDefault();
+                                                            }
+                                                      }, true);
+            
+            // add the elements to the option element array
+            this.optionElements.push({ option: optionElement, link: optionLinkElement, text: optionTextElement });
+        } else {
+            // we already have ready elements so we'll reuse them
+            optionElement = this.optionElements[i].option;
+            optionLinkElement = this.optionElements[i].link;
+            optionTextElement = this.optionElements[i].text;
+            
+            // remove the option link element from its current parent - if any
+            if (optionLinkElement.parentNode != null) {
+                optionLinkElement.parentNode.removeChild(optionLinkElement);
+            }
+            
+            // remove the option text element from its current parent - if any
+            if (optionTextElement.parentNode != null) {
+                optionTextElement.parentNode.removeChild(optionTextElement);
+            }
+        }
+        
+        // set the option text
+        optionTextElement.innerHTML = option.text;
+        
+        // hook up the option to the control
+        if (this.enabled) {
+            // add the option link element to the option element
+            optionElement.appendChild(optionLinkElement);
+            // add the text element to the option element
+            optionLinkElement.appendChild(optionTextElement);
+        } else {
+            // add the text element directly to the control element
+            optionElement.appendChild(optionTextElement);
+        }
+        // add the option element to the option list element
+        this.optionListElement.appendChild(optionElement);
+    }
+    
+    // update the style
+    this.updateStyleFromState();
+}
+
+// Callback for focus state change events.
+SelectionList.prototype.optionFocusStateChanged = function(event, focused) {
+    uiLogger.debug("SelectionControl.optionFocusStateChanged()");
+    
+    // get the event source option
+    var option = null;
+    var optionElement = null;
+    for (var i = 0; i < this.optionElements.length; i++) {
+        optionElement = this.optionElements[i];
+        if (optionElement.link == event.currentTarget) {
+            option = this.options[i];
+            break;
+        }
+    }
+    
+    // remember the focused option; or null if none is focused
+    if (focused) {
+        this.focusedOption = option;
+    } else {
+        this.focusedOption = null;
+    }
+    
+    // call the superclass focus state change handler
+    this.focusStateChanged(focused);
+}
+
+// Callback for clicks.
+SelectionList.prototype.optionClicked = function(event) {
+    uiLogger.debug("SelectionControl.optionClicked()");
+    
+    // bail out if we're not enabled
+    if (!this.enabled) {
+        return false;
+    }
+    
+    // get the changed option
+    var option = null;
+    var optionElement = null;
+    for (var i = 0; i < this.optionElements.length; i++) {
+        optionElement = this.optionElements[i];
+        if (optionElement.option == event.currentTarget) {
+            option = this.options[i];
+            break;
+        }
+    }
+    
+    // make sure the option is focused
+    optionElement.link.focus();
+    
+    // toggle the selection
+    if (this.multipleSelection) {
+        // iterate through the selected options and see if this
+        // option is selected. if not then add it to the selection.
+        // if it already is selected then them remove it.
+        var found = false;
+        for (var i = 0; i < this.selected.length; i++) {
+            if (this.selected[i] == option) {
+                // remove from selected set
+                found = true;
+                this.selected.splice(i, 1);
+                break;
+            }
+        }
+        if (!found) {
+            // add to the selected set
+            this.selected.push(option);
+        }
+    } else {
+        // update the selected option
+        this.selected = option;
+    }
+    
+    // update the style
+    this.updateStyleFromState();
+    
+    // notify event listeners
+    this.fireEvent(this.createEvent("SelectionChanged", this.getSelected()));
+}
+
+// Resets the state tracking for focus and hover.
+// Override this in subclasses as required to implement the state reset.
+SelectionList.prototype.resetFocusState = function() {
+    uiLogger.debug("SelectionList.resetFocusState()");
+    this.hovering = false;
+    this.focused = false;
+    this.focusedOption = null;
+    this.updateStyleFromState();
+}
+
+// Updates the style of the control to reflects the state of the control.
+SelectionList.prototype.updateStyleFromState = function() {
+    uiLogger.debug("SelectionList.updateStyleFromState()");
+    
+    // determine the state name
+    var stateName = this.getStyleStateName();
+    
+    // set element class names
+    this.setClassName(this.rootElement, "Control");
+    this.setClassName(this.controlElement, "ControlElement");
+    this.setClassName(this.assemblyElement, "ControlAssembly ControlAssembly" + stateName);
+    this.setClassName(this.captionElement, "ControlCaption ControlCaption" + stateName);
+    
+    // set option list and option class names
+    this.setClassName(this.optionListElement, "SelectionList SelectionList" + stateName);
+    for (var i = 0; i < this.options.length; i++) {
+        var option = this.options[i];
+        
+        // get the option and option text elements for this option
+        var optionElement = this.optionElements[i].option;
+        var optionTextElement = this.optionElements[i].text;
+        
+        // figure out the option state
+        var optionStateName = this.isSelected(option) ? "Checked" : "Unchecked";
+        if (!this.enabled) {
+            optionStateName += "Disabled";
+        } else if (this.focusedOption == option) {
+            optionStateName += "Focus";
+        } else {
+            optionStateName += "Normal";
+        }
+        
+        // set option element class names
+        if (this.multipleSelection) {
+            this.setClassName(optionElement, "SelectionListOptionMulti SelectionListOptionMulti" + optionStateName);
+        } else {
+            this.setClassName(optionElement, "SelectionListOptionSingle SelectionListOptionSingle" + optionStateName);
+        }
+        
+        // set option text class names
+        this.setClassName(optionTextElement, "SelectionListOptionText SelectionListOptionText" + stateName);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/WRTKit/UI/SelectionMenu.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,204 @@
+/*
+© Copyright 2008 Nokia Corporation. All rights reserved.
+
+IMPORTANT:  The Nokia software ("WRTKit and Example Widget files") is supplied to you by Nokia
+Corporation (“Nokia”) in consideration of your agreement to the following terms. Your use, installation
+and/or redistribution of the WRTKit and Example Widget files constitutes acceptance of these terms. If
+you do not agree with these terms, please do not use, install, or redistribute the WRTKit and Example
+Widget files.
+
+In consideration of your agreement to abide by the following terms, and subject to these terms, Nokia
+grants you a personal, non-exclusive license, under Nokia’s copyrights in the WRTKit and Example
+Widget files, to use, reproduce, and redistribute the WRTKit and Example files, in text form (for HTML,
+CSS, or JavaScript files) or binary form (for associated images), for the sole purpose of creating S60
+Widgets.
+
+If you redistribute the WRTKit and Example files, you must retain this entire notice in all such
+redistributions of the WRTKit and Example files.
+
+You may not use the name, trademarks, service marks or logos of Nokia to endorse or promote products
+that include the WRTKit and Example files without the prior written explicit agreement with Nokia.
+Except as expressly stated in this notice, no other rights or licenses, express or implied, are granted by
+Nokia herein, including but not limited to any patent rights that may be infringed by your products that
+incorporate the WRTKit and Example files or by other works in which the WRTKit and Example files
+may be incorporated.
+
+The WRTKit and Example files are provided on an "AS IS" basis.  NOKIA MAKES NO
+WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
+WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE, REGARDING THE EXAMPLES OR ITS USE AND OPERATION
+ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+
+IN NO EVENT SHALL NOKIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, AND/OR
+DISTRIBUTION OF THE EXAMPLES, HOWEVER CAUSED AND WHETHER UNDER THEORY
+OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE,
+EVEN IF NOKIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// The SelectionMenu class implements a single or multi selection control
+// that lets users select one or more options from a menu.
+
+// Constructor.
+function SelectionMenu(id, caption, options, multipleSelection, selected) {
+    if (id != UI_NO_INIT_ID) {
+        this.init(id, caption, options, multipleSelection, selected);
+    }
+}
+
+// SelectionMenu inherits from SelectionControl.
+SelectionMenu.prototype = new SelectionControl(UI_NO_INIT_ID);
+
+// Reference to the peer HTML element.
+SelectionControl.prototype.peerElement = null;
+
+// Array for tracking option elements.
+SelectionMenu.prototype.optionElements = null;
+
+// Initializer - called from constructor.
+SelectionMenu.prototype.init = function(id, caption, options, multipleSelection, selected) {
+    uiLogger.debug("SelectionMenu.init(" + id + ", " + caption + ", " + options + ", " + multipleSelection + ", " + selected + ")");
+    
+    // call superclass initializer
+    SelectionControl.prototype.init.call(this, id, caption, options, multipleSelection, selected);
+    
+    // create the control
+    this.peerElement = document.createElement("select");
+    this.peerElement.multiple = multipleSelection;
+    this.controlElement.appendChild(this.peerElement);
+    
+    // init option elements array
+    this.optionElements = [];
+    
+    // update the option elements to match the options in this control
+    this.updateOptionElements();
+    
+    // bind event listeners
+    var self = this;
+    this.peerElement.addEventListener("focus", function() { self.focusStateChanged(true); }, false);
+    this.peerElement.addEventListener("blur", function() { self.focusStateChanged(false); }, false);
+    this.peerElement.addEventListener("mouseover", function() { self.hoverStateChanged(true); }, false);
+    this.peerElement.addEventListener("mouseout", function() { self.hoverStateChanged(false); }, false);
+    this.peerElement.addEventListener("change", function() { self.selectionChanged(); }, false);
+}
+
+// Returns the enabled state.
+SelectionMenu.prototype.isEnabled = function() {
+    return !this.peerElement.disabled;
+}
+
+// Sets the enabled state.
+SelectionMenu.prototype.setEnabled = function(enabled) {
+    uiLogger.debug("SelectionMenu.setEnabled(" + enabled + ")");
+    this.peerElement.disabled = !enabled;
+}
+
+// Sets the focused state for the control.
+// Note: This may not always succeed.
+SelectionMenu.prototype.setFocused = function(focused) {
+    uiLogger.debug("SelectionMenu.setFocused(" + focused + ")");
+    if (focused) {
+        this.peerElement.focus();
+    } else {
+        this.peerElement.blur();
+    }
+}
+
+// Sets the currently selected options. Pass a single option in a single selection
+// control or an array of selected controls in a multiple selection control. To
+// deselect all options pass null in a single selection control and an empty array
+// in a multiple selection control.
+SelectionMenu.prototype.setSelected = function(selected) {
+    // call superclass setSelected()
+    SelectionControl.prototype.setSelected.call(this, selected);
+    
+    // iterate through the options and set the selected state
+    // on the corresponding option element
+    for (var i = 0; i < this.options.length; i++) {
+        this.optionElements[i].selected = this.isSelected(this.options[i]);
+    }
+}
+
+// Sets the options in the control.
+SelectionMenu.prototype.setOptions = function(options) {
+    // call superclass setOptions()
+    SelectionControl.prototype.setOptions.call(this, options);
+    this.updateOptionElements();
+}
+
+// Updates the option elements for the peer select element.
+SelectionMenu.prototype.updateOptionElements = function() {
+    // start by removing all current options from the select element
+    while (this.peerElement.firstChild != null) {
+        this.peerElement.removeChild(this.peerElement.firstChild);
+    }
+    
+    // iterate through the options and add (and possibly create) a
+    // properly configured option element for each option
+    for (var i = 0; i < this.options.length; i++) {
+        // do we need to create a new option element?
+        if (i == this.optionElements.length) {
+            this.optionElements.push(document.createElement("option"));
+        }
+        
+        // get the option and option element we're working on
+        var option = this.options[i];
+        var optionElement = this.optionElements[i];
+        
+        // set the state for this option element and add it to the
+        // peer select element
+        optionElement.text = option.text;
+        optionElement.selected = this.isSelected(option);
+        this.peerElement.appendChild(optionElement);
+    }
+    
+    // update the style
+    this.updateStyleFromState();    
+}
+
+// Callback for selection change events.
+SelectionMenu.prototype.selectionChanged = function() {
+    uiLogger.debug("SelectionControl.selectionChanged()");
+    
+    // update the selected options array or reference
+    this.selected = (this.multipleSelection) ? [] : null;
+    for (var i = 0; i < this.options.length; i++) {
+        if (this.optionElements[i].selected) {
+            if (this.multipleSelection) {
+                this.selected.push(this.options[i]);
+            } else {
+                this.selected = this.options[i];
+                break;
+            }
+        }
+    }
+    
+    // notify event listeners
+    this.fireEvent(this.createEvent("SelectionChanged", this.getSelected()));
+}
+
+// Updates the style of the control to reflects the state of the control.
+SelectionMenu.prototype.updateStyleFromState = function() {
+    uiLogger.debug("SelectionMenu.updateStyleFromState()");
+    
+    // determine the state name
+    var stateName = this.getStyleStateName();
+    
+    // set element class names
+    this.setClassName(this.rootElement, "Control");
+    this.setClassName(this.controlElement, "ControlElement");
+    this.setClassName(this.assemblyElement, "ControlAssembly ControlAssembly" + stateName);
+    this.setClassName(this.captionElement, "ControlCaption ControlCaption" + stateName);
+    
+    // set select and option element class names
+    var peerStateName = this.isEnabled() ? stateName : "Disabled";
+    this.setClassName(this.peerElement, "SelectionMenu SelectionMenu" + peerStateName);
+    for (var i = 0; i < this.options.length; i++) {
+        var option = this.optionElements[i];
+        this.setClassName(option, "SelectionMenuOption SelectionMenuOption" + peerStateName);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/WRTKit/UI/Separator.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,119 @@
+/*
+© Copyright 2008 Nokia Corporation. All rights reserved.
+
+IMPORTANT:  The Nokia software ("WRTKit and Example Widget files") is supplied to you by Nokia
+Corporation (“Nokia”) in consideration of your agreement to the following terms. Your use, installation
+and/or redistribution of the WRTKit and Example Widget files constitutes acceptance of these terms. If
+you do not agree with these terms, please do not use, install, or redistribute the WRTKit and Example
+Widget files.
+
+In consideration of your agreement to abide by the following terms, and subject to these terms, Nokia
+grants you a personal, non-exclusive license, under Nokia’s copyrights in the WRTKit and Example
+Widget files, to use, reproduce, and redistribute the WRTKit and Example files, in text form (for HTML,
+CSS, or JavaScript files) or binary form (for associated images), for the sole purpose of creating S60
+Widgets.
+
+If you redistribute the WRTKit and Example files, you must retain this entire notice in all such
+redistributions of the WRTKit and Example files.
+
+You may not use the name, trademarks, service marks or logos of Nokia to endorse or promote products
+that include the WRTKit and Example files without the prior written explicit agreement with Nokia.
+Except as expressly stated in this notice, no other rights or licenses, express or implied, are granted by
+Nokia herein, including but not limited to any patent rights that may be infringed by your products that
+incorporate the WRTKit and Example files or by other works in which the WRTKit and Example files
+may be incorporated.
+
+The WRTKit and Example files are provided on an "AS IS" basis.  NOKIA MAKES NO
+WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
+WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE, REGARDING THE EXAMPLES OR ITS USE AND OPERATION
+ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+
+IN NO EVENT SHALL NOKIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, AND/OR
+DISTRIBUTION OF THE EXAMPLES, HOWEVER CAUSED AND WHETHER UNDER THEORY
+OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE,
+EVEN IF NOKIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// The Separator class is used to provide a visual separator in a list.
+
+// Constructor.
+function Separator(id) {
+    if (id != UI_NO_INIT_ID) {
+        this.init(id);
+    }
+}
+
+// Separator inherits from Control.
+Separator.prototype = new Control(UI_NO_INIT_ID);
+
+// Reference to the separator element.
+Separator.prototype.separatorElement = null;
+
+// Separator row element.
+Separator.prototype.tableRowElement = null;
+
+// Left cell element.
+Separator.prototype.tableLeftCellElement = null;
+
+// Center cell element.
+Separator.prototype.tableCenterCellElement = null;
+
+// Right cell element.
+Separator.prototype.tableRightCellElement = null;
+
+// Initializer - called from constructor.
+Separator.prototype.init = function(id) {
+    uiLogger.debug("Separator.init(" + id + ")");
+    
+    // call superclass initializer
+    Control.prototype.init.call(this, id, null);
+    
+    // remove caption and control elements
+    this.assemblyElement.removeChild(this.captionElement);
+    this.assemblyElement.removeChild(this.controlElement);
+    
+    // create separator
+    this.separatorElement = document.createElement("table");
+    this.tableRowElement = document.createElement("tr");
+    this.tableLeftCellElement = document.createElement("td");
+    this.tableCenterCellElement = document.createElement("td");
+    this.tableRightCellElement = document.createElement("td");
+    this.tableRowElement.appendChild(this.tableLeftCellElement);
+    this.tableRowElement.appendChild(this.tableCenterCellElement);
+    this.tableRowElement.appendChild(this.tableRightCellElement);
+    this.separatorElement.appendChild(this.tableRowElement);
+    this.assemblyElement.appendChild(this.separatorElement);
+    
+    // update style
+    this.updateStyleFromState();
+}
+
+// Returns the enabled state for the control.
+Separator.prototype.isEnabled = function() {
+    return true;
+}
+
+// Returns the focusable state for the control.
+Separator.prototype.isFocusable = function() {
+    return false;
+}
+
+// Updates the style of the control to reflects the state of the control.
+Separator.prototype.updateStyleFromState = function() {
+    uiLogger.debug("Separator.updateStyleFromState()");
+    
+    // set element class names
+    this.setClassName(this.rootElement, "Control");
+    this.setClassName(this.assemblyElement, "ControlAssembly ControlAssemblyNormal");
+    this.setClassName(this.separatorElement, "Separator");
+    this.setClassName(this.tableRowElement, "SeparatorRow");
+    this.setClassName(this.tableLeftCellElement, "SeparatorLeftCell");
+    this.setClassName(this.tableCenterCellElement, "SeparatorCenterCell");
+    this.setClassName(this.tableRightCellElement, "SeparatorRightCell");
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/WRTKit/UI/TextArea.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,96 @@
+/*
+© Copyright 2008 Nokia Corporation. All rights reserved.
+
+IMPORTANT:  The Nokia software ("WRTKit and Example Widget files") is supplied to you by Nokia
+Corporation (“Nokia”) in consideration of your agreement to the following terms. Your use, installation
+and/or redistribution of the WRTKit and Example Widget files constitutes acceptance of these terms. If
+you do not agree with these terms, please do not use, install, or redistribute the WRTKit and Example
+Widget files.
+
+In consideration of your agreement to abide by the following terms, and subject to these terms, Nokia
+grants you a personal, non-exclusive license, under Nokia’s copyrights in the WRTKit and Example
+Widget files, to use, reproduce, and redistribute the WRTKit and Example files, in text form (for HTML,
+CSS, or JavaScript files) or binary form (for associated images), for the sole purpose of creating S60
+Widgets.
+
+If you redistribute the WRTKit and Example files, you must retain this entire notice in all such
+redistributions of the WRTKit and Example files.
+
+You may not use the name, trademarks, service marks or logos of Nokia to endorse or promote products
+that include the WRTKit and Example files without the prior written explicit agreement with Nokia.
+Except as expressly stated in this notice, no other rights or licenses, express or implied, are granted by
+Nokia herein, including but not limited to any patent rights that may be infringed by your products that
+incorporate the WRTKit and Example files or by other works in which the WRTKit and Example files
+may be incorporated.
+
+The WRTKit and Example files are provided on an "AS IS" basis.  NOKIA MAKES NO
+WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
+WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE, REGARDING THE EXAMPLES OR ITS USE AND OPERATION
+ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+
+IN NO EVENT SHALL NOKIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, AND/OR
+DISTRIBUTION OF THE EXAMPLES, HOWEVER CAUSED AND WHETHER UNDER THEORY
+OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE,
+EVEN IF NOKIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// The TextArea class implements a multi line text entry control.
+
+// Constructor.
+function TextArea(id, caption, value, rows) {
+    if (id != UI_NO_INIT_ID) {
+        this.init(id, caption, value, rows);
+    }
+}
+
+// TextArea inherits from TextEntryControl.
+TextArea.prototype = new TextEntryControl(UI_NO_INIT_ID);
+
+// Initializer - called from constructor.
+TextArea.prototype.init = function(id, caption, value, rows) {
+    uiLogger.debug("TextArea.init(" + id + ", " + caption + ", " + value + ", " + rows + ")");
+    
+    // call superclass initializer
+    TextEntryControl.prototype.init.call(this, id, caption);
+    
+    // create the peer element
+    this.peerElement = document.createElement("textarea");
+    // default rowcount is 3 if not defined
+    // width always comes from style but is a required attribute
+    this.peerElement.rows = (rows != null) ? rows : 3;
+    this.peerElement.cols = 20;
+    this.controlElement.appendChild(this.peerElement);
+    
+    // set the value
+    this.peerElement.value = (value == null) ? "" : value;
+    
+    // bind event listeners
+    this.bindTextEntryControlListeners();
+    
+    // update the style
+    this.updateStyleFromState();
+}
+
+// Updates the style of the control to reflects the state of the control.
+TextArea.prototype.updateStyleFromState = function() {
+    uiLogger.debug("TextArea.updateStyleFromState()");
+    
+    // determine the state name
+    var stateName = this.getStyleStateName();
+    
+    // set element class names
+    this.setClassName(this.rootElement, "Control");
+    this.setClassName(this.controlElement, "ControlElement");
+    this.setClassName(this.assemblyElement, "ControlAssembly ControlAssembly" + stateName);
+    this.setClassName(this.captionElement, "ControlCaption ControlCaption" + stateName);
+    
+    // set peer element class names
+    var peerStateName = this.isEnabled() ? stateName : "Disabled";
+    this.setClassName(this.peerElement, "TextArea TextArea" + stateName);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/WRTKit/UI/TextEntryControl.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,125 @@
+/*
+© Copyright 2008 Nokia Corporation. All rights reserved.
+
+IMPORTANT:  The Nokia software ("WRTKit and Example Widget files") is supplied to you by Nokia
+Corporation (“Nokiaâ€) in consideration of your agreement to the following terms. Your use, installation
+and/or redistribution of the WRTKit and Example Widget files constitutes acceptance of these terms. If
+you do not agree with these terms, please do not use, install, or redistribute the WRTKit and Example
+Widget files.
+
+In consideration of your agreement to abide by the following terms, and subject to these terms, Nokia
+grants you a personal, non-exclusive license, under Nokia’s copyrights in the WRTKit and Example
+Widget files, to use, reproduce, and redistribute the WRTKit and Example files, in text form (for HTML,
+CSS, or JavaScript files) or binary form (for associated images), for the sole purpose of creating S60
+Widgets.
+
+If you redistribute the WRTKit and Example files, you must retain this entire notice in all such
+redistributions of the WRTKit and Example files.
+
+You may not use the name, trademarks, service marks or logos of Nokia to endorse or promote products
+that include the WRTKit and Example files without the prior written explicit agreement with Nokia.
+Except as expressly stated in this notice, no other rights or licenses, express or implied, are granted by
+Nokia herein, including but not limited to any patent rights that may be infringed by your products that
+incorporate the WRTKit and Example files or by other works in which the WRTKit and Example files
+may be incorporated.
+
+The WRTKit and Example files are provided on an "AS IS" basis.  NOKIA MAKES NO
+WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
+WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE, REGARDING THE EXAMPLES OR ITS USE AND OPERATION
+ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+
+IN NO EVENT SHALL NOKIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, AND/OR
+DISTRIBUTION OF THE EXAMPLES, HOWEVER CAUSED AND WHETHER UNDER THEORY
+OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE,
+EVEN IF NOKIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// The TextEntryControl class is an abstract base class for the single and multi-
+// line text entry controls TextField and TextArea. Don't use TextEntryControl
+// directly.
+
+// Constructor.
+function TextEntryControl(id, caption) {
+    if (id != UI_NO_INIT_ID) {
+        this.init(id, caption);
+    }
+}
+
+// TextEntryControl inherits from Control.
+TextEntryControl.prototype = new Control(UI_NO_INIT_ID);
+
+// Reference to the peer HTML element.
+TextEntryControl.prototype.peerElement = null;
+
+// Initializer - called from constructor.
+TextEntryControl.prototype.init = function(id, caption) {
+    uiLogger.debug("TextEntryControl.init(" + id + ", " + caption + ")");
+    
+    // call superclass initializer
+    Control.prototype.init.call(this, id, caption);
+}
+
+// Common event listeners hookup function called from subclasses.
+TextEntryControl.prototype.bindTextEntryControlListeners = function() {
+    var self = this;
+    this.peerElement.addEventListener("focus", function() { self.focusStateChanged(true); }, false);
+    this.peerElement.addEventListener("blur", function() { self.focusStateChanged(false); }, false);
+    this.peerElement.addEventListener("mouseover", function() { self.hoverStateChanged(true); }, false);
+    this.peerElement.addEventListener("mouseout", function() { self.hoverStateChanged(false); }, false);
+    this.peerElement.addEventListener("change", function() { self.valueChanged(); }, false);
+}
+
+// Returns the enabled state.
+// Override this in subclasses as required to implement the state change.
+TextEntryControl.prototype.isEnabled = function() {
+    return !this.peerElement.readOnly;
+}
+
+// Sets the enabled state.
+// Override this in subclasses as required to implement the state change.
+TextEntryControl.prototype.setEnabled = function(enabled) {
+    uiLogger.debug("TextEntryControl.setEnabled(" + enabled + ")");
+    this.peerElement.readOnly = !enabled;
+    // update the style
+    this.updateStyleFromState();
+}
+
+// Returns the control text.
+TextEntryControl.prototype.getText = function() {
+    return this.peerElement.value;
+}
+
+// Sets the text for the control.
+TextEntryControl.prototype.setText = function(text) {
+    this.peerElement.value = text;
+}
+
+// Returns the focusable state for the control.
+TextEntryControl.prototype.isFocusable = function() {
+    // text entry controls are always focusable
+    return true;
+}
+
+// Sets the focused state for the control.
+// Note: This may not always succeed.
+TextEntryControl.prototype.setFocused = function(focused) {
+    uiLogger.debug("TextEntryControl.setFocused(" + focused + ")");
+    if (focused) {
+        this.peerElement.focus();
+    } else {
+        this.peerElement.blur();
+    }
+}
+
+// Callback for value change events.
+TextEntryControl.prototype.valueChanged = function() {
+    uiLogger.debug("TextEntryControl.valueChanged()");
+    // notify event listeners
+    this.fireEvent(this.createEvent("ValueChanged", this.peerElement.value));
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/WRTKit/UI/TextField.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,93 @@
+/*
+© Copyright 2008 Nokia Corporation. All rights reserved.
+
+IMPORTANT:  The Nokia software ("WRTKit and Example Widget files") is supplied to you by Nokia
+Corporation (“Nokia”) in consideration of your agreement to the following terms. Your use, installation
+and/or redistribution of the WRTKit and Example Widget files constitutes acceptance of these terms. If
+you do not agree with these terms, please do not use, install, or redistribute the WRTKit and Example
+Widget files.
+
+In consideration of your agreement to abide by the following terms, and subject to these terms, Nokia
+grants you a personal, non-exclusive license, under Nokia’s copyrights in the WRTKit and Example
+Widget files, to use, reproduce, and redistribute the WRTKit and Example files, in text form (for HTML,
+CSS, or JavaScript files) or binary form (for associated images), for the sole purpose of creating S60
+Widgets.
+
+If you redistribute the WRTKit and Example files, you must retain this entire notice in all such
+redistributions of the WRTKit and Example files.
+
+You may not use the name, trademarks, service marks or logos of Nokia to endorse or promote products
+that include the WRTKit and Example files without the prior written explicit agreement with Nokia.
+Except as expressly stated in this notice, no other rights or licenses, express or implied, are granted by
+Nokia herein, including but not limited to any patent rights that may be infringed by your products that
+incorporate the WRTKit and Example files or by other works in which the WRTKit and Example files
+may be incorporated.
+
+The WRTKit and Example files are provided on an "AS IS" basis.  NOKIA MAKES NO
+WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
+WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE, REGARDING THE EXAMPLES OR ITS USE AND OPERATION
+ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+
+IN NO EVENT SHALL NOKIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, AND/OR
+DISTRIBUTION OF THE EXAMPLES, HOWEVER CAUSED AND WHETHER UNDER THEORY
+OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE,
+EVEN IF NOKIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// The TextField class implements a single line text entry control.
+
+// Constructor.
+function TextField(id, caption, value, masked) {
+    if (id != UI_NO_INIT_ID) {
+        this.init(id, caption, value, masked);
+    }
+}
+
+// TextField inherits from TextEntryControl.
+TextField.prototype = new TextEntryControl(UI_NO_INIT_ID);
+
+// Initializer - called from constructor.
+TextField.prototype.init = function(id, caption, value, masked) {
+    uiLogger.debug("TextField.init(" + id + ", " + caption + ", " + value + ", " + masked + ")");
+    
+    // call superclass initializer
+    TextEntryControl.prototype.init.call(this, id, caption);
+    
+    // create the peer element
+    this.peerElement = document.createElement("input");
+    this.peerElement.type = masked ? "password" : "text";
+    this.controlElement.appendChild(this.peerElement);
+    
+    // set the value
+    this.peerElement.value = (value == null) ? "" : value;
+    
+    // bind event listeners
+    this.bindTextEntryControlListeners();
+    
+    // update the style
+    this.updateStyleFromState();
+}
+
+// Updates the style of the control to reflects the state of the control.
+TextField.prototype.updateStyleFromState = function() {
+    uiLogger.debug("TextField.updateStyleFromState()");
+    
+    // determine the state name
+    var stateName = this.getStyleStateName();
+    
+    // set element class names
+    this.setClassName(this.rootElement, "Control");
+    this.setClassName(this.controlElement, "ControlElement");
+    this.setClassName(this.assemblyElement, "ControlAssembly ControlAssembly" + stateName);
+    this.setClassName(this.captionElement, "ControlCaption ControlCaption" + stateName);
+    
+    // set peer element class names
+    var peerStateName = this.isEnabled() ? stateName : "Disabled";
+    this.setClassName(this.peerElement, "TextField TextField" + peerStateName);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/WRTKit/UI/TextPane.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,76 @@
+// ////////////////////////////////////////////////////////////////////////////
+// Symbian Foundation Example Code
+//
+// This software is in the public domain. No copyright is claimed, and you 
+// may use it for any purpose without license from the Symbian Foundation.
+// No warranty for any purpose is expressed or implied by the authors or
+// the Symbian Foundation. 
+// ////////////////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////////////////
+// The TextPane class implements a control that displays HTML content.
+
+// Constructor.
+function TextPane(id, caption, text) {
+    if (id != UI_NO_INIT_ID) {
+        this.init(id, caption, text);
+    }
+}
+
+// TextPane inherits from Control.
+TextPane.prototype = new Control(UI_NO_INIT_ID);
+
+// Content element for TextPane text.
+TextPane.prototype.contentElement = null;
+
+// Initializer - called from constructor.
+TextPane.prototype.init = function(id, caption, text) {
+    uiLogger.debug("TextPane.init(" + id + ", " + caption + ", " + text + ")");
+    
+    // call superclass initializer
+    Control.prototype.init.call(this, id, caption);
+    
+    // create content element
+    this.contentElement = document.createElement("div");
+    this.controlElement.appendChild(this.contentElement);
+    
+    // set the text
+    this.setText(text);
+}
+
+// Returns the enabled state for the control.
+TextPane.prototype.isEnabled = function() {
+    return true;
+}
+
+// Returns the focusable state for the control.
+TextPane.prototype.isFocusable = function() {
+    return false;
+}
+
+// Returns the control text.
+TextPane.prototype.getText = function() {
+    return this.contentElement.innerHTML;
+}
+
+// Sets the text for the control.
+TextPane.prototype.setText = function(text) {
+    uiLogger.debug("TextPane.setText(" + text + ")");
+    this.contentElement.innerHTML = (text == null) ? "" : text;
+    this.updateStyleFromState();
+}
+
+// Updates the style of the control to reflects the state of the control.
+TextPane.prototype.updateStyleFromState = function() {
+    uiLogger.debug("TextPane.updateStyleFromState()");
+    
+    // set element class names
+    this.setClassName(this.rootElement, "TextPane");
+//    this.setClassName(this.assemblyElement, "ControlAssembly ControlAssemblyNormal");
+//    this.setClassName(this.captionElement, "ControlCaption ControlCaptionNormal");
+//    this.setClassName(this.controlElement, "ControlElement");
+//    this.setClassName(this.contentElement, "TextPane");
+}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/WRTKit/UI/UIElement.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,114 @@
+/*
+© Copyright 2008 Nokia Corporation. All rights reserved.
+
+IMPORTANT:  The Nokia software ("WRTKit and Example Widget files") is supplied to you by Nokia
+Corporation (“Nokia”) in consideration of your agreement to the following terms. Your use, installation
+and/or redistribution of the WRTKit and Example Widget files constitutes acceptance of these terms. If
+you do not agree with these terms, please do not use, install, or redistribute the WRTKit and Example
+Widget files.
+
+In consideration of your agreement to abide by the following terms, and subject to these terms, Nokia
+grants you a personal, non-exclusive license, under Nokia’s copyrights in the WRTKit and Example
+Widget files, to use, reproduce, and redistribute the WRTKit and Example files, in text form (for HTML,
+CSS, or JavaScript files) or binary form (for associated images), for the sole purpose of creating S60
+Widgets.
+
+If you redistribute the WRTKit and Example files, you must retain this entire notice in all such
+redistributions of the WRTKit and Example files.
+
+You may not use the name, trademarks, service marks or logos of Nokia to endorse or promote products
+that include the WRTKit and Example files without the prior written explicit agreement with Nokia.
+Except as expressly stated in this notice, no other rights or licenses, express or implied, are granted by
+Nokia herein, including but not limited to any patent rights that may be infringed by your products that
+incorporate the WRTKit and Example files or by other works in which the WRTKit and Example files
+may be incorporated.
+
+The WRTKit and Example files are provided on an "AS IS" basis.  NOKIA MAKES NO
+WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
+WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE, REGARDING THE EXAMPLES OR ITS USE AND OPERATION
+ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+
+IN NO EVENT SHALL NOKIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, AND/OR
+DISTRIBUTION OF THE EXAMPLES, HOWEVER CAUSED AND WHETHER UNDER THEORY
+OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE,
+EVEN IF NOKIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// The UIElement class is the base class for all user interface elements.
+
+// Constructor.
+function UIElement(id) {
+    if (id != UI_NO_INIT_ID) {
+        this.init(id);
+    }
+}
+
+// UI element identifier.
+UIElement.prototype.id = null;
+
+// Root HTML element in the UI element.
+UIElement.prototype.rootElement = null;
+
+// Initializer for UIElement.
+UIElement.prototype.init = function(id) {
+    uiLogger.debug("UIElement.init(" + id + ")");
+    
+    // copy identifier
+    this.id = id;
+    
+    // init event listener array
+    this.eventListeners = [];
+    
+    // create the root element
+    this.rootElement = document.createElement("div");
+    if (id != null) {
+        this.rootElement.id = id;
+    }
+}
+
+// Returns an array containing the current event listeners.
+UIElement.prototype.getEventListeners = function() {
+    return this.eventListeners;
+}
+
+// Adds an event listener.
+UIElement.prototype.addEventListener = function(eventType, listener) {
+    var listenerDef = { type: eventType, listener: listener };
+    this.eventListeners.push(listenerDef);
+}
+
+// Removes an event listener.
+UIElement.prototype.removeEventListener = function(eventType, listener) {
+    // iterate through current listeners and remove the specified
+    // listener when its found
+    for (var i = 0; i < this.eventListeners.length; i++) {
+        var listenerDef = this.eventListeners[i];
+        if ((listenerDef.type == eventType) &&
+                (listenerDef.listener == listener)) {
+            this.eventListeners.splice(i, 1);
+            return;
+        }
+    }
+}
+
+// Factory method for an event object where this object is the source object.
+UIElement.prototype.createEvent = function(type, value) {
+    return { source: this, type: type, value: value };
+}
+
+// Fires an event to all listeners.
+UIElement.prototype.fireEvent = function(event) {
+    // iterate through all event listeners and notify them of the event
+    for (var i = 0; i < this.eventListeners.length; i++) {
+        var listenerDef = this.eventListeners[i];
+        if (listenerDef.type == null || listenerDef.type == event.type) {
+            listenerDef.listener.call(this, event);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/WRTKit/UI/UIInit.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,49 @@
+/*
+� Copyright 2008 Nokia Corporation. All rights reserved.
+
+IMPORTANT:  The Nokia software ("WRTKit and Example Widget files") is supplied to you by Nokia
+Corporation (�Nokia�) in consideration of your agreement to the following terms. Your use, installation
+and/or redistribution of the WRTKit and Example Widget files constitutes acceptance of these terms. If
+you do not agree with these terms, please do not use, install, or redistribute the WRTKit and Example
+Widget files.
+
+In consideration of your agreement to abide by the following terms, and subject to these terms, Nokia
+grants you a personal, non-exclusive license, under Nokia�s copyrights in the WRTKit and Example
+Widget files, to use, reproduce, and redistribute the WRTKit and Example files, in text form (for HTML,
+CSS, or JavaScript files) or binary form (for associated images), for the sole purpose of creating S60
+Widgets.
+
+If you redistribute the WRTKit and Example files, you must retain this entire notice in all such
+redistributions of the WRTKit and Example files.
+
+You may not use the name, trademarks, service marks or logos of Nokia to endorse or promote products
+that include the WRTKit and Example files without the prior written explicit agreement with Nokia.
+Except as expressly stated in this notice, no other rights or licenses, express or implied, are granted by
+Nokia herein, including but not limited to any patent rights that may be infringed by your products that
+incorporate the WRTKit and Example files or by other works in which the WRTKit and Example files
+may be incorporated.
+
+The WRTKit and Example files are provided on an "AS IS" basis.  NOKIA MAKES NO
+WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
+WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE, REGARDING THE EXAMPLES OR ITS USE AND OPERATION
+ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+
+IN NO EVENT SHALL NOKIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, AND/OR
+DISTRIBUTION OF THE EXAMPLES, HOWEVER CAUSED AND WHETHER UNDER THEORY
+OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE,
+EVEN IF NOKIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// The UIInit script is included before the rest of the UI scripts to setup
+// any resources needed by the UI toolkit.
+
+// Create UI logger.
+var uiLogger = new Logger();
+uiLogger.level = uiLogger.LOG_LEVEL_DEBUG;
+uiLogger.filter = ["QECR"];
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/WRTKit/UI/UIManager.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,278 @@
+/*
+� Copyright 2008 Nokia Corporation. All rights reserved.
+
+IMPORTANT:  The Nokia software ("WRTKit and Example Widget files") is supplied to you by Nokia
+Corporation (�Nokia�) in consideration of your agreement to the following terms. Your use, installation
+and/or redistribution of the WRTKit and Example Widget files constitutes acceptance of these terms. If
+you do not agree with these terms, please do not use, install, or redistribute the WRTKit and Example
+Widget files.
+
+In consideration of your agreement to abide by the following terms, and subject to these terms, Nokia
+grants you a personal, non-exclusive license, under Nokia�s copyrights in the WRTKit and Example
+Widget files, to use, reproduce, and redistribute the WRTKit and Example files, in text form (for HTML,
+CSS, or JavaScript files) or binary form (for associated images), for the sole purpose of creating S60
+Widgets.
+
+If you redistribute the WRTKit and Example files, you must retain this entire notice in all such
+redistributions of the WRTKit and Example files.
+
+You may not use the name, trademarks, service marks or logos of Nokia to endorse or promote products
+that include the WRTKit and Example files without the prior written explicit agreement with Nokia.
+Except as expressly stated in this notice, no other rights or licenses, express or implied, are granted by
+Nokia herein, including but not limited to any patent rights that may be infringed by your products that
+incorporate the WRTKit and Example files or by other works in which the WRTKit and Example files
+may be incorporated.
+
+The WRTKit and Example files are provided on an "AS IS" basis.  NOKIA MAKES NO
+WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
+WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE, REGARDING THE EXAMPLES OR ITS USE AND OPERATION
+ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+
+IN NO EVENT SHALL NOKIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, AND/OR
+DISTRIBUTION OF THE EXAMPLES, HOWEVER CAUSED AND WHETHER UNDER THEORY
+OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE,
+EVEN IF NOKIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+*/
+
+
+///////////////////////////////////////////////////////////////////////////////
+// The UI manager manages a set of views and other user interface elements.
+
+// Constructor.
+function UIManager(viewParentElement, scrollbarParentElement, enableScrollBar, delayInit) {    
+    uiLogger.debug("UIManager(" + viewParentElement + ", " + scrollbarParentElement + ")");
+    if (delayInit == null) {
+        this.init(viewParentElement, enableScrollBar, scrollbarParentElement);
+    }
+}
+
+// Parent element for views.
+UIManager.prototype.viewParentElement = null;
+
+// Parent element for scrollbar.
+UIManager.prototype.scrollbarParentElement = null;
+
+// The currently displayed view.
+UIManager.prototype.currentView = null;
+
+// Reference to the scrollbar.
+UIManager.prototype.scrollbar = null;
+
+// Current scroll Y position.
+UIManager.prototype.scrollY = -1;
+
+// Current viewport height.
+UIManager.prototype.viewportHeight = -1;
+
+// Current document height.
+UIManager.prototype.documentHeight = -1;
+
+// Timer identifier or null if no active timer.
+UIManager.prototype.timerId = null;
+
+// Interval for timer ticks for the UI manager timer (in milliseconds)
+UIManager.prototype.TIMER_INTERVAL = 250;
+
+// Reference to the notification popup used to displays notifications.
+UIManager.prototype.notificationPopup = null;
+
+// is scrollbar enabled
+UIManager.prototype.enableScrollBar = null;
+
+// View switch animation
+UIManager.prototype.viewSwitchAnimation = false;
+UIManager.prototype.viewSwitchTimer = null;
+UIManager.prototype.viewSwitchDivPos = 0;
+UIManager.prototype.VIEW_SWITCH_TIMER_INTERVAL = 25;
+
+// init function
+UIManager.prototype.init = function(viewParentElement, enableScrollBar, scrollbarParentElement) {
+    this.enableScrollBar = enableScrollBar;
+    
+    // parent element for views
+    if (viewParentElement == null) {
+        // create a parent for views
+        this.viewParentElement = document.createElement("div");
+        this.viewParentElement.className = "ViewContainer";
+        document.body.appendChild(this.viewParentElement);
+    }
+    else {
+        this.viewParentElement = viewParentElement;
+    }
+    
+    // parent element for scrollbar
+    if (enableScrollBar) {
+        if (scrollbarParentElement == null) {
+            // create a parent for the scrollbar
+            this.scrollbarParentElement = document.createElement("div");
+            this.scrollbarParentElement.className = "DocumentScrollbarContainer";
+            document.body.appendChild(this.scrollbarParentElement);
+        }
+        else {
+            this.scrollbarParentElement = scrollbarParentElement;
+        }
+    }
+    
+    // currently selected view
+    this.currentView = null;
+    
+    // create the notification popup
+    // the notification popup adds itself as a child element to the document body
+    this.notificationPopup = new NotificationPopup();
+    
+    // create scrollbar
+    if (enableScrollBar) {
+        this.scrollbar = new Scrollbar(this.scrollbarParentElement);
+    }
+    
+    // setup scrollbar tracking
+    var self = this;
+    this.startTimer();
+    if (enableScrollBar) {
+        window.addEventListener("resize", function(){
+            self.updateScrollbar();
+        }, false);
+        window.addEventListener("scroll", function(){
+            self.updateScrollbar();
+        }, false);
+    }
+}
+
+// Returns the current view.
+UIManager.prototype.getView = function() {
+    return this.currentView;
+}
+
+// Switches to the specified view.
+UIManager.prototype.setView = function(view){
+	uiLogger.debug("View set to " + view.id);
+	if ( this.viewSwitchTimer != null ) {
+		return;
+	}
+	if (this.viewSwitchAnimation && this.currentView != null) {
+		var self = this;
+		this.viewSwitchDivPos = 0;
+		this.viewSwitchTimer = setInterval(function(){
+			self.animateViewSwitch(view);
+		}, this.VIEW_SWITCH_TIMER_INTERVAL);
+	}
+	else {
+		this.doSetView(view);
+	}
+}
+
+UIManager.prototype.animateViewSwitch = function(view) {
+	if (this.viewSwitchDivPos + window.innerWidth < 0 ) {
+		clearTimeout(this.viewSwitchTimer);
+		var tmp = this.currentView;
+		this.doSetView(view);
+		tmp.rootElement.style.left = null;
+		this.viewSwitchTimer = null;
+	}
+	else {
+		this.viewSwitchDivPos -= 25;
+		this.currentView.rootElement.style.left = this.viewSwitchDivPos;
+	}
+}
+
+
+UIManager.prototype.doSetView = function(view) {
+//	log("UIManager:doSetView: view=" + getViewRep(view) + ", current:" + getViewRep(this.currentView) + ", view.previous=" + getViewRep(view.previousView));
+    // remove the current view from the parent element
+    if (this.currentView != null) {
+        this.viewParentElement.removeChild(this.currentView.rootElement);
+    }
+    
+    // reset scroll
+    window.scrollTo(0, 0);
+    
+    // add the new view to the parent element
+    if (view != null) {
+        this.currentView = view;
+        this.currentView.resetControlFocusStates();
+        this.viewParentElement.appendChild(this.currentView.rootElement);
+    }
+    
+    // update scrollbar
+    if (this.enableScrollBar) {
+        this.updateScrollbar();
+    }
+    
+//    // focus the first focusable control
+//    // a timer is used to prevent unwanted focus shift
+    setTimeout(function() { view.focusFirstControl(); }, 1);
+}
+
+// Updates the scrollbar.
+UIManager.prototype.updateScrollbar = function() {
+    if (this.enableScrollBar) {
+        // get current viewport and document position and dimensions
+        var scrollY = window.scrollY;
+        var viewportHeight = window.innerHeight;
+        var documentHeight = Math.max(document.documentElement.scrollHeight, document.height);
+        
+        // check if the scroll position or view has changed
+        if (this.scrollY != scrollY ||
+                this.viewportHeight != viewportHeight ||
+                this.documentHeight != documentHeight) {
+            // scroll position or view has changed
+            this.scrollY = scrollY;
+            this.viewportHeight = viewportHeight;
+            this.documentHeight = documentHeight;
+            
+            // update the scrollbar
+            this.scrollbar.update(scrollY, viewportHeight, documentHeight);
+            uiLogger.debug("Scrollbar updated");
+        }
+    }
+}
+
+// Starts the view manager timer.
+UIManager.prototype.startTimer = function() {
+    if (this.timerId == null) {
+        uiLogger.debug("UIManager timer started");
+        var self = this;
+        // setup the timer
+        this.timerId = setInterval(function() { self.onTimer(); }, this.TIMER_INTERVAL);
+    } else {
+        uiLogger.warn("UIManager timer already running");
+    }
+}
+
+// Stops the view manager timer.
+UIManager.prototype.stopTimer = function() {
+    if (this.timerId != null) {
+        // stop the timer
+        clearTimeout(this.timerId);
+        this.timerId = null;
+    } else {
+        uiLogger.warn("UIManager timer already stopped");
+    }
+}
+
+// Timer callback function.
+UIManager.prototype.onTimer = function() {
+    if (this.enableScrollBar) {
+        // make sure the scrollbar is up to date
+        this.updateScrollbar();
+    }
+}
+
+// Displays a notification.
+UIManager.prototype.showNotification = function(displayTime, type, text, progress) {
+    uiLogger.debug("UIManager.showNotification(" + displayTime + ", " + type + ", " + text + ", " + progress + ")");
+    // use the notification popup to show the notification
+    this.notificationPopup.showNotification(displayTime, type, text, progress);
+}
+
+// Hides the currently displayed notification.
+UIManager.prototype.hideNotification = function() {
+    uiLogger.debug("UIManager.hideNotification()");
+    // hide the notification popup
+    this.notificationPopup.hideNotification();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/WRTKit/UI/View.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,153 @@
+/*
+� Copyright 2008 Nokia Corporation. All rights reserved.
+
+IMPORTANT:  The Nokia software ("WRTKit and Example Widget files") is supplied to you by Nokia
+Corporation (�Nokia�) in consideration of your agreement to the following terms. Your use, installation
+and/or redistribution of the WRTKit and Example Widget files constitutes acceptance of these terms. If
+you do not agree with these terms, please do not use, install, or redistribute the WRTKit and Example
+Widget files.
+
+In consideration of your agreement to abide by the following terms, and subject to these terms, Nokia
+grants you a personal, non-exclusive license, under Nokia�s copyrights in the WRTKit and Example
+Widget files, to use, reproduce, and redistribute the WRTKit and Example files, in text form (for HTML,
+CSS, or JavaScript files) or binary form (for associated images), for the sole purpose of creating S60
+Widgets.
+
+If you redistribute the WRTKit and Example files, you must retain this entire notice in all such
+redistributions of the WRTKit and Example files.
+
+You may not use the name, trademarks, service marks or logos of Nokia to endorse or promote products
+that include the WRTKit and Example files without the prior written explicit agreement with Nokia.
+Except as expressly stated in this notice, no other rights or licenses, express or implied, are granted by
+Nokia herein, including but not limited to any patent rights that may be infringed by your products that
+incorporate the WRTKit and Example files or by other works in which the WRTKit and Example files
+may be incorporated.
+
+The WRTKit and Example files are provided on an "AS IS" basis.  NOKIA MAKES NO
+WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
+WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE, REGARDING THE EXAMPLES OR ITS USE AND OPERATION
+ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+
+IN NO EVENT SHALL NOKIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, AND/OR
+DISTRIBUTION OF THE EXAMPLES, HOWEVER CAUSED AND WHETHER UNDER THEORY
+OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE,
+EVEN IF NOKIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// The View class is an abstract base class for views in the UI toolkit.
+// Don't use the View directly - instead use a concrete subclass like ListView.
+
+// Constructor.
+function View(id) {
+    if (id != UI_NO_INIT_ID) {
+        this.init(id);
+    }
+}
+
+// View inherits from UIElement.
+View.prototype = new UIElement(UI_NO_INIT_ID);
+
+// Currently focused control.
+View.prototype.focusedControl = null;
+
+// Allows going back from every view
+View.prototype.previousView = null;
+
+// Initializer - called from constructor.
+View.prototype.init = function(id) {
+    uiLogger.debug("View.init(" + id + ")");
+    
+    // call superclass initializer
+    UIElement.prototype.init.call(this, id);
+}
+
+// Returns the currently focused control; null if none.
+View.prototype.getFocusedControl = function() {
+    return this.focusedControl;
+}
+
+// Used to notify the view that the focused control has changed.
+View.prototype.focusedControlChanged = function(control) {
+    uiLogger.debug("View.focusedControlChanged(" + control + ")");
+    this.focusedControl = control;
+    // notify event listeners
+    this.fireEvent(this.createEvent("FocusedControlChanged", this.focusedControl));
+}
+
+// Attempts to focus the first focusable control.
+// Override in subclasses as required.
+View.prototype.focusFirstControl = function() {
+    uiLogger.debug("View.focusFirstControl()");
+}
+
+// Attempts to reset all control focus states.
+// Override in subclasses as required.
+View.prototype.resetControlFocusStates = function() {
+    uiLogger.debug("View.resetControlFocusStates()");
+}
+
+
+// ////////////////////////////////////////////////////////////////////
+// Added functions
+
+// set up soft keys. Default implementation sets right soft
+// key to Back if the previous view is set
+View.prototype.setupSoftKeys = function()  {
+//	log("UIManager:doSetView: view=" + getViewRep(this) + ", view.previousView=" + getViewRep(this.previousView));
+    if (window.widget) {
+		if (this.previousView != null) {
+			var self = this;
+			menu.setRightSoftkeyLabel("Back", function(){self.goBack();});
+		} else {
+			menu.setRightSoftkeyLabel("Exit", function(){window.close();});
+		}
+    }
+}
+
+// show the view - sets up soft keys
+View.prototype.show = function () {
+	this.setupSoftKeys();
+	if (window.widget) {
+		this.setupMenu();
+		widget.setNavigationEnabled(false);
+	}
+	this.update(false);
+	uiManager.setView(this);
+}
+
+// abstract function for updating page content
+View.prototype.update = function(forceUpdate){
+}
+
+// abstract function for updating per-view menu
+// only called if window.widget is defined
+View.prototype.setupMenu = function(){
+}
+
+
+// Default back button handler takes us to previous view
+// if one is set
+View.prototype.goBack = function()  {
+//	alert("goBack: previousView=" + this.previousView);
+	try {
+		if (this.previousView != null) {
+			//		// transition looks funky
+			//		if (window.widget) {
+			//			widget.prepareForTransition("fade");
+			//		}
+			this.previousView.show();
+		//		if (window.widget) {
+		//			widget.performTransition();
+		//		}
+		}
+	} catch (e) {
+		alert(e);
+	}
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/WRTKit/Utils/Logger.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,117 @@
+/*
+© Copyright 2008 Nokia Corporation. All rights reserved.
+
+IMPORTANT:  The Nokia software ("WRTKit and Example Widget files") is supplied to you by Nokia
+Corporation (ÒNokiaÓ) in consideration of your agreement to the following terms. Your use, installation
+and/or redistribution of the WRTKit and Example Widget files constitutes acceptance of these terms. If
+you do not agree with these terms, please do not use, install, or redistribute the WRTKit and Example
+Widget files.
+
+In consideration of your agreement to abide by the following terms, and subject to these terms, Nokia
+grants you a personal, non-exclusive license, under NokiaÕs copyrights in the WRTKit and Example
+Widget files, to use, reproduce, and redistribute the WRTKit and Example files, in text form (for HTML,
+CSS, or JavaScript files) or binary form (for associated images), for the sole purpose of creating S60
+Widgets.
+
+If you redistribute the WRTKit and Example files, you must retain this entire notice in all such
+redistributions of the WRTKit and Example files.
+
+You may not use the name, trademarks, service marks or logos of Nokia to endorse or promote products
+that include the WRTKit and Example files without the prior written explicit agreement with Nokia.
+Except as expressly stated in this notice, no other rights or licenses, express or implied, are granted by
+Nokia herein, including but not limited to any patent rights that may be infringed by your products that
+incorporate the WRTKit and Example files or by other works in which the WRTKit and Example files
+may be incorporated.
+
+The WRTKit and Example files are provided on an "AS IS" basis.  NOKIA MAKES NO
+WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
+WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE, REGARDING THE EXAMPLES OR ITS USE AND OPERATION
+ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+
+IN NO EVENT SHALL NOKIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, AND/OR
+DISTRIBUTION OF THE EXAMPLES, HOWEVER CAUSED AND WHETHER UNDER THEORY
+OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE,
+EVEN IF NOKIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// Logger utility class that uses the Firebug console class.
+
+// Constructor (everything is static so this is empty).
+function Logger() {
+    // Set default logger level.
+    this.level = this.LOG_LEVEL_OFF;
+}
+
+// Logger levels.
+Logger.prototype.LOG_LEVEL_DEBUG = 0;
+Logger.prototype.LOG_LEVEL_INFO = 1;
+Logger.prototype.LOG_LEVEL_WARN = 2;
+Logger.prototype.LOG_LEVEL_ERROR = 3;
+Logger.prototype.LOG_LEVEL_OFF = 4;
+
+Logger.prototype.level = null;
+Logger.prototype.filter = null;
+
+// Disable logging on other browsers except Firefox.
+Logger.prototype.enabled = (navigator.userAgent.indexOf("Firefox") != -1);
+
+// Dumps an objects properties and methods to the console.
+Logger.prototype.dump = function(obj) {
+    if (this.enabled) {
+        console.dir(obj);
+    }
+}
+
+// Dumps a stracktrace to the console.
+Logger.prototype.trace = function() {
+    if (this.enabled) {
+        console.trace();
+    }
+}
+
+// Prints a debug message to the console.
+Logger.prototype.debug = function(str) {
+    if (this.enabled && this.level <= this.LOG_LEVEL_DEBUG) {
+        if (this.filter == null) {
+            console.debug(str);
+        } else {
+            var show = false;
+            for (i in this.filter) {
+                if (str.indexOf(this.filter[i]) >= 0) {
+                    show = true;
+                    break;
+                }
+            }
+            if (show) {
+                console.debug(str);
+            }
+        }
+    }
+}
+
+// Prints an info message to the console.
+Logger.prototype.info = function(str) {
+    if (this.enabled && this.level <= this.LOG_LEVEL_INFO) {
+        console.info(str);
+    }
+}
+
+// Prints a warning message to the console.
+Logger.prototype.warn = function(str) {
+    if (this.enabled && this.level <= this.LOG_LEVEL_WARN) {
+        console.warn(str);
+    }
+}
+
+// Prints an error message to the console.
+Logger.prototype.error = function(str) {
+    if (this.enabled && this.level <= this.LOG_LEVEL_ERROR) {
+        console.error(str);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/WRTKit/WRTKit.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,93 @@
+/*
+� Copyright 2008 Nokia Corporation. All rights reserved.
+
+IMPORTANT:  The Nokia software ("WRTKit and Example Widget files") is supplied to you by Nokia
+Corporation (�Nokia�) in consideration of your agreement to the following terms. Your use, installation
+and/or redistribution of the WRTKit and Example Widget files constitutes acceptance of these terms. If
+you do not agree with these terms, please do not use, install, or redistribute the WRTKit and Example
+Widget files.
+
+In consideration of your agreement to abide by the following terms, and subject to these terms, Nokia
+grants you a personal, non-exclusive license, under Nokia�s copyrights in the WRTKit and Example
+Widget files, to use, reproduce, and redistribute the WRTKit and Example files, in text form (for HTML,
+CSS, or JavaScript files) or binary form (for associated images), for the sole purpose of creating S60
+Widgets.
+
+If you redistribute the WRTKit and Example files, you must retain this entire notice in all such
+redistributions of the WRTKit and Example files.
+
+You may not use the name, trademarks, service marks or logos of Nokia to endorse or promote products
+that include the WRTKit and Example files without the prior written explicit agreement with Nokia.
+Except as expressly stated in this notice, no other rights or licenses, express or implied, are granted by
+Nokia herein, including but not limited to any patent rights that may be infringed by your products that
+incorporate the WRTKit and Example files or by other works in which the WRTKit and Example files
+may be incorporated.
+
+The WRTKit and Example files are provided on an "AS IS" basis.  NOKIA MAKES NO
+WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
+WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE, REGARDING THE EXAMPLES OR ITS USE AND OPERATION
+ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+
+IN NO EVENT SHALL NOKIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, AND/OR
+DISTRIBUTION OF THE EXAMPLES, HOWEVER CAUSED AND WHETHER UNDER THEORY
+OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE,
+EVEN IF NOKIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// This script includes the WRTKit for use in a widget.
+
+// WRTKit version (major.minor.revision, e.g. 1.0.0).
+var WRTKIT_VERSION_MAJOR = 1;
+var WRTKIT_VERSION_MINOR = 0;
+var WRTKIT_VERSION_REVISION = 0;
+var WRTKIT_RESOURCE_DIRECTORY = "WRTKit/Resources/";
+
+// Include util script files.
+includeScript("WRTKit/Utils/Logger.js");
+
+// Include UI visual definition.
+//includeStyleSheet("WRTKit/Resources/UI.css");  // included in index.html
+
+// Include all UI toolkit script files.
+var UI_NO_INIT_ID = "UI_NO_INIT_ID";
+
+includeScript("WRTKit/UI/UIInit.js");
+includeScript("WRTKit/UI/UIElement.js");
+includeScript("WRTKit/UI/Scrollbar.js");
+includeScript("WRTKit/UI/NotificationPopup.js");
+includeScript("WRTKit/UI/UIManager.js");
+includeScript("WRTKit/UI/View.js");
+includeScript("WRTKit/UI/ListView.js");
+includeScript("WRTKit/UI/Control.js");
+includeScript("WRTKit/UI/Separator.js");
+includeScript("WRTKit/UI/Label.js");
+includeScript("WRTKit/UI/ContentPanel.js");
+includeScript("WRTKit/UI/TextEntryControl.js");
+includeScript("WRTKit/UI/TextField.js");
+includeScript("WRTKit/UI/TextArea.js");
+includeScript("WRTKit/UI/SelectionControl.js");
+includeScript("WRTKit/UI/SelectionMenu.js");
+includeScript("WRTKit/UI/SelectionList.js");
+includeScript("WRTKit/UI/ActionControl.js");
+includeScript("WRTKit/UI/FormButton.js");
+includeScript("WRTKit/UI/NavigationButton.js");
+includeScript("WRTKit/UI/TextPane.js");
+includeScript("WRTKit/UI/TabView.js");
+includeScript("WRTKit/UI/Ajax.js");
+includeScript("WRTKit/UI/ImageLabel.js");
+
+// Includes a script file by writing a script tag.
+function includeScript(src) {
+    document.write("<script type=\"text/javascript\" src=\"" + src + "\"></script>");
+}
+
+// Includes a style sheet by writing a style tag.
+function includeStyleSheet(src) {
+    document.write("<style type=\"text/css\"> @import url(\"" +  src + "\"); </style>");
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/Wiki.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,632 @@
+// ////////////////////////////////////////////////////////////////////////////
+// Symbian Foundation Example Code
+//
+// This software is in the public domain. No copyright is claimed, and you 
+// may use it for any purpose without license from the Symbian Foundation.
+// No warranty for any purpose is expressed or implied by the authors or
+// the Symbian Foundation. 
+// ////////////////////////////////////////////////////////////////////////////
+
+
+var baseUrl = "http://en.wikipedia.org";
+
+var wikiSearchBaseUrl = "/w/api.php?format=xml&action=query&list=search&srsearch=";
+var wikiSearchOffsetQueryPart = "&sroffset=";
+var wikiSearchLimitQueryPart = "&srlimit=";
+var wikiSearchWhatQueryPart = "&srwhat=";
+
+var wikiViewPageUrlBase = baseUrl + "/w/index.php?title=";
+var wikiPrintableParam = "&printable=yes";
+
+var MENU_ITEM_READER_SEARCH = 1;
+var MENU_ITEM_HISTORY_CLEAR = 1;
+var MENU_ITEM_BOOKMARKS_CLEAR = 1;
+var MENU_ITEM_MAIN_BACK = 4;
+var MENU_ITEM_MAIN_NEXT = 5;
+var MENU_ITEM_MAIN_ADD_BOOKMARK = 6;
+var MENU_ITEM_MAIN_NAVIGATION = 7;
+var MENU_ITEM_MAIN_SEARCH = 8;
+var MENU_ITEM_MAIN_BOOKMARKS = 9;
+var MENU_ITEM_MAIN_HISTORY = 10; 
+var MENU_ITEM_MAIN_LANGUAGE =11;
+var MENU_ITEM_MAIN_UPDATES =12;
+var MENU_ITEM_MAIN_HELP = 13;
+
+var PREDICTIVE_RESULT_COUNT = 0;
+
+//var wapediaArticleBase = "http://wapedia.mobi/en/";
+
+
+//var wikiListCategoriesUrl = symbianOrgBaseUrl + "/wiki/api.php?format=xml&action=query&list=allcategories&aclimit=500&acprop=size";
+//var wikiWatchListUrl = "http://en.wikipedia.org/w/api.php?action=query&list=watchlist&wlallrev&wlprop=ids|title|timestamp|user|comment";
+//var wikiWatchListFeed = "/wiki/api.php?action=feedwatchlist&feedformat=rss";
+
+var wikiSearchOptions = [
+    { value: "title", text: "Search in title only" },
+    { value: "text", text: "Full text search" },
+];
+
+function WikiHome () {
+	RssReader.prototype.init.call(this,"Wikipedia", null /*url*/, new WikiFeedPresenter(null), null, wikiResponseParser);	
+
+	this.wikiSearchButton = new FormButton(null, "Search");
+	this.wikiSearchString = new TextField('wikiSearchString', null, "");
+
+	var bookmarksButton = new NavigationButton(null, "next.png", "Bookmarks");
+	var historyButton = new NavigationButton(null, "next.png", "History");
+	var languageButton = new NavigationButton(null, "next.png", "Language");
+
+	var self = this;
+	bookmarksButton.addEventListener("ActionPerformed", function(){wikiBookmarksView.previousView = self; wikiBookmarksView.show();});
+	historyButton.addEventListener("ActionPerformed", function(){wikiHistoryView.previousView = self; wikiHistoryView.show();});
+	languageButton.addEventListener("ActionPerformed", function(){languageSelectView.previousView = self; languageSelectView.show();});
+	
+//	this.wikiSearchString.addEventListener("KeyPressed", function(){self.predictiveSearch(0);});
+	this.wikiSearchButton.addEventListener("ActionPerformed", function(){self.search(0);});
+
+	this.addControl(new Label(null, "Search Wiki", null));
+	this.addControl(this.wikiSearchString);
+	this.addControl(this.wikiSearchButton);
+	this.addControl(bookmarksButton);
+	this.addControl(historyButton);
+	this.addControl(languageButton);
+	k.known();
+}
+
+
+WikiHome.prototype = new RssReader();
+WikiHome.prototype.wikiMainPageButton = null;
+WikiHome.prototype.wikiSearchButton = null;
+WikiHome.prototype.wikiSearchString = null;
+WikiHome.prototype.wikiSearchSelection = null;
+WikiHome.prototype.predictiveTimer = null;
+
+var lastWikiSearchWasFrom = 0;
+var lastWikiSearchResultCountWas = 0;
+
+WikiHome.prototype.search = function(from) {
+	try {
+		lastWikiSearchWasFrom = from;
+		var srstring = this.wikiSearchString.getText();
+		var url = this.formSearchUrl(srstring, from, resultsPerPage);
+		var reader = new RssReader("Wiki: " + srstring, url, new WikiFeedPresenter(null), this, wikiResponseParser);
+		reader.show();
+	}catch (X) { alert(X);}
+}
+
+WikiHome.prototype.predictiveSearch = function(from){
+	if ( this.predictiveTimer != null ) {
+		clearInterval(this.predictiveTimer);
+	}
+	var self = this;
+	this.predictiveTimer = setInterval(function() {self.doPredictiveSearch(from), 1000}); 
+}
+
+WikiHome.prototype.doPredictiveSearch = function(from) {
+	if ( this.feedUpdateBroker != undefined && this.feedUpdateBroker != null ) {
+		this.feedUpdateBroker.cancel();
+	}
+	lastWikiSearchWasFrom = from;
+	var srstring = this.wikiSearchString.getText();
+	if (srstring.length <= 1) {
+		return;
+	}
+	var url = this.formSearchUrl( srstring , from, resultsPerPage );
+	this.feedURL = url;
+	this.update(true, false);
+}
+
+
+WikiHome.prototype.formSearchUrl = function(query, offset, limit) {
+	var buf = baseUrl + wikiSearchBaseUrl + query
+	if (offset > 0) {
+		buf += wikiSearchOffsetQueryPart + offset;
+	}
+	buf += wikiSearchLimitQueryPart + limit;
+	return buf;
+}
+
+// abstract function for updating per-view menu
+// only called if window.widget is defined
+WikiHome.prototype.setupMenu = function(){
+	if ( window.widget ) {
+		menu.clear();
+		var self = this;
+		var searchMenuItem = new MenuItem("Search", MENU_ITEM_MAIN_SEARCH); 
+		searchMenuItem.onSelect = function(){wikiHomeView.show();};
+		menu.append(searchMenuItem);
+		var historyMenuItem = new MenuItem("History", MENU_ITEM_MAIN_HISTORY); 
+		historyMenuItem.onSelect = function(){wikiHistoryView.previousView = self; wikiHistoryView.show();};
+		menu.append(historyMenuItem);
+		var bookmarksMenuItem = new MenuItem("Bookmarks", MENU_ITEM_MAIN_BOOKMARKS); 
+		bookmarksMenuItem.onSelect = function(){wikiBookmarksView.previousView = self; wikiBookmarksView.show();};
+		menu.append(bookmarksMenuItem);
+		
+		addHelpMenuItems();		
+	}
+}
+
+WikiHome.prototype.focusFirst = function(){
+	// don't change focus - this is predictive search so stick with text field
+}
+
+WikiHome.prototype.show = function(){
+	View.prototype.show.call(this);
+	if (window.widget) {
+		widget.setNavigationEnabled(true);
+	}
+}
+
+
+// force right soft key to display "Exit" command
+//WikiHome.prototype.setupSoftKeys = function()  {
+//    if (window.widget) {
+//		alert("WikiHome.prototype.setupSoftKeys");
+//		menu.setRightSoftkeyLabel();
+//	}
+//}
+
+
+// //////////////////////////////////////////////////////////////
+// Article view
+function WikiListView(caption){
+	ListView.prototype.init.call(this, null, null);	
+	caption = uniDecode(caption); // can be encoded unicode 
+	var caption = new NavigationButton(1, "titlebar.png", shorten(caption, 30), true);
+	caption.addEventListener("ActionPerformed", function(){wikiHomeView.show();});
+	this.addControl(caption);
+	this.useHistoryForBackButton = 1; // used internally to identify the type 
+}
+
+WikiListView.prototype = new ListView(null,null);
+
+
+WikiListView.prototype.setupMenu = function () {
+	if ( window.widget ) {
+		menu.clear();
+		var self = this;
+		
+		var searchMenuItem = new MenuItem("Search", MENU_ITEM_READER_SEARCH); 
+		searchMenuItem.onSelect = function(){wikiHomeView.show();};
+		menu.append(searchMenuItem);
+
+		var bookmarkMenuItem = new MenuItem("Add bookmark", MENU_ITEM_MAIN_ADD_BOOKMARK); 
+		bookmarkMenuItem.onSelect = function(){wikiBookmarksView.addItem(pageBeingShown, pageBeingShownContent, pageBeingShownBase);};
+		menu.append(bookmarkMenuItem);
+
+		var backMenuItem = new MenuItem("Back", MENU_ITEM_MAIN_BACK);
+		backMenuItem.onSelect = function(){self.goBack();};
+		menu.append(backMenuItem);
+
+		if (wikiHistoryView.hasNext()) {
+			var forwardMenuItem = new MenuItem("Forward", MENU_ITEM_MAIN_NEXT);
+			forwardMenuItem.onSelect = function(){wikiHistoryView.go(1);};
+			menu.append(forwardMenuItem);
+		}
+		
+		var historyMenuItem = new MenuItem("History", MENU_ITEM_MAIN_HISTORY); 
+		historyMenuItem.onSelect = function(){wikiHistoryView.previousView = self; wikiHistoryView.show();};
+		menu.append(historyMenuItem);
+
+		var bookmarksMenuItem = new MenuItem("Bookmarks", MENU_ITEM_MAIN_BOOKMARKS); 
+		bookmarksMenuItem.onSelect = function(){wikiBookmarksView.previousView = self; wikiBookmarksView.show();};
+		menu.append(bookmarksMenuItem);
+
+		addHelpMenuItems();
+		
+	}
+
+}
+
+WikiListView.prototype.show = function(){
+	View.prototype.show.call(this);
+	if (window.widget) {
+		widget.setNavigationEnabled(true);
+	}
+}
+
+WikiListView.prototype.setupPreviousView = function() {
+	if ( uiManager.currentView.useHistoryForBackButton != undefined ) {
+		this.useHistoryForBackButton = true;
+		// this signals to uiManager that we want a back button.
+		// actual value is not used because useHistoryForBackButton = true
+		this.previousView = wikiHistoryView;
+	} else {
+		this.useHistoryForBackButton = false;
+		this.previousView = uiManager.currentView;
+	}
+}
+
+WikiListView.prototype.goBack = function() {
+	if (this.useHistoryForBackButton) {
+		wikiHistoryView.go(-1);
+	} else {
+		View.prototype.goBack.call(this);
+	}
+}
+
+
+// /////////////////////////////////////////////////////////////////////////////
+// RssReader customisations
+
+// response parser for forum groups
+function wikiResponseParser(broker, responseStatus, xmlDoc) {
+    if (responseStatus == 200 && xmlDoc != null) {
+		// for compatibility with rss
+		var lastModified = new Date();
+		
+        // init result items array
+        var items = [];
+
+		var elements = xmlDoc.getElementsByTagName("p");
+
+		for (var i = 0; i < elements.length; i++) {
+			var pagetitle = elements[i].getAttribute("title");
+            items.push({ id: ""+i, title: pagetitle});
+		}
+
+		lastWikiSearchResultCountWas = elements.length;
+        // update was completed successfully
+        return { status: "ok", lastModified: lastModified, items: items };
+    } else {
+        // update failed
+        return { status: "error" };
+    }
+}
+
+
+
+// ////////////////////////////////////////////////////////////////////////////
+// FeedPresenter implementation for full search results view
+function WikiFeedPresenter(rssreader){
+	if (rssreader) {
+		this.init(rssreader);
+	}
+}
+
+// WikiFeedPresenter is a subclass of ButtonFeedPresenter
+WikiFeedPresenter.prototype = new ButtonFeedPresenter(null);
+
+// WikiFeedPresenter "Constructor"
+WikiFeedPresenter.prototype.init = function(rssreader) {
+	ButtonFeedPresenter.prototype.init.call(this, rssreader);
+}
+
+// Handle the click on a specific item
+WikiFeedPresenter.prototype.feedClicked = function(event){
+	var buttonid = event.source.id;
+	
+	if (buttonid == "Next page") {
+		wikiHomeView.search(lastWikiSearchWasFrom + resultsPerPage);
+	}
+	else if (buttonid == "Previous page") {
+		var from = lastWikiSearchWasFrom - resultsPerPage; 
+		if ( from < 0 ) from = 0;
+		wikiHomeView.search(from);
+	}
+	else {
+		// show article
+		var title = this.items[buttonid].title;
+		wikiBrowse(title);
+	}
+}
+
+// Create and add controls to be shown before items list.
+WikiFeedPresenter.prototype.addFooterItems = function(){
+    var self = this;
+	if (lastWikiSearchResultCountWas == resultsPerPage) {
+		var nextPageButton = new NavigationButton("Next page", "next.png", "Next page");
+		nextPageButton.addEventListener("ActionPerformed", function(event){ self.feedClicked(event); });
+		this.rssreader.addFeedItemControl(nextPageButton);
+	}
+	if (lastWikiSearchWasFrom > 0) {
+		var prevPageButton = new NavigationButton("Previous page", "prev.png", "Previous page");
+		prevPageButton.addEventListener("ActionPerformed", function(event) { self.feedClicked(event); });
+		this.rssreader.addFeedItemControl(prevPageButton);
+	}
+}
+
+
+// /////////////////////////////////////////////////////////////////////////////////
+// Browse / view wiki pages in 'printable format'
+var wikiAjax;
+var pageBeingShown;
+var pageBeingShownBase;
+var pageBeingShownContent;
+var gDontAddToHistory;
+var wikiBrowseCancelled = false;
+var gViewCache = new ViewCache(10);
+
+function wikiBrowse(page, dontAddToHistory, baseUrl) {
+	pageBeingShown = page;
+	if ( baseUrl != undefined && baseUrl != null ){
+		pageBeingShownBase = baseUrl;
+	} else {
+		pageBeingShownBase = wikiViewPageUrlBase;
+	}
+	//alert("page=" + pageBeingShown + ", baseUrl=" + pageBeingShownBase);
+	if ( dontAddToHistory != undefined || dontAddToHistory == true) {
+		gDontAddToHistory = true;
+	} else {
+		gDontAddToHistory = false;
+	}
+	wikiBrowseCancelled = false;
+	var t = page.replace(/_/g, ' ');
+	var v = gViewCache.getView(t);
+	if ( v != undefined && v != null ) {
+		v.setupPreviousView();
+		v.show();
+		return;
+	}
+	try {
+		pageBeingShownContent = null;
+		uiManager.showNotification(-1, "wait", "Loading page...", -1);
+		if (page) {
+		
+			wikiAjax = new Ajax();
+			
+			wikiAjax.onreadystatechange = function(){
+				wikiPageDownloadStateChanged();
+			};
+			
+			//		var url = wikiViewPageUrlBase  + encodeURIComponent(page) + wikiPrintableParam; 
+			var url = pageBeingShownBase + encodeURIComponent(page) + wikiPrintableParam;
+			//alert("url: " + url);
+			//		var url = wapediaArticleBase + page 
+			// initiate the request
+			wikiAjax.open("GET", url, true);
+			wikiAjax.send(null);
+			
+			if (window.widget) {
+				menu.setRightSoftkeyLabel("Cancel", function(){
+					wikiBrowseCancel();
+				});
+			}	
+			
+		}
+	} catch(xx) { alert(xx);}
+}
+
+function wikiBrowseCancel() {
+	wikiBrowseCancelled = true;
+	wikiAjax.abort();
+}
+
+function wikiPageDownloadStateChanged() {
+	if ( wikiBrowseCancelled ) {
+		return;
+	}
+    if (wikiAjax.readyState == 4) {
+		uiManager.hideNotification();
+		try {
+			showWikiPage(pageBeingShown, wikiAjax.responseText);
+		}catch(xx) { alert(xx);}
+	}
+}
+
+function showWikiPage(title, html){
+	// ensure no underscores
+	title = title.replace(/_/g, ' ');
+	title = uniDecode(title);
+	pageBeingShown = title;
+	pageBeingShownContent = html;
+	if (false == gDontAddToHistory) {
+		wikiHistoryView.addItem(title, html, pageBeingShownBase);
+	}
+	var start = html.indexOf('<div id="bodyContent">');
+	var end = findDivEnd(html, start);
+	var pageView = new WikiListView(pageBeingShown);
+	var text = html.substring(start, end);
+//	text = stripExtStyle(text);
+//	text = modWikiBox(text, 'class="box"');
+//	text = modWikiBox(text, 'class="vertical-navbox');
+//	text = modWikiBox(text, 'class="infobox"');
+	text = stripStylesFromTag(text, "table", "box"); 
+	text = stripStylesFromTag(text, "table", "infobox"); 
+	text = stripStylesFromTag(text, "table", "navbox"); 
+	text = stripStylesFromTag(text, "table", "vertical-navbox"); 
+	text = stripStylesFromTag(text, "div", "thumbinner");
+	// replace inline float: right;
+	text = text.replace(/float: right|float:right/g, "clear:both; width: 95%; display:block");
+	text = text.replace(/clear:right|clear: right/g, "");
+	text = modWikiLinks(text);
+	
+	var docModel = ParseIntoDocModel(text);
+	var preamble = new ContentPanel(null, "Overview", docModel.preface, true, true);
+	pageView.addControl(preamble);
+	for (var i = 0; i < docModel.sections.length; i++) {
+		if ( docModel.sections[i].caption == "Contents" ) {
+			continue;
+		}
+		var control = new ContentPanel(
+			null, 
+			docModel.sections[i].caption, 
+			docModel.sections[i].content, 
+			true, false); // foldable & expanded
+		pageView.addControl(control);
+	}
+	pageView.setupPreviousView();
+	gViewCache.addView(title,pageView);
+	pageView.show();
+}
+
+// ///////////////////////////////////////////////////////////////////////
+// Parsing and modding HTML to fit
+
+function modWikiLinks(text) {
+//	var tmp = text;//.replace(/ src="/g, ' src="http://www.wikipedia.org');
+	// images sorted. now links
+	var tmp = text.replace(/65em/g, '100%');
+	var strToLookFor = ' href="/wiki/'; //index.php/';
+
+//	var tmp = text.replace(/ src="/g, ' src="http://wapedia.mobi');
+//	// images sorted. now links
+//	var strToLookFor = ' href="/en/';
+
+	var from = 0;
+	var ind = tmp.indexOf(strToLookFor);
+	var buf ="";
+	while ( ind > 0 ) {
+		buf = buf + tmp.substring(from, ind);
+		// extract page name
+		var ind2 = tmp.indexOf('"', ind + strToLookFor.length);
+		var pageName = tmp.substring(ind + strToLookFor.length, ind2);
+		buf += " style=\"text-decoration: underline;\""
+		buf += " href=\"JavaScript:void(0)\"";
+		buf += " onclick=\"event.stopPropagation();wikiBrowse(uniDecode('" + pageName.replace(/'/g, "\'") + "')); return false;\"";
+		from = ind2;
+		ind = tmp.indexOf(strToLookFor, from);
+	}
+	buf = buf + tmp.substring(from);
+	return buf; 
+}
+
+function stripExtStyle(text) {
+	var ret = text.replace(/style=\".+?\"/g, "");
+	return ret;
+}
+
+function stripStylesFromTag(text, tag, style) {
+	var key = "<" + tag + " ";
+	var ind = text.indexOf(key);
+	if ( ind == -1 ) return text;
+	var buf = "";
+	var prevind = 0;
+	while(ind != -1 ) {
+		var ind2 = text.indexOf(">", ind);
+		if ( ind2 == -1 ) {
+			// something's wrong, return unedited
+			return text; 
+		}
+		var tag = text.substring(ind, ind2+1);
+		if ( style != undefined ) {
+			if ( tag.indexOf(style) != -1 ) {
+				tag = stripExtStyle(tag);
+			}
+		} else {
+			tag = stripExtStyle(tag);
+		}
+		buf += text.substring(prevind, ind);
+		buf += tag;
+		prevind = ind2+1;
+		ind = text.indexOf(key, prevind );
+	}
+	buf += text.substring(prevind);
+	return buf;
+}
+
+function findDivEnd(text, from) {
+	var openDivCount = 1;
+	var divind = text.indexOf("<div", from+1);
+	var cdivind = text.indexOf("</div", from+1);
+	var pos = from;
+	while ( openDivCount > 0 && divind > 0 && cdivind > 0 ) {
+		pos = Math.min(divind, cdivind);
+		if ( pos == divind ) {
+			openDivCount ++;
+		}
+		if ( pos == cdivind ) {
+			openDivCount --;
+		}
+		divind = text.indexOf("<div", pos+1);
+		cdivind = text.indexOf("</div", pos+1);
+	}
+	return pos;
+}
+
+
+
+function DocModel(){
+	this.preface = null;
+	this.sections = new Array();
+}
+
+
+function DocSection(caption, content) {
+	this.caption = caption;
+	this.content = content;
+}
+
+
+function ParseIntoDocModel(text) {
+	var model = new DocModel(); 
+	var ind = text.indexOf("<h2");
+	if ( ind == -1 ) {
+		model.preface = text;
+		return model;
+	}
+	
+	model.preface = text.substring(0,ind);
+	while (ind > 0) {
+		text = text.substring(ind);
+		ind = 0;
+		var ind2 = text.indexOf("</h2>");
+		var caption = text.substring(ind+4, ind2);
+		text = text.substring(ind2+5);
+		ind = text.indexOf("<h2");
+		var endind = ind;
+		if ( endind == -1 ) {
+			endind = text.length-1;
+		}
+		var content = text.substring(0,endind);
+		var section = new DocSection(caption, content);
+		model.sections.push(section);
+	}
+	return model;
+}
+
+
+
+
+
+
+
+// also for vertical-navbox,
+// clx = 'class="box"' 
+//function modWikiBox(text, clx) {
+//	var ind = text.indexOf(clx);
+//	if ( ind == -1 ) return text;
+//	var buf = "";
+//	var prevind = 0;
+//	while(ind != -1 ) {
+//		var ind2 = text.lastIndexOf("<table ", ind);
+//		if ( ind2 == -1 ) {
+//			// something's wrong, return unedited
+//			return text; 
+//		}
+//		var substr = text.substring(ind2+1, ind);
+//		if (substr.indexOf(">") == -1 && substr.indexOf("<") == -1 ) {
+//			// got it
+//			buf += text.substring(prevind, ind2 + 7);
+//		} else {
+//			// not it
+//			buf += text.substring(prevind, ind);
+//		}
+//		prevind = ind;
+//		ind = text.indexOf(clx, prevind + 1);
+//	}
+//	buf += text.substring(prevind);
+//	return buf;
+//}
+//
+//function modDivs(text, clx) {
+//	var key = "<div " + clx;
+//	var ind = text.indexOf(key);
+//	if ( ind == -1 ) return text;
+//	var buf = "";
+//	var prevind = 0;
+//	while(ind != -1 ) {
+//		var ind2 = text.indexOf(">", ind);
+//		if ( ind2 == -1 ) {
+//			// something's wrong, return unedited
+//			return text; 
+//		}
+//		buf += text.substring(prevind, ind + key.length);
+//		prevind = ind2;
+//		ind = text.indexOf(key, prevind );
+//	}
+//	buf += text.substring(prevind);
+//	return buf;
+//}
+//
+
Binary file Wikipedia/Wikipedia-logo.png has changed
Binary file Wikipedia/blueright.png has changed
Binary file Wikipedia/delete.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/help.txt	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,55 @@
+Welcome to <i><strong>Wikipedia Reader For Symbian</strong></i> help.
+<p>&nbsp;</p>
+<h2>Navigation</h2>
+Navigation depends on the context, but can be summarised as follows:
+<ul>
+	<li>Right soft key always shows the previous view</li>
+	<li>Browsing history can be accessed from the right soft key menu</li>
+	<li>When viewing articles, clicking an article link opens the article</li>
+	<li>Search results are shown in pages; links to previous/next result pages are available at the bottom of every search result view.</li>
+</ul>
+<h2>Searching</h2>
+Just type the article name and click search!
+<h2>Bookmarks</h2>
+Bookmarks view can be opened by selecting "Bookmarks" from the right soft key menu.
+<h3>Adding a bookmark</h3>
+Bookmark can be added when viewing an article. 
+To add a bookmark, select "Add bookmark" from the right soft key menu.
+<h3>Clearing bookmarks</h3>
+To clear bookmarks, open the bookmarks view and select "Clear" from the right soft key menu.
+
+<h2>History</h2>
+History view can be opened by selecting "History" from the right soft key menu.
+<h3>Clearing history</h3>
+To clear history, open the history view and select "Clear" from the right soft key menu.
+
+<h2>Tips</h2>
+<ul>
+	<li>In any page, click on the title bar takes you back to search view</li>
+	<li>While reading articles, click on the content area collapses current section</li>
+</ul>
+
+<h2>About</h2>
+Wikipedia Widget was developed by Ivan Litovski in response to 
+<a href="javascript:void()" onclick="openUrl('http://ideas.symbian.org/Idea/View?ideaid=2091');">Tim Holbrow's post</a> on 
+<a href="javascript:void()" onclick="openUrl('http://ideas.symbian.org')">ideas.symbian.org</a>.
+<p>
+Wikipedia Widget source is available inside the widget archive. The WGZ file is in fact a ZIP so 
+it can be easily extracted, changed and re-packed. 
+
+<h2>Licenses</h2>
+
+<h3>Wikipedia name and logo</h3>
+Wikipedia is a registered trademark of the 
+<a href="javascript:void()" onclick="openUrl('http://wikimediafoundation.org');">Wikimedia Foundation, Inc.</a>, a non-profit organization.
+<p>
+<h3>Wikipedia content</h3>
+Wikipedia content is available under the <a href="javascript:void()" onclick="openUrl('http://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License');">Creative Commons Attribution-ShareAlike License</a>; additional terms may apply. 
+See <a href="javascript:void()" onclick="openUrl('http://wikimediafoundation.org/wiki/Terms_of_Use');">Terms of Use</a> for details.
+<p>
+<h3>Widget source</h3>
+Most Wikipedia Widget source is in the <a href="javascript:void()" onclick="wikiBrowse('Public domain');">public domain</a>. Exception are several source files 
+derived from Nokia WRT. Please refer to source code for details.
+<p>
+<h3>Graphics</h3>
+The title-bar and home-screen graphic has been derived from <a href="javascript:void()" onclick="openUrl('http://www.bittbox.com/freebies/free-vector-glass-header-designs-fancy');">Jay Hilgert's Fancy Glass Headers</a>.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/index.html	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"  lang="mul" dir="ltr">
+    <head>
+        <title></title>
+		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />		
+        <script type="text/javascript" src="WRTKit/WRTKit.js"></script>
+        <script type="text/javascript" src="utils.js"></script>
+        <script type="text/javascript" src="RssReader.js"></script>
+        <script type="text/javascript" src="FeedUpdateBroker.js"></script>
+        <script type="text/javascript" src="FeedPresentation.js"></script>
+        <script type="text/javascript" src="Wiki.js"></script>
+        <script type="text/javascript" src="History.js"></script>
+        <script type="text/javascript" src="Bookmarks.js"></script>
+        <script type="text/javascript" src="main.js"></script>
+        <link rel="stylesheet" href="style.css" type="text/css">
+        <link rel="stylesheet" href="wiki.css" type="text/css">
+		<link rel="stylesheet" href="WRTKit/Resources/UI.css" id="stylesheet">
+		<meta name="language" content="Many" />
+        <META NAME="Generator" CONTENT="Nokia WRT plug-in for Aptana Studio 2.2.0" />
+    </head>
+    <body onload="init();"  
+			onShow="javascript:setViewMode();" 
+			onResize="javascript:setViewMode();">
+    	<div id="uimandiv" style="display: none;"></div>
+    	<div id="minidiv" style="display: none;"><img src="miniview.png" style="margin:0px 0px; padding: 0px 0px;"></div>
+    	<div id="debugdiv" style="display: none;"></div>
+    </body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/lang.txt	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,299 @@
+<img src="warning.png" align=center> <strong>Beta functionality notice</strong><p>
+
+Support for reading articles in languages other than English is experimental. Known issues are:<p>
+<ul>
+<li>Application menus and navigation buttons are not localised for all languges.</li>
+<li>Some scripts and particularly article titles may not display correctly.</li>
+<li>Search may not produce language-specific search results for all languages.</li>
+</ul>
+
+<h2>100,000+ articles</h2>
+
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ar.wikipedia.org/");' lang="ar" dir="rtl" title="Al-ʿArabīyah">العربية</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ca.wikipedia.org/");' lang="ca">Català</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://cs.wikipedia.org/");' lang="cs">ÄŒesky</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://da.wikipedia.org/");' lang="da">Dansk</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://de.wikipedia.org/");' lang="de">Deutsch</a>
+
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://en.wikipedia.org/");' lang="en">English</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://es.wikipedia.org/");' lang="es">Español</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://eo.wikipedia.org/");' lang="eo">Esperanto</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://fr.wikipedia.org/");' lang="fr">Français</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ko.wikipedia.org/");' lang="ko" title="Hangugeo">한국어</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://id.wikipedia.org/");' lang="id">Bahasa Indonesia</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://it.wikipedia.org/");' lang="it">Italiano</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://he.wikipedia.org/");' lang="he" dir="rtl" title="‘Ivrit">עברית</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://lt.wikipedia.org/");' lang="lt">Lietuvių</a>
+
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://hu.wikipedia.org/");' lang="hu">Magyar</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://nl.wikipedia.org/");' lang="nl">Nederlands</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ja.wikipedia.org/");' lang="ja" title="Nihongo">日本語</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://no.wikipedia.org/");' lang="nb">Norsk (bokmål)</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://pl.wikipedia.org/");' lang="pl">Polski</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://pt.wikipedia.org/");' lang="pt">Português</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ru.wikipedia.org/");' lang="ru" title="Russkiy">РуÑÑкий</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ro.wikipedia.org/");' lang="ro">Română</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://sk.wikipedia.org/");' lang="sk">SlovenÄina</a>
+
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://sr.wikipedia.org/");' lang="sr"><span lang="sr-Cyrl">СрпÑки</span> / <span lang="sr-Latn">Srpski</span></a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://fi.wikipedia.org/");' lang="fi">Suomi</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://sv.wikipedia.org/");' lang="sv">Svenska</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://tr.wikipedia.org/");' lang="tr">Türkçe</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://uk.wikipedia.org/");' lang="uk" title="Ukrayins’ka">УкраїнÑька</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://vi.wikipedia.org/");' lang="vi">Tiếng Việt</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://vo.wikipedia.org/");' lang="vo">Volapük</a>
+
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://zh.wikipedia.org/wiki/");' lang="zh" id="zhwiki" title="ZhÅngwén">中文</a>
+
+
+<h2>10,000+ articles</h2>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://af.wikipedia.org/");' lang="af">Afrikaans</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://an.wikipedia.org/");' lang="an">Aragonés</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ast.wikipedia.org/");' lang="ast">Asturianu</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ht.wikipedia.org/");' lang="ht">Kreyòl Ayisyen</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://az.wikipedia.org/");' lang="az"><span lang="az-Latn">Azərbaycan</span> / <span lang="az-Arab" dir="rtl">آذربايجان ديلی</span></a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://bn.wikipedia.org/");' lang="bn" title="Bangla">বাংলা</a>
+<span lang="be" title="Belaruskaya">БеларуÑÐºÐ°Ñ (
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://be.wikipedia.org/")' title="Akademichnaya">ÐкадÑмічнаÑ</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://be-x-old.wikipedia.org/")' title="Taraškievica">Тарашкевiца</a>)</span>
+
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://bpy.wikipedia.org/");' lang="bpy" title="Bishnupriya Manipuri">বিষà§à¦£à§à¦ªà§à¦°à¦¿à¦¯à¦¾à¦¼ মণিপà§à¦°à§€</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://bs.wikipedia.org/");' lang="bs">Bosanski</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://br.wikipedia.org/");' lang="br">Brezhoneg</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://bg.wikipedia.org/");' lang="bg" title="Bulgarski">БългарÑки</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://cv.wikipedia.org/");' lang="cv" title="Çuvaş">Чăваш</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://cy.wikipedia.org/");' lang="cy">Cymraeg</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://et.wikipedia.org/");' lang="et">Eesti</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://el.wikipedia.org/");' lang="el" title="Ellīniká">Ελληνικά</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://eu.wikipedia.org/");' lang="eu">Euskara</a>
+
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://fa.wikipedia.org/");' lang="fa" dir="rtl" title="FÄrsÄ«">Ùارسی</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://fy.wikipedia.org/");' lang="fy">Frysk</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://gl.wikipedia.org/");' lang="gl">Galego</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://gu.wikipedia.org/");' lang="gu" title="Gujarati">ગà«àªœàª°àª¾àª¤à«€</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://hi.wikipedia.org/");' lang="hi" title="HindÄ«">हिनà¥à¤¦à¥€</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://hr.wikipedia.org/");' lang="hr">Hrvatski</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://io.wikipedia.org/");' lang="io">Ido</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://is.wikipedia.org/");' lang="is">Ãslenska</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://jv.wikipedia.org/");' lang="jv">Basa Jawa</a>
+
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ka.wikipedia.org/");' lang="ka" title="Kartuli">ქáƒáƒ áƒ—ული</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ku.wikipedia.org/");' lang="ku"><span lang="ku-Latn">Kurdî</span> / <span lang="ku-Arab" dir="rtl">كوردی</span></a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://la.wikipedia.org/");' lang="la">Latina</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://lv.wikipedia.org/");' lang="lv">Latviešu</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://lb.wikipedia.org/");' lang="lb">Lëtzebuergesch</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://mk.wikipedia.org/");' lang="mk" title="Makedonski">МакедонÑки</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ml.wikipedia.org/");' lang="ml" title="Malayalam">മലയാളം</a>
+
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://mr.wikipedia.org/");' lang="mr" title="Marathi">मराठी</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ms.wikipedia.org/");' lang="ms">Bahasa Melayu</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://new.wikipedia.org/");' lang="new" title="Nepal Bhasa">नेपाल भाषा</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://nn.wikipedia.org/");' lang="nn">Norsk (nynorsk)</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://nap.wikipedia.org/");' lang="nap">Nnapulitano</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://oc.wikipedia.org/");' lang="oc">Occitan</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://pms.wikipedia.org/");' lang="pms">Piemontèis</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://nds.wikipedia.org/");' lang="nds">Plattdüütsch</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ksh.wikipedia.org/");' lang="ksh">Ripoarisch</a>
+
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://qu.wikipedia.org/");' lang="qu">Runa Simi</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://sq.wikipedia.org/");' lang="sq">Shqip</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://scn.wikipedia.org/");' lang="scn">Sicilianu</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://simple.wikipedia.org/");' lang="en">Simple English</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ceb.wikipedia.org/");' lang="ceb">Sinugboanon</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://sl.wikipedia.org/");' lang="sl">SlovenÅ¡Äina</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://sh.wikipedia.org/");' lang="sh"><span lang="sh-Latn">Srpskohrvatski</span> / <span lang="sh-Cyrl">СрпÑкохрватÑки</span></a>
+
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://su.wikipedia.org/");' lang="su">Basa Sunda</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://sw.wikipedia.org/");' lang="sw">Kiswahili</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://tl.wikipedia.org/");' lang="tl">Tagalog</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ta.wikipedia.org/");' lang="ta" title="Tamiḻ">தமிழà¯</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://te.wikipedia.org/");' lang="te" title="Telugu">తెలà±à°—à±</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://th.wikipedia.org/");' lang="th" title="Thai">ไทย</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ur.wikipedia.org/");' lang="ur" dir="rtl" title="Urdu">اردو</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://wa.wikipedia.org/");' lang="wa">Walon</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://war.wikipedia.org/");' lang="war">Winaray</a>
+
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://zh-yue.wikipedia.org/");' lang="yue" title="Yuet6yue5">粵語</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://bat-smg.wikipedia.org/");' lang="bat-x-smg">Žemaitėška</a>
+
+<h2>1,000+ articles</h2>
+
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ace.wikipedia.org/");' lang="ace">Bahsa Acèh</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://als.wikipedia.org/");' lang="gsw">Alemannisch</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://am.wikipedia.org/");' lang="am" title="Ä€mariññÄ">አማርኛ</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://roa-rup.wikipedia.org/");' lang="rup">Armãneashce</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://frp.wikipedia.org/");' lang="frp">Arpitan</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://arc.wikipedia.org/");' lang="arc" title="Ä€tûrÄyâ">ÜܬܘܪÜÜ</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://gn.wikipedia.org/");' lang="gn">Avañe’ẽ</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://zh-min-nan.wikipedia.org/");' lang="nan">Bân-lâm-gú</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://map-bms.wikipedia.org/");' lang="map-x-bms">Basa Banyumasan</a>
+
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://bh.wikipedia.org/");' lang="bh" title="BhÅjapurÄ«">भोजपà¥à¤°à¥€</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://bcl.wikipedia.org/");' lang="bcl">Bikol Central</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://bar.wikipedia.org/");' lang="bar">Boarisch</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://bo.wikipedia.org/");' lang="bo" title="Bod Skad">བོད་ཡིག</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://co.wikipedia.org/");' lang="co">Corsu</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://pdc.wikipedia.org/");' lang="pdc">Deitsch</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://dv.wikipedia.org/");' lang="dv" dir="rtl" title="Dhivehi">Þ‹Þ¨ÞˆÞ¬Þ€Þ¨</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://nv.wikipedia.org/");' lang="nv">Diné Bizaad</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ang.wikipedia.org/");' lang="ang">Eald Englisc</a>
+
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://myv.wikipedia.org/");' lang="myv" title="Erzjanj">ЭрзÑнь</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ext.wikipedia.org/");' lang="ext">Estremeñu</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://hif.wikipedia.org/");' lang="hif">Fiji Hindi</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://fo.wikipedia.org/");' lang="fo">Føroyskt</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://fur.wikipedia.org/");' lang="fur">Furlan</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ga.wikipedia.org/");' lang="ga">Gaeilge</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://gv.wikipedia.org/");' lang="gv">Gaelg</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://gd.wikipedia.org/");' lang="gd">Gàidhlig</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://gan.wikipedia.org/");' lang="gan" title="Gànyŭ">贛語</a>
+
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://glk.wikipedia.org/");' lang="glk" dir="rtl" title="Giləki">گیلکی</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://zh-classical.wikipedia.org/");' lang="lzh" title="Man4jin4 / Wényán">文言</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://hak.wikipedia.org/");' lang="hak"><span lang="hak-Latn">Hak-kâ-fa</span> / <span lang="hak-Hani">客家話</span></a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://haw.wikipedia.org/");' lang="haw">ʻŌlelo Hawaiʻi</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://hy.wikipedia.org/");' lang="hy" title="Hayeren">Õ€Õ¡ÕµÕ¥Ö€Õ¥Õ¶</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://hsb.wikipedia.org/");' lang="hsb">Hornjoserbsce</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ilo.wikipedia.org/");' lang="ilo">Ilokano</a>
+
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ia.wikipedia.org/");' lang="ia">Interlingua</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ie.wikipedia.org/");' lang="ie">Interlingue</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://os.wikipedia.org/");' lang="os" title="Iron Avžag">Ирон Æвзаг</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://kn.wikipedia.org/");' lang="kn" title="Kannada">ಕನà³à²¨à²¡</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://pam.wikipedia.org/");' lang="pam">Kapampangan</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://csb.wikipedia.org/");' lang="csb">Kaszëbsczi</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://kw.wikipedia.org/");' lang="kw">Kernewek</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://km.wikipedia.org/");' lang="km" title="Phéasa Khmér">ភាសាážáŸ’មែរ</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://kv.wikipedia.org/");' lang="kv" title="Komi">Коми</a>
+
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ky.wikipedia.org/");' lang="ky" title="KyrgyzÄa">Кыргызча</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://lad.wikipedia.org/");' lang="lad"><span lang="lad-Latn">Ladino</span> / <span lang="lad-Hebr" dir="rtl">ל×דינו</span></a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://lij.wikipedia.org/");' lang="lij">Ligure</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://li.wikipedia.org/");' lang="li">Limburgs</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ln.wikipedia.org/");' lang="ln">Lingála</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://jbo.wikipedia.org/");' lang="jbo">lojban</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://lmo.wikipedia.org/");' lang="lmo">Lumbaart</a>
+
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://mg.wikipedia.org/");' lang="mg">Malagasy</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://mt.wikipedia.org/");' lang="mt">Malti</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://mi.wikipedia.org/");' lang="mi">MÄori</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://arz.wikipedia.org/");' lang="arz" title="Maṣrī">مصرى</a><!-- (teh other one ;) -->
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://mzn.wikipedia.org/");' lang="mzn"><span lang="mzn-Arab" dir="rtl">مازÙرونی</span> / <span lang="mzn-Latn">Mäzeruni</span></a><!-- watch the behaviour of this pair re rtl vs ltr -->
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://mn.wikipedia.org/");' lang="mn" title="Mongol">Монгол</a>
+
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://my.wikipedia.org/");' lang="my" title="Myanmasa">ဗမာစာ</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://nah.wikipedia.org/");' lang="nah">NÄhuatlahtÅlli</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://nds-nl.wikipedia.org/");' lang="nds-nl">Nedersaksisch</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ne.wikipedia.org/");' lang="ne" title="NepÄlÄ«">नेपाली</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://nrm.wikipedia.org/");' lang="roa-x-nrm">Nouormand</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://nov.wikipedia.org/");' lang="nov">Novial</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://mhr.wikipedia.org/");' lang="mhr" title="Olyk Marij">Олык Марий</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://uz.wikipedia.org/");' lang="uz">O‘zbek</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://pi.wikipedia.org/");' lang="pi" title="PÄḷi">पाऴि</a>
+
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://pag.wikipedia.org/");' lang="pag">Pangasinán</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://pa.wikipedia.org/");' lang="pa" title="PañjÄbÄ«"><span lang="pa">ਪੰਜਾਬੀ</span> / <span lang="pa-Arab" dir="rtl">پنجابی</span></a><!-- watch the behaviour of this pair re rtl vs ltr -->
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ps.wikipedia.org/");' lang="ps" dir="rtl" title="Paʂto">پښتو</a><!-- (teh other one ;) -->
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://kk.wikipedia.org/");' lang="kk" title="Qazaqşa">Қазақша</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://crh.wikipedia.org/");' lang="crh">Qırımtatarca</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://rm.wikipedia.org/");' lang="rm">Rumantsch</a>
+
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://sa.wikipedia.org/");' lang="sa" title="Saṃská¹›tam">संसà¥à¤•à¥ƒà¤¤à¤®à¥</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://se.wikipedia.org/");' lang="se">Sámegiella</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://sc.wikipedia.org/");' lang="sc">Sardu</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://sah.wikipedia.org/");' lang="sah" title="Saxa Tyla">Саха Тыла</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://sco.wikipedia.org/");' lang="sco">Scots</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://stq.wikipedia.org/");' lang="stq">Seeltersk</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://pnb.wikipedia.org/");' lang="pnb" dir="rtl" title="ShÄhmukhÄ« PañjÄbÄ«">Ø´Ø§Û Ù…Ú©Ú¾ÛŒ پنجابی</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://si.wikipedia.org/");' lang="si" title="Siṃhala">සිංහල</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://szl.wikipedia.org/");' lang="szl">Ślůnski</a>
+
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://roa-tara.wikipedia.org/");' lang="roa">Tarandíne</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://tt.wikipedia.org/");' lang="tt"><span lang="tt-Cyrl">Татарча</span> / <span lang="tt-Latn">Tatarça</span></a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://tg.wikipedia.org/");' lang="tg" title="Tojikī">Тоҷикӣ</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://to.wikipedia.org/");' lang="to">Lea faka-Tonga</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://tk.wikipedia.org/");' lang="tk">Türkmen</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ug.wikipedia.org/");' lang="ug"><span lang="ug-Latn">Uyghur</span> / <span lang="ug-Arab" dir="rtl">ئۇيغۇرچه</span></a>
+
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://vec.wikipedia.org/");' lang="vec">Vèneto</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://fiu-vro.wikipedia.org/");' lang="vro">Võro</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://vls.wikipedia.org/");' lang="vls">West-Vlams</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://wo.wikipedia.org/");' lang="wo">Wolof</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://wuu.wikipedia.org/");' lang="wuu" title="Wú YÇ”">å´è¯­</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://yi.wikipedia.org/");' lang="yi" dir="rtl" title="Yidiš">ייִדיש</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://yo.wikipedia.org/");' lang="yo">Yorùbá</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://diq.wikipedia.org/");' lang="diq">Zazaki</a>
+
+<h2>100+ articles</h2>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ab.wikipedia.org/");' lang="ab" title="Aá¹—sua">ÐÒ§Ñуа</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://av.wikipedia.org/");' lang="av" title="Avar">Ðвар</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ay.wikipedia.org/");' lang="ay">Aymara</a>
+
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://bm.wikipedia.org/");' lang="bm">Bamanankan</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ba.wikipedia.org/");' lang="ba" title="Bašqort">Башҡорт</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://bi.wikipedia.org/");' lang="bi">Bislama</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://bxr.wikipedia.org/");' lang="bxr" title="Buryat">БурÑад</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ch.wikipedia.org/");' lang="ch">Chamoru</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://cbk-zam.wikipedia.org/");' lang="cbk-x-zam">Chavacano de Zamboanga</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://za.wikipedia.org/");' lang="za">Cuengh</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://dsb.wikipedia.org/");' lang="dsb">Dolnoserbski</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://eml.wikipedia.org/");' lang="roa-x-eml">Emigliàn-Rumagnòl</a>
+
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ee.wikipedia.org/");' lang="ee">EÊ‹egbe</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ki.wikipedia.org/");' lang="ki">Gĩkũyũ</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://got.wikipedia.org/");' lang="got" title="Gutisk">ðŒ²ðŒ¿ð„ðŒ¹ðƒðŒº</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://xal.wikipedia.org/");' lang="xal" title="Halʹmg">Хальмг</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ha.wikipedia.org/");' lang="ha"><span lang="ha-Latn">Hausa</span> / <span lang="ha-Arab" dir="rtl">Ù‡ÙŽÙˆÙسَا</span></a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ig.wikipedia.org/");' lang="ig">Igbo</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://iu.wikipedia.org/");' lang="iu" title="Inuktitut"><span lang="iu-Cans">áƒá“„ᒃᑎá‘ᑦ</span> / <span lang="iu-Latn">Inuktitut</span></a>
+
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ik.wikipedia.org/");' lang="ik">Iñupiak</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://kl.wikipedia.org/");' lang="kl">Kalaallisut</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ks.wikipedia.org/");' lang="ks" title="Kashmiri"><span lang="ks-Deva">कशà¥à¤®à¥€à¤°à¥€</span> / <span lang="ks-Arab" dir="rtl">كشميري</span></a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://kg.wikipedia.org/");' lang="kg">Kongo</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://lo.wikipedia.org/ໜ້າຫຼັàº");' lang="lo" title="Phaasaa Laao">ພາສາລາວ</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://cdo.wikipedia.org/");' lang="cdo">Mìng-dĕ̤ng-ngṳ̄</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://mwl.wikipedia.org/");' lang="mwl">Mirandés</a>
+
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://mdf.wikipedia.org/");' lang="mdf" title="Mokshanj">Мокшень</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://mo.wikipedia.org/");' lang="ro-Cyrl" title="Moldovenească">МолдовенÑÑкÑ</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://na.wikipedia.org/");' lang="na">Dorerin&nbsp;Naoero</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://cr.wikipedia.org/");' lang="cr"><span lang="cr-Latn">NÄ“hiyawÄ“win</span> / <span lang="cr-Cans">á“€á¦áƒá”­ááá£</span></a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://pih.wikipedia.org/");' lang="pih">Norfuk / Pitkern</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ce.wikipedia.org/");' lang="ce" title="Noxçiyn">Ðохчийн</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://or.wikipedia.org/");' lang="or" title="Oá¹›iÄ">ଓଡି଼ଆ</a>
+
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://om.wikipedia.org/");' lang="om">Afaan Oromoo</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://as.wikipedia.org/");' lang="as" title="Ôxômiya">অসমীযা়</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://pap.wikipedia.org/");' lang="pap">Papiamentu</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://pcd.wikipedia.org/");' lang="pcd">Picard</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://pnt.wikipedia.org/");' lang="pnt" title="Pontiaká">Ποντιακά</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://kaa.wikipedia.org/");' lang="kaa">Qaraqalpaqsha</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://dz.wikipedia.org/");' lang="dz" title="Rdzong-Kha">རྫོང་à½</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://rmy.wikipedia.org/");' lang="rmy"><span lang="rmy-Latn">Romani</span> / <span lang="rmy-Deva">रोमानी</span></a>
+
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://sm.wikipedia.org/");' lang="sm">Gagana SÄmoa</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://tn.wikipedia.org/");' lang="tn">Setswana</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://sd.wikipedia.org/");' lang="sd" dir="rtl" title="Sindhī">سنڌي</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://cu.wikipedia.org/");' lang="cu" title="SlovÄ›nÄ­skÅ­"><span lang="cu-Cyrl">СловѣÌньÑкъ</span> / <span lang="cu-Glag">ⰔⰎⰑⰂⰡâ°â° â°”â°â°Ÿ</span></a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://so.wikipedia.org/");' lang="so">Af Soomaali</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ckb.wikipedia.org/");' lang="ckb" dir="rtl" title="Soranî">کوردی</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ss.wikipedia.org/");' lang="ss">SiSwati</a>
+
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://srn.wikipedia.org/");' lang="srn">Sranantongo</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ty.wikipedia.org/");' lang="ty">Reo Tahiti</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://kab.wikipedia.org/");' lang="kab">Taqbaylit</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://tet.wikipedia.org/");' lang="tet">Tetun</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ti.wikipedia.org/");' lang="ti" title="TigriññÄ">ትáŒáˆ­áŠ›</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://tpi.wikipedia.org/");' lang="tpi">Tok Pisin</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://chr.wikipedia.org/");' lang="chr" title="Tsalagi">á£áŽ³áŽ©</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://bug.wikipedia.org/");' lang="bug" title="Basa Ugi">ᨅᨔ ᨕᨙá¨á¨—</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ts.wikipedia.org/");' lang="ts">Xitsonga</a>
+
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://udm.wikipedia.org/");' lang="udm" title="Udmurt">Удмурт</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://fj.wikipedia.org/");' lang="fj">Na Vosa Vaka-Viti</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://ve.wikipedia.org/");' lang="ve">Tshivenḓa</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://xh.wikipedia.org/");' lang="xh">isiXhosa</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://zea.wikipedia.org/");' lang="zea">Zeêuws</a>
+<a class="language" href="javascript:void()" onclick='event.stopPropagation();setLanguage("http://zu.wikipedia.org/");' lang="zu">isiZulu</a>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/main.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,307 @@
+// ////////////////////////////////////////////////////////////////////////////
+// Symbian Foundation Example Code
+//
+// This software is in the public domain. No copyright is claimed, and you 
+// may use it for any purpose without license from the Symbian Foundation.
+// No warranty for any purpose is expressed or implied by the authors or
+// the Symbian Foundation. 
+// ////////////////////////////////////////////////////////////////////////////
+
+// Reference to the WRTKit user interface manager and main view.
+var uiManager;
+var wikiHomeView;
+var wikiHistoryView;
+var wikiBookmarksView;
+var languageSelectView;
+var helpView;
+
+// Update variables
+var myversion = "1.0rc5";
+var updateBaseUrl = "http://developer.symbian.org/wiki/" 
+var versionWikiPageUrl = updateBaseUrl + "index.php/Wikipedia_Reader_Widget";
+var versionWikiPageString = "Current widget version is [";
+var downloadUrl = updateBaseUrl + "images/b/b3/Wikipedia.wgz";
+
+var resultsPerPage = 10;
+
+// we support variety of screen sizes and orientations
+var portrait;
+var touchscreen;
+var miniview;
+
+var initCalled = false;
+
+// Called from the onload event handler to initialize the widget.
+function init(){
+	if (window.widget) {
+		setInterval("Noop();", 10000);
+	}
+	try{
+		doUiInit();
+	} catch(x) {
+		alert(x);
+	}
+}
+
+function doUiInit(){
+    // set tab-navigation mode and show softkeys
+    // (only if we are in the WRT environment)
+    if (window.widget) {
+        widget.setNavigationEnabled(false);
+        menu.showSoftkeys();
+    }
+
+    // create UI manager
+	var elem = document.getElementById("uimandiv");
+    uiManager = new UIManager(elem,null,true);
+
+    // create main view
+    wikiHomeView = new WikiHome();
+	wikiHistoryView = new HistoryView();
+	wikiHistoryView.previousView = wikiHomeView;
+	wikiBookmarksView = new BookmarksView();
+	wikiBookmarksView.previousView = wikiHomeView;
+
+	initHelpView();
+	initLanguageView();
+
+	initCalled = true;
+	setViewMode();
+	
+//	setupLog();
+	restoreLanguage();
+    // display the main view
+	wikiHomeView.show();
+}
+
+
+
+function setViewMode() {
+	if ( !initCalled ) return;
+	portrait = window.innerWidth < window.innerHeight;
+	touchscreen = Math.min(window.innerWidth,window.innerHeight) > 240;
+	miniview = window.innerHeight < 150;
+	if ( miniview ) {
+		var main = document.getElementById("uimandiv");
+		var mini = document.getElementById("minidiv");
+		main.style.display = "none";
+		mini.style.display = "";
+	} else {
+		// no preference available, check screen size
+		if ( touchscreen ) {
+			// hi res screen, use large font
+			setLargeView();
+		}
+		else {
+			// lo res screen, use small font
+			setSmallView();
+		}
+		var main = document.getElementById("uimandiv");
+		var mini = document.getElementById("minidiv");
+		main.style.display = "";
+		mini.style.display = "none";
+	}
+}
+
+function setLargeView(){
+	document.getElementById('stylesheet').href = 'WRTKit/Resources/UI-large.css';
+//	setCssBodyFontSize(22);
+}
+
+function setSmallView(){
+	document.getElementById('stylesheet').href = 'WRTKit/Resources/UI.css';
+//	setCssBodyFontSize(14);
+}
+
+function Noop(){}
+
+
+// /////////////////////////////////////////////////////////////////////////////////
+// Help view setup
+
+function showHelp(){
+	helpView.show();
+}
+
+
+function initHelpView(){
+	helpView = new ListView();
+	var ajax = null;
+	try {
+		ajax = new Ajax();
+		ajax.open("GET", "help.txt", true);
+		ajax.onreadystatechange = function(){
+			HelpLoadComplete(ajax);
+		};
+		ajax.send(null);
+	} 
+	catch (e) {
+		alert(e);
+	}
+}
+
+function HelpLoadComplete(ajax){
+    if (ajax.readyState == 4) {
+		var text;
+		if (ajax == null || ajax.responseText == undefined || ajax.responseText == null) {
+			text = "No help available.";
+//			alert("responseText=" + ajax.responseText + ", responseXML=" + ajax.responseXml + ", status=" + ajax.status);
+		}
+		else {
+			text = ajax.responseText;
+		}
+		var caption = new NavigationButton(1, "titlebar.png", "Help", true);
+		caption.addEventListener("ActionPerformed", function(){
+			wikiHomeView.show();
+		});
+		helpView.addControl(caption);
+		var docModel = ParseIntoDocModel(text);
+		var preamble = new TextPane(null, null, docModel.preface);
+		helpView.addControl(preamble);
+		for (var i = 0; i < docModel.sections.length; i++) {
+			if (docModel.sections[i].caption == "Contents") {
+				continue;
+			}
+			var control = new ContentPanel(null, docModel.sections[i].caption, docModel.sections[i].content, true, false); // foldable & expanded
+			helpView.addControl(control);
+		}
+		
+		helpView.previousView = wikiHomeView;
+	}
+}
+
+function addHelpMenuItems(){
+	var languageMenuItem = new MenuItem("Language", MENU_ITEM_MAIN_LANGUAGE);
+	languageMenuItem.onSelect = selectLanguage;
+	menu.append(languageMenuItem);
+	var updateMenuItem = new MenuItem("Check for updates", MENU_ITEM_MAIN_UPDATES);
+	updateMenuItem.onSelect = checkForUpdates;
+	menu.append(updateMenuItem);
+	var helpMenuItem = new MenuItem("Help", MENU_ITEM_MAIN_HELP);
+	helpMenuItem.onSelect = showHelp;
+	menu.append(helpMenuItem);
+}
+
+// ////////////////////////////////////////////////////////////////////////
+// Language selection
+
+function setLanguage(lang) {
+	baseUrl = lang;
+	wikiViewPageUrlBase = baseUrl + "/w/index.php?title=";
+	uiManager.showNotification(1000, "info", "Language set");
+	if ( window.widget ) {
+		widget.setPreferenceForKey(lang, "language");
+	}
+	wikiHomeView.show();
+}
+
+function selectLanguage(){
+	languageSelectView.previousView = uiManager.currentView;
+	languageSelectView.show();
+}
+
+function restoreLanguage(){
+	if (window.widget) {
+		var lang = widget.preferenceForKey("language");
+		if ( lang != undefined && lang != null ) {
+			setLanguage(lang);
+		}
+	}
+
+}
+function initLanguageView(){
+	languageSelectView = new ListView();
+	var ajax = null;
+	try {
+		ajax = new Ajax();
+		ajax.open("GET", "lang.txt", true);
+		ajax.onreadystatechange = function(){
+			LanguageLoadComplete(ajax);
+		};
+		ajax.send(null);
+	} 
+	catch (e) {
+		alert(e);
+	}
+}
+
+function LanguageLoadComplete(ajax){
+    if (ajax.readyState == 4) {
+		var text;
+		if (ajax == null || ajax.responseText == undefined || ajax.responseText == null) {
+			text = "Language list not available.";
+//			alert("responseText=" + ajax.responseText + ", responseXML=" + ajax.responseXml + ", status=" + ajax.status);
+		}
+		else {
+			text = ajax.responseText;
+		}
+		var caption = new NavigationButton(1, "titlebar.png", "Languages", true);
+		caption.addEventListener("ActionPerformed", function(){
+			wikiHomeView.show();
+		});
+		languageSelectView.addControl(caption);
+		var docModel = ParseIntoDocModel(text);
+		var preamble = new TextPane(null, null, docModel.preface);
+		languageSelectView.addControl(preamble);
+		for (var i = 0; i < docModel.sections.length; i++) {
+			if (docModel.sections[i].caption == "Contents") {
+				continue;
+			}
+			var control = new ContentPanel(null, docModel.sections[i].caption, docModel.sections[i].content, true, false); // foldable & expanded
+			languageSelectView.addControl(control);
+		}
+		languageSelectView.show = function (){
+				View.prototype.show.call(this);
+				if (window.widget) {
+					widget.setNavigationEnabled(true);
+				} 
+		}
+		languageSelectView.previousView = wikiHomeView;
+	}
+}
+
+
+// auto update code
+
+var updatePageAjax = null;
+
+function checkForUpdates() {
+	uiManager.showNotification(-1, "wait", "Checking for updates...", -1);
+	updatePageAjax = new Ajax();
+	updatePageAjax.onreadystatechange = checkForUpdatesStage2;
+	updatePageAjax.open('GET', nocache(versionWikiPageUrl), true);
+	updatePageAjax.send(null);	
+}
+
+function checkForUpdatesStage2() {
+    if (updatePageAjax.readyState == 4) {
+		// extract version number
+		var content = updatePageAjax.responseText;
+		var ind = content.indexOf(versionWikiPageString);
+		if ( ind == -1 ) {
+			uiManager.showNotification(3000, "warning", "Update failed, check manually.");
+			return;
+		}
+		ind += versionWikiPageString.length;
+		var ind2 = content.indexOf("]",ind);
+		if ( ind2 == -1 || (ind2-ind) > 10 ) {
+			uiManager.showNotification(3000, "warning", "Update failed, check manually.");
+			return;
+		}
+		var version = content.substring(ind,ind2);
+		// compare to this version
+		if ( version != myversion ) {
+			var answer = confirm("Install version " + version + "?\nNote: Update will clear history and bookmarks.");
+			if (answer) {
+				// ok, we have the update
+				uiManager.hideNotification();
+				openURL(nocache(downloadUrl));
+				setTimeout(function () {window.close();}, 1000);
+			} else {
+			uiManager.showNotification(3000, "info", "Update cancelled.");
+			}
+		} else {
+			uiManager.showNotification(3000, "info", "Up to date!");
+		}
+	}
+}
Binary file Wikipedia/miniview.png has changed
Binary file Wikipedia/next.png has changed
Binary file Wikipedia/prev.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/preview/css/style.css	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,633 @@
+@charset "utf-8";
+body {
+	background-image: url(../images/Gradient0Background.png);
+	background-repeat: repeat-x;
+	margin: 0px;
+	font-family: "Nokia Sans", "Nokia Sans SemiBold", "Arial Narrow";
+	padding: 0px;
+	overflow: hidden;
+}
+.hide{
+	display:none;
+}
+.show{
+	display:block;
+}
+
+code{
+	background-color: #ffffa6;
+	color: #000000;
+	padding: 3px;
+	display: block;
+	font-size: 110%;
+	margin: 3px 0px;
+}
+
+#DisplaySFKWrapper{
+	overflow: hidden;
+}
+#DisplayArea {
+	margin-right: auto;
+	margin-left: auto;
+	overflow: hidden;
+
+}
+
+#WidgetArea{
+	position: relative;
+	z-index: 99;
+}
+#WidgetArea iframe{
+	width: 100%;
+	height: 100%;
+	border: 0px;
+	margin-left: auto;
+	margin-top: auto;
+}
+
+#WidgetArea.hs_portrait{
+	background-image: url(../images/device/360x640/hs-portrait.png);
+	background-repeat: no-repeat;
+}
+
+#WidgetArea.hs_landscape{
+	background-image: url(../images/device/360x640/hs-landscape.png);
+	background-repeat: no-repeat;
+}
+#WidgetArea.hs_portrait iframe{
+	width: 306px;
+	height: 76px;
+	margin-left: 26px;
+	margin-top: 321px;
+	overflow: hidden !important;
+}
+
+#WidgetArea.hs_landscape iframe{
+	width: 306px;
+	height: 76px;
+	margin-left: 322px !important;
+	margin-top: 151px !important;
+	overflow: hidden !important;
+}
+
+#iframeMask
+{
+	width: 328px;
+	height: 100px;
+	position: absolute;
+	z-index: 900;
+	background-image: url(../images/hs-iframeMask.png);
+	background-repeat: no-repeat;
+	background-position: top left;
+}
+
+#iframeMask:hover
+{
+	background-repeat: no-repeat;
+	background-position: bottom left;
+}
+
+
+#WidgetArea.hs_portrait #iframeMask{
+	margin-left: 16px !important;
+	margin-top: 310px !important;
+}
+#WidgetArea.hs_landscape #iframeMask{
+	margin-left: 312px !important;
+	margin-top: 140px !important;
+}
+
+
+#SoftKeys{
+	height: 50px;
+	width: 240px;
+	margin-right: auto;
+	margin-left: auto;
+	margin-top: 10px;
+}
+
+div.clear{
+	clear: both;
+}
+#DeviceDisplayLayout {
+	background-repeat: no-repeat;
+	background-position: center center;
+	margin-right: auto;
+	margin-left: auto;
+	margin-top: 0px;
+	overflow: hidden;
+}
+
+#DeviceDisplayLayout.portrait_240x320 {
+	background-image: url(../images/device/240x320/Portrait.png);
+	width: 600px;
+	height: 536px;
+}
+
+#DeviceDisplayLayout.landscape_240x320 {
+	background-image: url(../images/device/240x320/Landscape.png);
+	width: 848px;
+	height: 408px;
+}
+
+#SoftKeysArea{
+	z-index: 101;
+	position: relative;
+/*	background-image: url(../images/device/menuKeys-bg.png);
+	background-repeat: no-repeat;
+	background-position: center top;
+*/
+	background-color: #666666;
+}
+
+#SoftKeysArea ul{
+	list-style: none;
+	margin: 0px;
+	padding: 0px;
+	
+}
+
+#SoftKeysArea ul li{
+	margin: 0px;
+	font-weight: bold;
+	font-size: 15px;
+	float: left;
+	padding: 5px;
+}
+
+
+#SoftKeysArea ul li a{
+	color: #FFFFFF;
+	text-decoration: none;
+	display: block;
+}
+
+li#RskLabel{
+	text-align: right;
+}
+
+#MenuItemsArea{
+	z-index: 100;
+	display: none;
+}	
+
+#MenuItemsArea ul{
+	margin: 0px;
+	padding: 5px;
+	list-style-position: inside;
+	list-style-image: none;
+	list-style-type: none;
+	background-color: #CCCCCC;
+}
+
+#MenuItemsArea ul li{
+	font-size: 13px;
+	font-weight: bold;
+}
+
+#MenuItemsArea li.active{
+	background-color: #75ea00;
+}
+
+#MenuItemsArea a{
+	color: #000;
+	text-decoration: none;
+	display: block;
+	padding: 5px;
+	height: 14px;
+}
+#MenuItemsArea a:hover{
+	background-color: #75ea00;
+}
+
+#MenuItemsArea a.subMenuItem{
+	background-image: url(../images/sub-menu-arrow.png);
+	background-repeat: no-repeat;
+	background-position: right 0px;
+}
+
+#MenuItemsArea a.subMenuItem:hover{
+	background-position: right -20px;
+}
+#MenuItemsArea a.subMenuItem:active{
+	background-position: right -40px;
+}
+
+#MenuItemsArea li.active a.subMenuItem{
+	background-position: right -20px;
+}
+div#IconArea{
+	display: none;
+	font-size: 0.9em;
+	font-weight: bold;
+	background-repeat: no-repeat;
+}
+
+div#IconArea.portrait240x320{
+	background-image: url(../images/statusBar_240x320.png);
+}
+div#IconArea.landscape240x320{
+	background-image: url(../images/statusBar_320x240.png);
+}
+
+div#IconArea.portrait320x240{
+	background-image: url(../images/statusBar_320x240.png);
+}
+div#IconArea.landscape320x240{
+	background-image: url(../images/statusBar_240x320.png);
+}
+
+div#IconArea.portrait360x640{
+	background-image: url(../images/statusBar_360x640.png);
+}
+div#IconArea.landscape360x640{
+	background-image: url(../images/statusBar_640x360.png);
+}
+
+div#IconArea.landscape800x352{
+	background-image: url(../images/statusBar_800x352.png);
+}
+
+
+div.IconFile{
+	margin-left: auto;
+	margin-right: auto;
+	text-align: center;
+	padding: 20px;
+}
+
+div.IconFile:hover{
+	background-image: url(../images/IconArea-hover.png);
+	background-position: center center;
+	background-repeat: no-repeat;
+}
+
+div.IconFile p{
+	margin: 0px;
+}
+
+
+
+p.highlight span{
+	background-color: #fbf7a2;
+	font-weight: normal;
+	font-size: 0.8em;
+	padding: 3px;
+}
+
+/*
+	preferences CSS
+*/
+
+div#PreferencesBtn{
+	width: 75px;
+	height: 85px;
+	background-image: url(../images/settings-icon.png);
+	position: absolute;
+	top: 10px;
+	left: 10px;
+	background-position: left bottom;
+	z-index: 200;
+}
+
+div#PreferencesBtn:hover{
+	background-position: left top;
+}
+
+div#loaderDiv{
+	padding: 10px;
+	font-size: 1.1em;
+	position: absolute;
+	top: 0px;
+	right: 0px;
+	display: none;
+	z-index: 202;
+}
+
+div#loaderDiv.green{
+	background-color: #5abd2b;
+	color: #FFFFFF;
+}
+
+div#loaderDiv.yellow{
+	background-color: #ffff00;
+	color: #000000;
+}
+
+div#orientationIcon{
+	background-image: url(../images/normal-orientation-icon.png);
+	background-repeat: no-repeat;
+	width: 191px;
+	height: 72px;
+	float: left;
+	position: absolute;
+	left: 10px;
+	top: 0px;
+	display: none;
+}
+div#orientationIcon:hover{
+	background-image: url(../images/active-orientation-icon.png);
+}
+
+table{
+	border-top: 1px solid #808080;
+	border-left: 1px solid #808080;
+}
+
+table a.link{
+	background-color: #20c41c;
+	color: #ffffff;
+	font-weight: bold;
+	border: 1px solid #4e872c;
+	padding: 3px 2px;
+	text-decoration: none;
+	font-size: 80%;
+}
+
+table th, table td{
+	padding: 6px 5px;
+	border-bottom: 1px solid #808080;
+	border-right: 1px solid #808080;
+	font-size: 0.9em;
+}
+table th{
+	width: 150px;
+	text-align: left;
+	background-image: url(../images/th-bg-gradient.png);
+	background-repeat: repeat-x;
+	background-position: left bottom;
+}
+
+#NotificationDiv p{
+	color: #ffffff;
+	font-size: 95%;
+	padding: 5px;
+}
+
+strong{
+	color: #eee46c;
+}
+
+#BrowserNotificationBar{
+	z-index: 2000;
+	background-color: #f2eb8e;
+	border-bottom: 2px solid #f0d25e;
+	display: none;
+	position: absolute;
+	left: 0;
+	top: 0;
+	width: 100%;
+	font-size: 80%;
+	font-weight: bolder;
+	text-align: right;
+	margin: 0px;
+	opacity: 0.9;
+}
+#BrowserNotificationBar a{
+	height: 10px;
+	width: 10px;
+	float: right;
+	background-image: url(../images/BrowserNotificationBar-Toogle.gif);
+	background-position: 0px -10px;
+	margin : 4px 15px 0px 10px;
+	cursor: hand;
+	overflow: hidden;
+}
+/*
+	Event Triggering CSS
+*/
+
+h2{
+	font-size: 120%;
+	margin: 3px 0px;
+	padding: 0px;
+}
+
+#tabs-1, #tabs-2{
+	height: 223px;
+	overflow: auto;
+}
+
+#connect-charger-icon, #dis-connect-charger-icon{
+	background-repeat: no-repeat;
+	background-position: left top;
+	width: 165px;
+	height: 36px;
+	margin: 5px auto;
+}
+
+#connect-charger-icon{
+	background-image: url(../images/connect-charger-icon.png);
+}
+
+#dis-connect-charger-icon{
+	background-image: url(../images/dis-connect-charger-icon.png);
+}
+
+#connect-charger-icon:hover, #dis-connect-charger-icon:hover{
+	background-position: left bottom;
+}
+
+div#event-battery, div#event-messaging, div#event-memory{
+	float: left;
+	width: 150px;
+	height: 50px;
+	background-position: left top;
+	margin: 10px;
+	background-repeat: no-repeat;
+	border: 1px solid #6f6f6f;
+}
+
+div#event-battery.active:hover, div#event-messaging.active:hover, div#event-memory.active:hover{
+	background-position: 0px -50px;
+	border: 1px solid #75ea4f;
+}
+
+div#event-messaging.inactive, div#event-memory.inactive{
+	background-position: 0px -100px;
+	border: 1px solid #676767;
+}
+
+
+div#event-battery{
+	background-image: url(../images/battery-icon.png);
+}
+
+div#event-messaging{
+	background-image: url(../images/messaging-icon.png);
+}
+
+div#event-memory{
+	background-image: url(../images/memory-icon.png);
+}
+
+div.ui-panel{
+	height:30px;	
+}
+
+a.ui-button, a.ui-button-fixed {
+	background:#555555 url(../script/jquery-ui/css/ui-darkness/images/555555_40x100_textures_02_glass_20.png) repeat-x scroll 0 50%;
+	border:1px solid #666666;
+	color:#EEEEEE;
+	cursor:pointer;
+	font-size:0.9em;
+	font-weight:bolder;
+	line-height:1.4em;
+	margin:0.5em 8px 0.5em 0;
+	padding:0.2em 0.6em 0.3em;
+	text-decoration: none;
+}
+a.ui-button:hover, a.ui-button-fixed:hover {
+	background:#0078A3 url(../script/jquery-ui/css/ui-darkness/images/0078a3_40x100_textures_02_glass_40.png) repeat-x scroll 0 50%;
+	border:1px solid #4bd94b;
+	color:#FFFFFF;
+}
+
+a.ui-button-fixed{
+	float: left;
+	padding: 0.4em 0.6em 0.8em;
+	text-align: center;
+	width: 145px !important;
+}
+
+div#slider-value-panel{
+	text-align: center;
+	margin-top: 10px;
+}
+
+div#slider-value-panel span{
+	padding: 3px;
+	background:#0078A3 url(../script/jquery-ui/css/ui-darkness/images/0078a3_40x100_textures_02_glass_40.png) repeat-x scroll 0 50%;
+	border:1px solid #4bd94b;
+	color:#FFFFFF;
+	font-weight: bolder;
+}
+
+
+/*
+	Console UI
+*/
+#preview-ui-top{
+	overflow:auto;
+}
+
+#preview-ui-bottom{
+	overflow:hidden;
+	display: none;
+}
+#preview-ui-bottom-header{
+	background-color: #aeaeae;
+	background-image: url(../images/console-icon.gif);
+	background-repeat: repeat-x;
+	background-position: 0px -28px;
+}
+span#Console-Toggle-Button{
+	height: 9px;
+	width: 15px;
+	float: right;
+	background-repeat: no-repeat;
+	margin : 12px 8px 0px 0px;
+	cursor: hand;
+}
+
+span#Console-Toggle-Button.open{
+	background-position: 0px 0px;
+	background-image: url(../images/console-close-icon.png);
+}
+
+span#Console-Toggle-Button.open:hover{
+	background-position: 0px -9px;
+}
+
+span#Console-Toggle-Button.open:active{
+	background-position: 0px -18px;
+}
+
+
+span#Console-Toggle-Button.close{
+	background-position: 0px 0px;
+	background-image: url(../images/console-open-icon.png);
+}
+
+span#Console-Toggle-Button.close:hover{
+	background-position: 0px -9px;
+}
+
+span#Console-Toggle-Button.close:active{
+	background-position: 0px -18px;
+}
+
+
+span#Console-Clear-Button{
+	height: 16px;
+	width: 39px;
+	float: right;
+	background-image: url(../images/console-clear-button.png);
+	background-repeat: no-repeat;
+	margin : 10px 10px 0px 0px;
+	cursor: hand;
+}
+span#Console-Clear-Button:hover{
+	background-position: -0px -16px;
+}
+
+#preview-ui-bottom-body{
+	overflow:auto;
+	background-color: #ffffff;
+	display: none;
+}
+
+#preview-ui-bottom-body p{
+	font-family: "Courier New", Courier, monospace;
+	font-size: 11px;
+	padding: 2px 5px;
+	border-bottom: 1px solid silver;
+	margin: 0px;
+}
+
+#preview-ui-bottom-body p.log{
+
+}
+
+#preview-ui-bottom-body p.info{
+	background-image: url(../images/infoIcon.png);
+	background-repeat: no-repeat;
+	background-position: 5px center;
+	padding-left: 26px;
+}
+#preview-ui-bottom-body p.warn{
+	background: #00ffff url(../images/warningIcon.png);
+	background-repeat: no-repeat;
+	background-position: 5px center;
+	padding-left: 26px;
+}
+#preview-ui-bottom-body p.error{
+	background: #ffffe0 url(../images/errorIcon.png);
+	background-repeat: no-repeat;
+	background-position: 5px center;
+	padding-left: 26px;
+	color: #ff0000;
+}
+
+
+#preview-ui-bottom-header div{
+	float: left;
+	margin: 9px;
+	color: #ffffff;
+	font-size: 11px;
+	font-weight: bolder;
+	font-family: "Arial";
+}
+
+
+span#wrt-help{
+	height: 28px;
+	width: 28px;
+	float: right;
+	background-repeat: no-repeat;
+	background-image: url(../images/wrt-help-icon.png);
+}
+
+span#wrt-help:hover{
+	background-position: -28px 0px;
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/preview/data/appManager_data.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,99 @@
+/**
+ * SAPI Sample Data - AppManager
+ */
+
+
+(function(){  
+	
+    var data_apps = [
+    {
+        "Path": "C:\\private\\10282822\\com.nokia.forum.widget.accuwidget\\AccuWidget\\accuwidget.xhtml",
+        "Uid": "0x2000dad2",
+        "Caption": "AccuWidget",
+        "ShortCaption": "AccuWidget"
+    }, {
+        "Path": "C:\\private\\10282822\\com.nokia.wrt.tools.sapi.CreatorWidget\\CreatorWidget\\index.html",
+        "Uid": "0x2000dadb",
+        "Caption": "Creator Widget",
+        "ShortCaption": "Creator Widget"
+	},{
+        "Path": "Z:\\sys\\bin\\lcapp.exe",
+        "Uid": "0x10283139",
+        "Caption": "Location",
+        "ShortCaption": "Location"
+    }, {
+        "Path": "Z:\\sys\\bin\\javadrmmanager.exe",
+        "Uid": "0x1028246e",
+        "Caption": "javadrmmanager",
+        "ShortCaption": "javadrmmanager"
+    }, {
+        "Path": "Z:\\sys\\bin\\iaupdater.exe",
+        "Uid": "0x2000f85d",
+        "Caption": "iaupdater",
+        "ShortCaption": "iaupdater"
+    }, {
+        "Path": "Z:\\sys\\bin\\iaupdate.exe",
+        "Uid": "0x2000f85a",
+        "Caption": "App. update",
+        "ShortCaption": "App. update"
+    }, {
+        "Path": "Z:\\sys\\bin\\SAFlash.exe",
+        "Uid": "0x101fd693",
+        "Caption": "Flash Lite",
+        "ShortCaption": "Flash Lite"
+    }, {
+        "Path": "Z:\\sys\\bin\\eswt.exe",
+        "Uid": "0x101f9516",
+        "Caption": "eswt",
+        "ShortCaption": "eswt"
+    }, {
+        "Path": "Z:\\sys\\bin\\DRMRightsManager.exe",
+        "Uid": "0x101f85c7",
+        "Caption": "Licences",
+        "ShortCaption": "Licences"
+    }, {
+        "Path": "Z:\\sys\\bin\\RoapApp.exe",
+        "Uid": "0x10008d64",
+        "Caption": "Licence download",
+        "ShortCaption": "Licence download"
+    }, {
+        "Path": "Z:\\sys\\bin\\DdViewer.exe",
+        "Uid": "0x10008d3f",
+        "Caption": "Download",
+        "ShortCaption": "Download"
+	}, {
+		"Path": "Z:\\sys\\bin\\MediaGallery2.exe",
+		"Uid": "0x101f8599",
+		"Caption": "Gallery",
+		"ShortCaption": "Gallery"
+    }, {
+        "Path": "Z:\\sys\\bin\\CodViewer.exe",
+        "Uid": "0x10008d4a",
+        "Caption": "Download",
+        "ShortCaption": "Download"
+    }];
+		
+		
+		
+    var data_packages = [{
+        "PackageName": "Mobiola Screen Capture",
+        "Uid": "0x2000be16",
+        "Version": "3:0",
+        "Vendor": "Warelex LLC",
+        "Drive": "E"
+    }, {
+        "PackageName": "Facebook",
+        "Uid": "0x20011184",
+        "Version": "1:0",
+        "Vendor": "Nokia Corporation",
+        "Drive": "C"
+    }];
+	
+	
+	/**
+	 * register data!
+	 */
+	device.implementation.loadData('Service.AppManager', 'Application', data_apps);
+	device.implementation.loadData('Service.AppManager', 'UserInstalledPackage', data_packages);
+
+})()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/preview/data/calendar_data.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,136 @@
+/**
+ * SAPI Sample Data - Calendar
+ */
+
+
+(function(){  
+
+
+    var data_entries = [{
+        "Type": "ToDo",
+        "Summary": "Face head on my problems",
+        "Description": "Face head on my problems",
+        "EndTime": "Wednesday, 15 April, 2009 12:00:00 am",
+        "id": "ihiwykmkjzcowqEnnEbeDnJpzWhPWrgNpNgudjdwgPfisvvQscuibwwSmgkdhdiBzIfyqvfIBmiYavfklygBssoKmWpJuxftbkdLsfmuwudczlJikohlFbQecaMlbaPnwyddzqXcjrhldXignjYtWyfqfzbpcxlH",
+        "LocalId": "34",
+        "Priority": 1,
+        "Replication": "Open"
+    }, {
+        "Type": "ToDo",
+        "Summary": "Believe myself first",
+        "Description": "Believe myself first",
+        "EndTime": "Sunday, 22 March, 2009 12:00:00 am",
+        "AlarmTime": "Saturday, 21 March, 2009 11:30:00 pm",
+        "id": "rjutskelXlDdoaebCyPzjopwgxMxluuLesqqsrykvIxrFLbxvuhBImBbhqwlSRfFtvWktkrvqpjfvxCoBxpsDlbgugvqjudregvyoebgtihRiSarcnryZovfwyHTcmXqZdjdrVPvSGnqroYgXdtpafqxTzrnkMKpzLihcxfaxwmdrkuGifsgbglhyfwqmtiPyzpeuxvKFfnrmhaqnrUarustDySMgKakjpFpkhtbonmTyBvhlzv",
+        "LocalId": "35",
+        "Priority": 1,
+        "Replication": "Open"
+    }, {
+        "Type": "Meeting",
+        "Summary": "Meeting with the professor",
+        "Description": "Meeting with the professor",
+        "StartTime": "Monday, 23 March, 2009 11:56:00 am",
+        "EndTime": "Monday, 23 March, 2009 2:31:00 pm",
+        "AlarmTime": "Monday, 23 March, 2009 11:01:00 am",
+        "InstanceStartTime": "Monday, 23 March, 2009 11:56:00 am",
+        "InstanceEndTime": "Monday, 23 March, 2009 2:31:00 pm",
+        "id": "hifXqeBiUOlelbioirmeoniClarsiybNhNxdlQbqBzcngmhxtzlRoebdeYxupjaxnapugxrKnmhGjzdwtChVydzwOdwrHPokjqjvyaPwbqCjdtpukjcoyjdkjkkrndZzwjCYQPxgvereyuktnOtIndpoyimtjzPzEnkxCfzhxaDTvUgclfpsfbtgtvwk",
+        "LocalId": "31",
+        "Priority": 0,
+        "Organizer": {
+            "CommonName": "Frideswide Farprington",
+            "Address": "Christian.Wilbar@Melleva.com"
+        },
+        "Replication": "Open"
+    }, {
+        "Type": "Meeting",
+        "Summary": "Work issues",
+        "Description": "Work issues",
+        "StartTime": "Saturday, 28 March, 2009 1:22:00 am",
+        "EndTime": "Saturday, 28 March, 2009 7:56:00 am",
+        "AlarmTime": "Saturday, 28 March, 2009 12:49:00 am",
+        "InstanceStartTime": "Saturday, 28 March, 2009 1:22:00 am",
+        "InstanceEndTime": "Saturday, 28 March, 2009 7:56:00 am",
+        "id": "symstNdkqdznkcettruqqyefdjkzikeBXmcamanzrygnusjyFYheprwaxksxzrqsdbnkTqemtsqqZbqnbbircyqtohmymWvqEc",
+        "LocalId": "30",
+        "Priority": 0,
+        "Organizer": {
+            "CommonName": "Margery Worthley",
+            "Address": "Grace.Wilbar@Peger.com"
+        },
+        "Replication": "Open"
+    }, {
+        "Type": "Reminder",
+        "Summary": "Remeber to harvest corn field",
+        "Description": "Remeber to harvest corn field",
+        "StartTime": "Thursday, 02 April, 2009 12:00:00 am",
+        "AlarmTime": "Wednesday, 01 April, 2009 11:52:00 pm",
+        "id": "uwtxgvTsowwGbnsgboEprwxvmihUkkDczxeohsnsXpUzUaHgjBJmjhpfOjaoyvRrjwIkgafrcszvbCSooutemfhejtyfonHviomgouimvPtexgdWmzDgGP",
+        "LocalId": "36",
+        "Priority": 0,
+        "Replication": "Open"
+    }, {
+        "Type": "Reminder",
+        "Summary": "Remeber to wax cross country skiis",
+        "Description": "Remeber to wax cross country skiis",
+        "StartTime": "Monday, 06 April, 2009 12:00:00 am",
+        "AlarmTime": "Sunday, 05 April, 2009 11:44:00 pm",
+        "id": "ivunsxcjmrsdaKkdtbqpskSIGIFOftMLwTuvCbiHmrkJnxdZgsapbqhoxNrhsbheyztgyOfvdqGrIlawVrvEwnYjnzoSlyimcxlKcSqetcruzf",
+        "LocalId": "37",
+        "Priority": 0,
+        "Replication": "Open"
+    }, {
+        "Type": "DayEvent",
+        "Summary": "Go the bank",
+        "Description": "Go the bank",
+        "StartTime": "Monday, 06 April, 2009 6:16:00 pm",
+        "EndTime": "Monday, 06 April, 2009 7:19:00 pm",
+        "AlarmTime": "Monday, 06 April, 2009 6:07:00 pm",
+        "id": "QvcvlpXpflemwqjtniukLPsjkSengqBEfajerjclkrwysdy",
+        "LocalId": "33",
+        "Priority": 0,
+        "Replication": "Open"
+    }, {
+        "Type": "DayEvent",
+        "Summary": "School day",
+        "Description": "School day",
+        "StartTime": "Thursday, 16 April, 2009 5:27:00 pm",
+        "EndTime": "Thursday, 16 April, 2009 9:39:00 pm",
+        "AlarmTime": "Thursday, 16 April, 2009 4:35:00 pm",
+        "id": "zmHupjqghnkEepdfghSCcsmFnrrducaqEyqyetauTcmxscSptpchgimxeEnOzxdiyEldyrikjmxvgzibauvjQfdbzgoumlVyAjqfhqlgpTtbiffqdzgpzWrquiyAdidvccvffzZxmpgjjbjUCqyeuBiikiedtclqabbsdazAbb",
+        "LocalId": "32",
+        "Priority": 0,
+        "Replication": "Open"
+    }];
+	
+	
+
+	name = "C:MyCalendar";
+	id = 200;
+	localId = 20;
+		
+/** start data block **/	
+var data2 = [];
+	
+	for (var i = 1; i <= 10; i++) {
+		data2.push({
+			Type		: 'Meeting',
+			id			: id++,
+			LocalId		: localId++,
+			CalendarName: name,
+			StartTime	: new Date('3/'+i+'/2009'),
+			Endtime		: new Date('3/'+(1+i)+'/2009'),
+			Description	: 'sample meeting ' + i
+		});
+	}
+/** end data block **/	
+
+
+
+	/**
+	 * register data!
+	 */
+	device.implementation.loadData('Service.Calendar', 'C:Calendar', data_entries);
+	device.implementation.loadData('Service.Calendar', 'C:MyCalendar', data2);
+
+})()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/preview/data/contact_data.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,158 @@
+/**
+ * SAPI Sample Data - Contacts
+ */
+
+(function(){
+
+
+	var data_contacts = [{
+	    "id": "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€†î€€î€€î€€îƒ¿îƒ¿îƒ¿îƒ¿",
+	    "FirstName": {
+	        "Label": "First name",
+	        "Value": "Alice"
+	    },
+	    "LastName": {
+	        "Label": "Last name",
+	        "Value": "Moller"
+	    },
+	    "LandPhoneGen": {
+	        "Label": "Telephone",
+	        "Value": "0230328732"
+	    },
+	    "SyncClass": {
+	        "Label": "Synchronisation",
+	        "Value": "private"
+	    }
+	}, {
+	    "id": "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€ˆî€€î€€î€€îƒ¿îƒ¿îƒ¿îƒ¿",
+	    "FirstName": {
+	        "Label": "First name",
+	        "Value": "Amy"
+	    },
+	    "LastName": {
+	        "Label": "Last name",
+	        "Value": "Kammer"
+	    },
+	    "LandPhoneGen": {
+	        "Label": "Telephone",
+	        "Value": "0492303652"
+	    },
+	    "SyncClass": {
+	        "Label": "Synchronisation",
+	        "Value": "private"
+	    }
+	}, {
+	    "id": "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€‚",
+	    "SyncClass": {
+	        "Label": "Synchronisation",
+	        "Value": "private"
+	    },
+	    "LastName": {
+	        "Label": "Last name",
+	        "Value": "Bierman"
+	    },
+	    "FirstName": {
+	        "Label": "First name",
+	        "Value": "Michael"
+	    },
+	    "MobilePhoneGen": {
+	        "Label": "Mobile",
+	        "Value": "4084256071"
+	    }
+	}, {
+	    "id": "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€‡î€€î€€î€€îƒ¿îƒ¿îƒ¿îƒ¿",
+	    "FirstName": {
+	        "Label": "First name",
+	        "Value": "Ralph"
+	    },
+	    "LastName": {
+	        "Label": "Last name",
+	        "Value": "Jacmor"
+	    },
+	    "LandPhoneGen": {
+	        "Label": "Telephone",
+	        "Value": "0432443343"
+	    },
+	    "SyncClass": {
+	        "Label": "Synchronisation",
+	        "Value": "private"
+	    }
+	}, {
+	    "id": "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€…",
+	    "FirstName": {
+	        "Label": "First name",
+	        "Value": "Robert"
+	    },
+	    "LastName": {
+	        "Label": "Last name",
+	        "Value": "Richards"
+	    },
+	    "LandPhoneGen": {
+	        "Label": "Telephone",
+	        "Value": "+4443433434"
+	    },
+	    "SyncClass": {
+	        "Label": "Synchronisation",
+	        "Value": "private"
+	    }
+	}, {
+	    "id": "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€„",
+	    "FirstName": {
+	        "Label": "First name",
+	        "Value": "Ursula"
+	    },
+	    "LastName": {
+	        "Label": "Last name",
+	        "Value": "West"
+	    },
+	    "LandPhoneGen": {
+	        "Label": "Telephone",
+	        "Value": "0213443434"
+	    },
+	    "SyncClass": {
+	        "Label": "Synchronisation",
+	        "Value": "private"
+	    }
+	}];  
+	
+
+    var data_groups = [{
+        "id": "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€ƒî€€î€€î€€îƒ¿îƒ¿îƒ¿îƒ¿",
+        "GroupLabel": "TestGroupName"
+    }, {
+        "id": "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€‰î€€î€€î€€îƒ¿îƒ¿îƒ¿îƒ¿",
+        "GroupLabel": "Silver club #5488",
+        "Contents": ["î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€‚", "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€„", "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€…", "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€†î€€î€€î€€îƒ¿îƒ¿îƒ¿îƒ¿", "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€‡î€€î€€î€€îƒ¿îƒ¿îƒ¿îƒ¿", "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€ˆî€€î€€î€€îƒ¿îƒ¿îƒ¿îƒ¿"]
+    }, {
+        "id": "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€Šî€€î€€î€€îƒ¿îƒ¿îƒ¿îƒ¿",
+        "GroupLabel": "The buddies #9926"
+    }, {
+        "id": "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€‹î€€î€€î€€îƒ¿îƒ¿îƒ¿îƒ¿",
+        "GroupLabel": "Football team #5940",
+        "Contents": ["î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€‚", "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€„"]
+    }, {
+        "id": "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€Œî€€î€€î€€îƒ¿îƒ¿îƒ¿îƒ¿",
+        "GroupLabel": "Science group #2742",
+        "Contents": ["î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€‚", "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€„", "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€…", "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€†î€€î€€î€€îƒ¿îƒ¿îƒ¿îƒ¿", "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€‡î€€î€€î€€îƒ¿îƒ¿îƒ¿îƒ¿", "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€ˆî€€î€€î€€îƒ¿îƒ¿îƒ¿îƒ¿"]
+    }, {
+        "id": "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€î€€î€€î€€îƒ¿îƒ¿îƒ¿îƒ¿",
+        "GroupLabel": "Rockers #3062",
+        "Contents": ["î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€‚", "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€„", "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€…", "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€†î€€î€€î€€îƒ¿îƒ¿îƒ¿îƒ¿", "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€‡î€€î€€î€€îƒ¿îƒ¿îƒ¿îƒ¿", "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€ˆî€€î€€î€€îƒ¿îƒ¿îƒ¿îƒ¿"]
+    }];
+		
+		
+    var data_database = [{
+        "DBUri": "cntdb://c:contacts.cdb"
+    },{
+        "DBUri": "sim://global_adn"
+	}];
+    
+    
+    /**
+     * register data!
+     */
+    device.implementation.loadData('Service.Contact', 'Contact', data_contacts);
+    device.implementation.loadData('Service.Contact', 'Group', data_groups);
+    device.implementation.loadData('Service.Contact', 'Database', data_database);
+    
+})()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/preview/data/landmarks_data.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,339 @@
+/**
+ * SAPI Sample Data - Landmark
+ */
+
+(function(){
+
+	var data_landmark =	[{
+		"id":"47",
+		"LandmarkName":"Best food ever!",
+		"LandmarkPosition":{
+			"Latitude":-17.5423,
+			"Longitude":-54.8163,
+			"Altitude":82,
+			"HAccuracy":2,
+			"VAccuracy":4
+		},
+		"CategoryInfo":["1"],
+		"LandmarkDesc":"Place looks really nice.",
+		"LandmarkFields":{
+			"Country":"Finland",
+			"City":"Tokyo",
+			"AreaCode":"FI-70100",
+			"Street":"Plains Road",
+			"Telephone":"+4443433434"
+		}
+	},{
+		"id":"44",
+		"LandmarkName":"Food store",
+		"LandmarkPosition":{
+			"Latitude":65.4233,
+			"Longitude":-93.4225,
+			"Altitude":54,
+			"HAccuracy":1,
+			"VAccuracy":1
+		},
+		"CategoryInfo":["10"],
+		"LandmarkDesc":"Words are not enough to describe this landmark",
+		"LandmarkFields":{
+			"Country":"Finland",
+			"City":"St. Michel",
+			"AreaCode":"11233",
+			"Street":"McKenzie Avenue",
+			"Telephone":"0432443343"
+		}
+	},{
+		"id":"40",
+		"LandmarkName":"Hospital",
+		"LandmarkPosition":{
+			"Latitude":-2.4616,
+			"Longitude":51.4958,
+			"Altitude":43,
+			"HAccuracy":3,
+			"VAccuracy":3
+		},
+		"CategoryInfo":["13"],
+		"LandmarkDesc":"Place looks really nice.",
+		"LandmarkFields":{
+			"Country":"United States of America",
+			"City":"London",
+			"AreaCode":"11233",
+			"Street":"Pukershire Avenue",
+			"Telephone":"0565645455"
+		}
+	},{
+		"id":"45",
+		"LandmarkName":"John’s home",
+		"LandmarkPosition":{
+			"Latitude":36.9077,
+			"Longitude":134.4066,
+			"Altitude":42,
+			"HAccuracy":3,
+			"VAccuracy":5
+		},
+		"CategoryInfo":["14"],
+		"LandmarkDesc":"This is my favorite place",
+		"LandmarkFields":{
+			"City":"Los Angeles",
+			"AreaCode":"00310",
+			"Street":"McKenzie Lane",
+			"Telephone":"+35854553456",
+			"Country":"Japan"
+		}
+	},{
+		"id":"48",
+		"LandmarkName":"John’s home",
+		"LandmarkPosition":{
+			"Latitude":17.1817,
+			"Longitude":113.4183,
+			"Altitude":29,
+			"HAccuracy":3,
+			"VAccuracy":2
+		},
+		"CategoryInfo":["3"],
+		"LandmarkDesc":"Words are not enough to describe this landmark",
+		"LandmarkFields":{
+			"Country":"Norway",
+			"City":"St. Petersburg",
+			"AreaCode":"FI-70100",
+			"Street":"Windsor Road",
+			"Telephone":"+4465665456"
+		}
+	},{
+		"id":"49",
+		"LandmarkName":"Nice beach",
+		"LandmarkPosition":{
+			"Latitude":-22.0327,
+			"Longitude":-33.0193,
+			"Altitude":57,
+			"HAccuracy":1,
+			"VAccuracy":0
+		},
+		"CategoryInfo":["7"],
+		"LandmarkDesc":"This is my favorite place",
+		"LandmarkFields":{
+			"Telephone":"+35854553456",
+			"Country":"Finland",
+			"City":"Bangkok",
+			"AreaCode":"00310",
+			"Street":"Highland Avenue Extension"
+		}
+	},{
+		"id":"42",
+		"LandmarkName":"Nice view",
+		"LandmarkPosition":{
+			"Latitude":-1.5979999999999999,
+			"Longitude":177.5871,
+			"Altitude":23,
+			"HAccuracy":1,
+			"VAccuracy":4
+		},
+		"CategoryInfo":["5"],
+		"LandmarkDesc":"Words are not enough to describe this landmark",
+		"LandmarkFields":{
+			"Country":"Thailand",
+			"City":"St. Petersburg",
+			"AreaCode":"00310",
+			"Street":"Pukershire Avenue",
+			"Telephone":"0435445454"
+		}
+	},{
+		"id":"41",
+		"LandmarkName":"Summer cottage",
+		"LandmarkPosition":{
+			"Latitude":-80.6438,
+			"Longitude":78.5627,
+			"Altitude":60,
+			"HAccuracy":1,
+			"VAccuracy":4
+		},
+		"CategoryInfo":["11"],
+		"LandmarkDesc":"Place looks really nice.",
+		"LandmarkFields":{
+			"Country":"Thailand",
+			"City":"Havana",
+			"AreaCode":"99002",
+			"Street":"Eastman Street",
+			"Telephone":"+4465665456"
+		}
+	},{
+		"id":"43",
+		"LandmarkName":"Summer cottage",
+		"LandmarkPosition":{
+			"Latitude":23.6319,
+			"Longitude":-141.5323,
+			"Altitude":60,
+			"HAccuracy":2,
+			"VAccuracy":2
+		},
+		"CategoryInfo":["1"],
+		"LandmarkDesc":"This is my favorite place",
+		"LandmarkFields":{
+			"Country":"Norway",
+			"City":"Nairobi",
+			"AreaCode":"FI-70100",
+			"Street":"Windsor Avenue",
+			"Telephone":"0785434444"
+		}
+	},{
+		"id":"46",
+		"LandmarkName":"Work place",
+		"LandmarkPosition":{
+			"Latitude":1.7755,
+			"Longitude":66.132,
+			"Altitude":36,
+			"HAccuracy":5,
+			"VAccuracy":5
+		},
+		"CategoryInfo":["3"],
+		"LandmarkDesc":"Delicious strawberries sold here. Must visit again sometime!",
+		"LandmarkFields":{
+			"Country":"Kenya",
+			"City":"Havana",
+			"AreaCode":"99002",
+			"Street":"Barnes Street",
+			"Telephone":"0342303777"
+		}
+	}];
+	
+	
+	var data_category =	[{
+		"id":"1",
+		"CategoryName":"Accommodation",
+		"GlobalId":"3000",
+		"IconFile":"\resource\apps\eposlmglcategories.mif",
+		"IconIndex":16384,
+		"IconMaskIndex":16385
+	},{
+
+		"id":"2",
+		"CategoryName":"Businesses",
+		"GlobalId":"6000",
+		"IconFile":"\resource\apps\eposlmglcategories.mif",
+		"IconIndex":16386,
+		"IconMaskIndex":16387
+	},{
+		"id":"3",
+		"CategoryName":"Telecommunications",
+		"GlobalId":"9000",
+		"IconFile":"\resource\apps\eposlmglcategories.mif",
+		"IconIndex":16388,
+		"IconMaskIndex":16389
+	},{
+		"id":"4",
+		"CategoryName":"Education",
+		"GlobalId":"12000",
+		"IconFile":"\resource\apps\eposlmglcategories.mif",
+		"IconIndex":16390,
+		"IconMaskIndex":16391
+	},{
+		"id":"5",
+		"CategoryName":"Entertainment",
+		"GlobalId":"15000",
+		"IconFile":"\resource\apps\eposlmglcategories.mif",
+		"IconIndex":16392,
+		"IconMaskIndex":16393
+	},{
+		"id":"6",
+		"CategoryName":"Food and drink",
+		"GlobalId":"18000",
+		"IconFile":"\resource\apps\eposlmglcategories.mif",
+		"IconIndex":16394,
+		"IconMaskIndex":16395
+	},{
+		"id":"7",
+		"CategoryName":"Geographical locations",
+		"GlobalId":"21000",
+		"IconFile":"\resource\apps\eposlmglcategories.mif",
+		"IconIndex":16396,
+		"IconMaskIndex":16397
+	},{
+		"id":"8",
+		"CategoryName":"Outdoor activities",
+		"GlobalId":"24000",
+		"IconFile":"\resource\apps\eposlmglcategories.mif",
+		"IconIndex":16398,
+		"IconMaskIndex":16399
+	},{
+		"id":"9",
+		"CategoryName":"People",
+		"GlobalId":"27000",
+		"IconFile":"\resource\apps\eposlmglcategories.mif",
+		"IconIndex":16400,
+		"IconMaskIndex":16401
+	},{
+		"id":"10",
+		"CategoryName":"Public services",
+		"GlobalId":"30000",
+		"IconFile":"\resource\apps\eposlmglcategories.mif",
+		"IconIndex":16402,
+		"IconMaskIndex":16403
+	},{
+		"id":"11",
+		"CategoryName":"Places of worship",
+		"GlobalId":"33000",
+		"IconFile":"\resource\apps\eposlmglcategories.mif",
+		"IconIndex":16404,
+		"IconMaskIndex":16405
+	},{
+		"id":"12",
+		"CategoryName":"Shopping",
+		"GlobalId":"36000",
+		"IconFile":"\resource\apps\eposlmglcategories.mif",
+		"IconIndex":16406,
+		"IconMaskIndex":16407
+	},{
+		"id":"13",
+		"CategoryName":"Sightseeing",
+		"GlobalId":"39000",
+		"IconFile":"\resource\apps\eposlmglcategories.mif",
+		"IconIndex":16408,
+		"IconMaskIndex":16409
+	},{
+		"id":"14",
+		"CategoryName":"Sports",
+		"GlobalId":"42000",
+		"IconFile":"\resource\apps\eposlmglcategories.mif",
+		"IconIndex":16410,
+		"IconMaskIndex":16411
+	},{
+		"id":"15",
+		"CategoryName":"Transport",
+		"GlobalId":"45000",
+		"IconFile":"\resource\apps\eposlmglcategories.mif",
+		"IconIndex":16412,
+		"IconMaskIndex":16413
+	},{
+		"id":"24",
+		"CategoryName":"All places",
+		"IconFile":"Z:\resource\apps\smart2go.mif",
+		"IconIndex":16384,
+		"IconMaskIndex":16385
+	},{
+		"id":"25",
+		"CategoryName":"Nokia maps",
+		"IconFile":"Z:\resource\apps\LmkUi.mif",
+		"IconIndex":16402,
+		"IconMaskIndex":16403
+	}];
+	
+	var data_database =	[{
+		"DatabaseURI":"file://C:eposlm.ldb",
+		"DatabaseName":"",
+		"DbProtocol":"file",
+		"DbActive":false,
+		"DbSize":226,
+		"DbDrive":"C",
+		"DbMedia":9
+	}]; 
+
+
+    /**
+     * register data!
+     */
+    device.implementation.loadData('Service.Landmarks', 'Landmark', data_landmark);
+    device.implementation.loadData('Service.Landmarks', 'Category', data_category);
+    device.implementation.loadData('Service.Landmarks', 'Database', data_database);
+
+})()
+	
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/preview/data/location_data.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,39 @@
+/**
+ * SAPI Sample Data - Location
+ */
+
+(function(){
+
+		
+var data_basicLocationInformation = {
+			"Longitude":77.694589331833,
+			"Latitude":12.942209068513,
+			"Altitude":836.5
+		}
+		
+var data_genericLocationInfo = {
+			"Longitude":77.694546416505,
+			"Latitude":12.942233711299,
+			"Altitude":836,
+			"HorizontalSpeed":0.05999999865889549,
+			"HorizontalSpeedError":1.0199999809265137,
+			"SatelliteNumView":11,
+			"SatelliteNumViewUsed":7,
+			"Heading":203.89999389648438,
+			"HeadingError":2.89898989898232,
+			"MagneticCourse":205.89999389600000,
+			"MagneticCourseError":1.09090389600000,
+			"TrueCourse":203.89999389648438,
+			"TrueCourseError":2.89898989898232,
+			"MagneticHeading":205.89999389600000,
+			"MagneticHeadingError":1.09090389600000
+		}; 
+
+    /**
+     * register data!
+     */
+    device.implementation.loadData('Service.Location', 'BasicLocationInformation', data_basicLocationInformation);
+    device.implementation.loadData('Service.Location', 'GenericLocationInfo', data_genericLocationInfo);
+
+})()
+	
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/preview/data/logging_data.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,377 @@
+/**
+ * SAPI Sample Data - Logging
+ */
+
+(function(){
+
+
+	var logging_data = [{
+		"EventType":0,
+		"RemoteParty":"",
+		"EventDuration":5518,
+		"EventTime":"Wednesday, 08 April, 2009 11:17:42 am",
+		"Subject":"A",
+		"PhoneNumber":"5270443",
+		"Description":"Voice call",
+		"Link":0,
+		"id":"30",
+		"Direction":1,
+		"EventData":""
+	},{
+		"EventType":0,
+		"RemoteParty":"",
+		"EventDuration":472,
+		"EventTime":"Wednesday, 08 April, 2009 11:17:42 am",
+		"Subject":"A",
+		"PhoneNumber":"1247463",
+		"Description":"Voice call",
+		"Link":0,
+		"id":"29",
+		"Direction":1,
+		"EventData":""
+	},{
+		"EventType":0,
+		"RemoteParty":"",
+		"EventDuration":1914,
+		"EventTime":"Wednesday, 08 April, 2009 11:17:42 am",
+		"Subject":"A",
+		"PhoneNumber":"8759891",
+		"Description":"Voice call",
+		"Link":0,
+		"id":"28",
+		"Direction":1,
+		"EventData":""
+	},{
+		"EventType":0,
+		"RemoteParty":"",
+		"EventDuration":3130,
+		"EventTime":"Wednesday, 08 April, 2009 11:17:32 am",
+		"Subject":"A",
+		"PhoneNumber":"3200343",
+		"Description":"Voice call",
+		"Link":0,
+		"id":"27",
+		"Direction":0,
+		"EventData":""
+	},{
+		"EventType":0,
+		"RemoteParty":"",
+		"EventDuration":4128,
+		"EventTime":"Wednesday, 08 April, 2009 11:17:32 am",
+		"Subject":"A",
+		"PhoneNumber":"2101692",
+		"Description":"Voice call",
+		"Link":0,
+		"id":"26",
+		"Direction":0,
+		"EventData":""
+	},{
+		"EventType":0,
+		"RemoteParty":"",
+		"EventDuration":2012,
+		"EventTime":"Wednesday, 08 April, 2009 11:17:32 am",
+		"Subject":"A",
+		"PhoneNumber":"8813355",
+		"Description":"Voice call",
+		"Link":0,
+		"id":"25",
+		"Direction":0,
+		"EventData":""
+	},{
+		"EventType":0,
+		"RemoteParty":"",
+		"EventDuration":0,
+		"EventTime":"Wednesday, 08 April, 2009 11:17:24 am",
+		"Subject":"A",
+		"PhoneNumber":"8092875",
+		"Description":"Voice call",
+		"Link":0,
+		"id":"24",
+		"Direction":5,
+		"EventData":""
+	},{
+		"EventType":0,
+		"RemoteParty":"",
+		"EventDuration":0,
+		"EventTime":"Wednesday, 08 April, 2009 11:17:24 am",
+		"Subject":"A",
+		"PhoneNumber":"3702771",
+		"Description":"Voice call",
+		"Link":0,
+		"id":"23",
+		"Direction":5,
+		"EventData":""
+	},{
+		"EventType":0,
+		"RemoteParty":"",
+		"EventDuration":0,
+		"EventTime":"Wednesday, 08 April, 2009 11:17:24 am",
+		"Subject":"A",
+		"PhoneNumber":"2680939",
+		"Description":"Voice call",
+		"Link":0,
+		"id":"22",
+		"Direction":5,
+		"EventData":""
+	},{
+		"EventType":0,
+		"RemoteParty":"",
+		"EventDuration":0,
+		"EventTime":"Wednesday, 08 April, 2009 11:17:11 am",
+		"Subject":"A",
+		"PhoneNumber":"1075503",
+		"Description":"Voice call",
+		"Link":0,
+		"id":"21",
+		"Direction":5,
+		"EventData":""
+	},{
+		"EventType":0,
+		"RemoteParty":"",
+		"EventDuration":0,
+		"EventTime":"Wednesday, 08 April, 2009 11:17:11 am",
+		"Subject":"A",
+		"PhoneNumber":"9781533",
+		"Description":"Voice call",
+		"Link":0,
+		"id":"20",
+		"Direction":5,
+		"EventData":""
+	},{
+		"EventType":0,
+		"RemoteParty":"",
+		"EventDuration":0,
+		"EventTime":"Wednesday, 08 April, 2009 11:17:11 am",
+		"Subject":"A",
+		"PhoneNumber":"4185107",
+		"Description":"Voice call",
+		"Link":0,
+		"id":"19",
+		"Direction":5,
+		"EventData":""
+	},{
+		"EventType":4,
+		"RemoteParty":"Mobile Office",
+		"EventDuration":90,
+		"EventTime":"Wednesday, 08 April, 2009 11:18:37 am",
+		"Subject":"",
+		"PhoneNumber":"",
+		"Description":"Packet Data",
+		"Link":0,
+		"id":"18",
+		"Direction":1,
+		"EventData":""
+	},{
+		"EventType":4,
+		"RemoteParty":"Mobile Office",
+		"EventDuration":80,
+		"EventTime":"Wednesday, 08 April, 2009 11:15:30 am",
+		"Subject":"",
+		"PhoneNumber":"",
+		"Description":"Packet Data",
+		"Link":0,
+		"id":"18",
+		"Direction":1,
+		"EventData":""
+	},{
+		"EventType":4,
+		"RemoteParty":"Mobile Office",
+		"EventDuration":16,
+		"EventTime":"Wednesday, 08 April, 2009 11:12:33 am",
+		"Subject":"",
+		"PhoneNumber":"",
+		"Description":"Packet Data",
+		"Link":0,
+		"id":"17",
+		"Direction":1,
+		"EventData":"8303,17570"
+	},{
+		"EventType":0,
+		"RemoteParty":"",
+		"EventDuration":2998,
+		"EventTime":"Wednesday, 08 April, 2009 11:09:20 am",
+		"Subject":"A",
+		"PhoneNumber":"1716582",
+		"Description":"Voice call",
+		"Link":0,
+		"id":"16",
+		"Direction":1,
+		"EventData":""
+	},{
+		"EventType":0,
+		"RemoteParty":"",
+		"EventDuration":681,
+		"EventTime":"Wednesday, 08 April, 2009 11:09:20 am",
+		"Subject":"A",
+		"PhoneNumber":"9888150",
+		"Description":"Voice call",
+		"Link":0,
+		"id":"15",
+		"Direction":1,
+		"EventData":""
+	},{
+		"EventType":0,
+		"RemoteParty":"",
+		"EventDuration":2294,
+		"EventTime":"Wednesday, 08 April, 2009 11:09:20 am",
+		"Subject":"A",
+		"PhoneNumber":"8378283",
+		"Description":"Voice call",
+		"Link":0,
+		"id":"14",
+		"Direction":1,
+		"EventData":""
+	},{
+		"EventType":0,
+		"RemoteParty":"",
+		"EventDuration":4232,
+		"EventTime":"Wednesday, 08 April, 2009 11:09:19 am",
+		"Subject":"A",
+		"PhoneNumber":"6818380",
+		"Description":"Voice call",
+		"Link":0,
+		"id":"13",
+		"Direction":1,
+		"EventData":""
+	},{
+		"EventType":0,
+		"RemoteParty":"",
+		"EventDuration":599,
+		"EventTime":"Wednesday, 08 April, 2009 11:09:19 am",
+		"Subject":"A",
+		"PhoneNumber":"5933409",
+		"Description":"Voice call",
+		"Link":0,
+		"id":"12",
+		"Direction":1,
+		"EventData":""
+	},{
+		"EventType":0,
+		"RemoteParty":"",
+		"EventDuration":6376,
+		"EventTime":"Wednesday, 08 April, 2009 11:09:12 am",
+		"Subject":"A",
+		"PhoneNumber":"5487982",
+		"Description":"Voice call",
+		"Link":0,
+		"id":"11",
+		"Direction":0,
+		"EventData":""
+	},{
+		"EventType":0,
+		"RemoteParty":"",
+		"EventDuration":6325,
+		"EventTime":"Wednesday, 08 April, 2009 11:09:12 am",
+		"Subject":"A",
+		"PhoneNumber":"2859596",
+		"Description":"Voice call",
+		"Link":0,
+		"id":"10",
+		"Direction":0,
+		"EventData":""
+	},{
+		"EventType":0,
+		"RemoteParty":"",
+		"EventDuration":6571,
+		"EventTime":"Wednesday, 08 April, 2009 11:09:12 am",
+		"Subject":"A",
+		"PhoneNumber":"2820138",
+		"Description":"Voice call",
+		"Link":0,
+		"id":"9",
+		"Direction":0,
+		"EventData":""
+	},{
+		"EventType":0,
+		"RemoteParty":"",
+		"EventDuration":4929,
+		"EventTime":"Wednesday, 08 April, 2009 11:09:12 am",
+		"Subject":"A",
+		"PhoneNumber":"6356454",
+		"Description":"Voice call",
+		"Link":0,
+		"id":"8",
+		"Direction":0,
+		"EventData":""
+	},{
+		"EventType":0,
+		"RemoteParty":"",
+		"EventDuration":2620,
+		"EventTime":"Wednesday, 08 April, 2009 11:09:12 am",
+		"Subject":"A",
+		"PhoneNumber":"4461166",
+		"Description":"Voice call",
+		"Link":0,
+		"id":"7",
+		"Direction":0,
+		"EventData":""
+	},{
+		"EventType":0,
+		"RemoteParty":"",
+		"EventDuration":0,
+		"EventTime":"Wednesday, 08 April, 2009 11:09:02 am",
+		"Subject":"A",
+		"PhoneNumber":"8811808",
+		"Description":"Voice call",
+		"Link":0,
+		"id":"6",
+		"Direction":5,
+		"EventData":""
+	},{
+		"EventType":0,
+		"RemoteParty":"",
+		"EventDuration":0,
+		"EventTime":"Wednesday, 08 April, 2009 11:09:02 am",
+		"Subject":"A",
+		"PhoneNumber":"2985843",
+		"Description":"Voice call",
+		"Link":0,
+		"id":"5",
+		"Direction":5,
+		"EventData":""
+	},{
+		"EventType":0,
+		"RemoteParty":"",
+		"EventDuration":0,
+		"EventTime":"Wednesday, 08 April, 2009 11:09:02 am",
+		"Subject":"A",
+		"PhoneNumber":"9714278",
+		"Description":"Voice call",
+		"Link":0,
+		"id":"4",
+		"Direction":5,
+		"EventData":""
+	},{
+		"EventType":0,
+		"RemoteParty":"",
+		"EventDuration":0,
+		"EventTime":"Wednesday, 08 April, 2009 11:09:02 am",
+		"Subject":"A",
+		"PhoneNumber":"5044910",
+		"Description":"Voice call",
+		"Link":0,
+		"id":"3",
+		"Direction":5,
+		"EventData":""
+	},{
+		"EventType":0,
+		"RemoteParty":"",
+		"EventDuration":0,
+		"EventTime":"Wednesday, 08 April, 2009 11:09:02 am",
+		"Subject":"A",
+		"PhoneNumber":"6519793",
+		"Description":"Voice call",
+		"Link":0,
+		"id":"2",
+		"Direction":5,
+		"EventData":""
+	}];
+
+
+    /**
+     * register data!
+     */
+    device.implementation.loadData('Service.Logging', 'Log', logging_data);
+
+})()
+	
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/preview/data/mediaManagement_data.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,233 @@
+/**
+ * SAPI Sample Data - MediaManagement
+ */
+
+(function(){
+
+	var music_data = [{
+		"FileNameAndPath":"E:\\Sounds\\Digital\\Album1\\Breathless.mp3",
+		"Type":"Media",
+		"FileName":"Breathless",
+		"FileExtension":".mp3",
+		"Drive":"E:",
+		"MimeType":"audio/mpeg",
+		"MediaType":1,
+		"FileDate":"Friday, 13 February, 2009 12:01:24 am",
+		"FileSize":4552794,
+		"Artist":"ABC",
+		"SongName":"Breathless",
+		"TrackNumber":"1",
+		"Album":"Album1",
+		"Genre":"Pop",
+		"Composer":"XYZ"
+	},{
+		"FileNameAndPath":"E:\\Sounds\\Digital\\Album1\\New song.mp3",
+		"Type":"Media",
+		"FileName":"New song",
+		"FileExtension":".mp3",
+		"Drive":"E:",
+		"MimeType":"audio/mpeg",
+		"MediaType":1,
+		"FileDate":"Friday, 13 February, 2009 12:01:24 am",
+		"FileSize":1232794,
+		"Artist":"ABC",
+		"SongName":"New song",
+		"TrackNumber":"2",
+		"Album":"Album1",
+		"Genre":"Pop",
+		"Composer":"XYZ"
+	},{		
+		"FileNameAndPath":"E:\\Sounds\\Digital\\Album1\\Classic song.mp3",
+		"Type":"Media",
+		"FileName":"Classic song",
+		"FileExtension":".mp3",
+		"Drive":"E:",
+		"MimeType":"audio/mpeg",
+		"MediaType":1,
+		"FileDate":"Friday, 13 February, 2009 12:01:24 am",
+		"FileSize":3212794,
+		"Artist":"ABC",
+		"SongName":"Classic song",
+		"TrackNumber":"3",
+		"Album":"Album1",
+		"Genre":"Pop",
+		"Composer":"XYZ"
+	},{		
+		"FileNameAndPath":"E:\\Sounds\\Digital\\Album1\\Folk sonk.mp3",
+		"Type":"Media",
+		"FileName":"Folk sonk",
+		"FileExtension":".mp3",
+		"Drive":"E:",
+		"MimeType":"audio/mpeg",
+		"MediaType":1,
+		"FileDate":"Friday, 13 February, 2009 12:01:24 am",
+		"FileSize":3412794,
+		"Artist":"ABC",
+		"SongName":"Folk sonk",
+		"TrackNumber":"4",
+		"Album":"Album1",
+		"Genre":"Pop",
+		"Composer":"XYZ"
+	},{		
+		"FileNameAndPath":"E:\\Sounds\\Digital\\Album1\\National anthem.mp3",
+		"Type":"Media",
+		"FileName":"National anthem",
+		"FileExtension":".mp3",
+		"Drive":"E:",
+		"MimeType":"audio/mpeg",
+		"MediaType":1,
+		"FileDate":"Friday, 13 February, 2009 12:01:24 am",
+		"FileSize":4512794,
+		"Artist":"ABC",
+		"SongName":"National anthem",
+		"TrackNumber":"5",
+		"Album":"Album1",
+		"Genre":"Pop",
+		"Composer":"XYZ"
+	},{
+		"FileNameAndPath":"E:\\Sounds\\Digital\\Album1\\Dance sequence.mp3",
+		"Type":"Media",
+		"FileName":"Dance sequence",
+		"FileExtension":".mp3",
+		"Drive":"E:",
+		"MimeType":"audio/mpeg",
+		"MediaType":1,
+		"FileDate":"Friday, 13 February, 2009 12:01:24 am",
+		"FileSize":9110000,
+		"Artist":"ABC",
+		"SongName":"Dance sequence",
+		"TrackNumber":"6",
+		"Album":"Album1",
+		"Genre":"Pop",
+		"Composer":"XYZ"
+	}];
+	
+	var sound_data = [{
+		"FileNameAndPath":"E:\\Sounds\\Simple\\Dance sequence-old.mp3",
+		"Type":"Media",
+		"FileName":"Dance sequence-old",
+		"FileExtension":".mp3",
+		"Drive":"E:",
+		"MimeType":"audio/mpeg",
+		"MediaType":1,
+		"FileDate":"Friday, 13 February, 2009 12:01:24 am",
+		"FileSize":1002794,
+	},{
+		"FileNameAndPath": "E:\\Sounds\\Simple\\Rooster.mp3",
+		"Type": "Media",
+		"FileName": "Rooster",
+		"FileExtension": ".mp3",
+		"Drive": "E:",
+		"MimeType": "audio/mpeg",
+		"MediaType": 1,
+		"FileDate": "Friday, 13 February, 2009 12:01:24 am",
+		"FileSize": 911000,
+	
+	}];
+	var image_data = [{
+		"FileNameAndPath":"E:\\IMAGES\\Water.JPG",
+		"Type":"Media",
+		"FileName":"Water",
+		"FileExtension":".JPG",
+		"Drive":"E:",
+		"MimeType":"image/jpeg",
+		"MediaType":3,
+		"FileDate":"Monday, 04 August, 2008 8:31:46 pm",
+		"FileSize":25275
+	},{
+		"FileNameAndPath":"E:\\IMAGES\\Beach.JPG",
+		"Type":"Media",
+		"FileName":"Beach",
+		"FileExtension":".JPG",
+		"Drive":"E:",
+		"MimeType":"image/jpeg",
+		"MediaType":3,
+		"FileDate":"Wednesday, 28 May, 2008 8:52:16 am",
+		"FileSize":35151
+	},{
+		"FileNameAndPath":"E:\\IMAGES\\CountrySide.jpg",
+		"Type":"Media",
+		"FileName":"CountrySide",
+		"FileExtension":".jpg",
+		"Drive":"E:",
+		"MimeType":"image/jpeg",
+		"MediaType":3,
+		"FileDate":"Monday, 24 March, 2008 12:27:32 am",
+		"FileSize":44318
+	},{
+		"FileNameAndPath":"E:\\IMAGES\\CoolBlue.JPG",
+		"Type":"Media",
+		"FileName":"CoolBlue",
+		"FileExtension":".JPG",
+		"Drive":"E:",
+		"MimeType":"image/jpeg",
+		"MediaType":3,
+		"FileDate":"Monday, 04 August, 2008 8:31:46 pm",
+		"FileSize":25275
+	},{
+		"FileNameAndPath":"E:\\IMAGES\\Swimming.JPG",
+		"Type":"Media",
+		"FileName":"Swimming",
+		"FileExtension":".JPG",
+		"Drive":"E:",
+		"MimeType":"image/jpeg",
+		"MediaType":3,
+		"FileDate":"Wednesday, 28 May, 2008 8:52:16 am",
+		"FileSize":35151
+	},{
+		"FileNameAndPath":"E:\\IMAGES\\Sky.jpg",
+		"Type":"Media",
+		"FileName":"Sky",
+		"FileExtension":".jpg",
+		"Drive":"E:",
+		"MimeType":"image/jpeg",
+		"MediaType":3,
+		"FileDate":"Monday, 24 March, 2008 12:27:32 am",
+		"FileSize":44318
+	}];
+
+	var video_data = [{
+		"FileNameAndPath":"C:\\Data\\Videos\\Inside water.3gp",
+		"Type":"Media",
+		"FileName":"Inside water",
+		"FileExtension":".3gp",
+		"Drive":"C:",
+		"MimeType":"video/3gpp",
+		"MediaType":4,
+		"FileDate":"Wednesday, 08 April, 2009 5:04:18 pm",
+		"FileSize":1103067
+	},{
+		"FileNameAndPath":"C:\\Data\\Videos\\Daring.mp4",
+		"Type":"Media",
+		"FileName":"Daring",
+		"FileExtension":".mp4",
+		"Drive":"C:",
+		"MimeType":"video/mp4",
+		"MediaType":4,
+		"FileDate":"Wednesday, 08 April, 2009 5:04:18 pm",
+		"FileSize":1020200
+	},{
+		"FileNameAndPath":"C:\\Data\\Videos\\On the train.mp4",
+		"Type":"Media",
+		"FileName":"On the train",
+		"FileExtension":".mp4",
+		"Drive":"C:",
+		"MimeType":"video/mp4",
+		"MediaType":4,
+		"FileDate":"Wednesday, 08 April, 2009 5:04:18 pm",
+		"FileSize":9090900
+	}];
+	
+	var streaming_data = [{}]; 	
+		
+    /**
+     * register data!
+     */
+    device.implementation.loadData('Service.MediaManagement', 'Music', music_data);
+    device.implementation.loadData('Service.MediaManagement', 'Sound', sound_data);
+    device.implementation.loadData('Service.MediaManagement', 'Image', image_data);
+    device.implementation.loadData('Service.MediaManagement', 'Video', video_data);
+    device.implementation.loadData('Service.MediaManagement', 'StreamingURL', streaming_data);
+
+})()
+	
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/preview/data/messaging_data.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,193 @@
+/**
+ * SAPI Sample Data - Messaging
+ */
+
+(function(){
+
+
+var data_messaging = [{
+	 	"MessageType": "SMS",
+		"Sender": "0435445454",
+		"Subject": "Reproduction, transfer, distribu",
+		"Time": "Wednesday, 01 April, 2009 6:11:32 pm",
+		"Priority": "Medium",
+		"Attachment": false,
+		"Unread": false,
+		"MessageId": 1048980,
+		"BodyText": "Reproduction, transfer, distribution or storage of"
+	},{ 
+		"MessageType": "SMS",
+		"Sender": "+35854553456",
+		"Subject": "If you place an order for a prod",
+		"Time": "Wednesday, 01 April, 2009 6:11:32 pm",
+		"Priority": "Medium",
+		"Attachment": false,
+		"Unread": false,
+		"MessageId": 1048981,
+		"BodyText": "If you place an order for a product, request a ser"
+	},{
+		"MessageType": "SMS",
+		"Sender": "+4465655656",
+		"Subject": "You also agree that we have no c",
+		"Time": "Wednesday, 01 April, 2009 6:11:33 pm",
+		"Priority": "Medium",
+		"Attachment": false,
+		"Unread": false,
+		"MessageId": 1048982,
+		"BodyText": "You also agree that we have no control over the co"
+	
+	},{ 
+		"MessageType": "SMS",
+		"Sender": "+4443433434",
+		"Subject": "We may use this information to r",
+		"Time": "Wednesday, 01 April, 2009 6:11:33 pm",
+		"Priority": "Medium",
+		"Attachment": false,
+		"Unread": false,
+		"MessageId": 1048983,
+		"BodyText": "We may use this information to respond to your req"
+	},{ 
+		"MessageType": "SMS",
+		"Sender": "0565645455",
+		"Subject": "In order to respond to your ques",
+		"Time": "Wednesday, 01 April, 2009 6:11:33 pm",
+		"Priority": "Medium",
+		"Attachment": false,
+		"Unread": false,
+		"MessageId": 1048984,
+		"BodyText": "In order to respond to your questions or manage in"
+	},{ 
+		"MessageType": "SMS",
+		"Sender": "0231343243",
+		"Subject": "We consents to you browsing the ",
+		"Time": "Wednesday, 01 April, 2009 6:11:59 pm",
+		"Priority": "Medium",
+		"Attachment": false,
+		"Unread": true,
+		"MessageId": 1048985,
+		"BodyText": "We consents to you browsing the pages on your computer or printing copies of extracts from these pag"
+	},{
+		"MessageType": "SMS",
+		"Sender": "0545545454",
+		"Subject": "If you place an order for a prod",
+		"Time": "Wednesday, 01 April, 2009 6:11:59 pm",
+		"Priority": "Medium",
+		"Attachment": false,
+		"Unread": true,
+		"MessageId": 1048986,
+		"BodyText": "If you place an order for a product, request a service or submit content to this site, we may need t"
+	},{
+		"MessageType": "unknown",
+		"Sender": "Edith",
+		"Subject": "You will win the battle, GUARANT",
+		"Time": "Wednesday, 01 April, 2009 6:12:22 pm",
+		"Priority": "Medium",
+		"Attachment": false,
+		"Unread": true,
+		"MessageId": 1048987
+	},{
+		"MessageType": "unknown",
+		"Sender": "Edith",
+		"Subject": "You will win the battle, GUARANT",
+		"Time": "Wednesday, 01 April, 2009 6:12:23 pm",
+		"Priority": "Medium",
+		"Attachment": false,
+		"Unread": true,
+		"MessageId": 1048989
+	},{
+		"MessageType": "unknown",
+		"Sender": "+4443433434",
+		"Subject": "Join us at the OSGi 2003 World C",
+		"Time": "Wednesday, 01 April, 2009 6:14:10 pm",
+		"Priority": "Medium",
+		"Attachment": false,
+		"Unread": true,
+		"MessageId": 1049013
+	},{
+		"MessageType": "unknown",
+		"Sender": "0231343243",
+		"Subject": "Put your subject line here",
+		"Time": "Wednesday, 01 April, 2009 6:14:10 pm",
+		"Priority": "Medium",
+		"Attachment": false,
+		"Unread": true,
+		"MessageId": 1049014
+	},{
+		"MessageType": "MMS",
+		"Sender": "0455454454",
+		"Subject": "A very funny game",
+		"Time": "Wednesday, 01 April, 2009 6:16:01 pm",
+		"Priority": "Medium",
+		"Attachment": true,
+		"Unread": true,
+		"MessageId": 1049043,
+		"BodyText": ""
+	},{
+		"MessageType": "MMS",
+		"Sender": "0542303286",
+		"Subject": "Weedmon say: call, we be open 7 ",
+		"Time": "Wednesday, 01 April, 2009 6:16:03 pm",
+		"Priority": "Medium",
+		"Attachment": true,
+		"Unread": true,
+		"MessageId": 1049044,
+		"BodyText": ""
+	},{
+		"MessageType": "SMS",
+		"Sender": "+4465656565",
+		"Subject": "In addition, a link to a such si",
+		"Time": "Wednesday, 01 April, 2009 6:16:59 pm",
+		"Priority": "Medium",
+		"Attachment": false,
+		"Unread": false,
+		"MessageId": 1049045,
+		"BodyText": "In addition, a link to a such site does not imply that we endorses the site or the products or servi"
+	},{ 
+		"MessageType": "SMS",
+		"Sender": "0433032865",
+		"Subject": "The contents of these pages are ",
+		"Time": "Wednesday, 01 April, 2009 6:16:59 pm",
+		"Priority": "Medium",
+		"Attachment": false,
+		"Unread": false,
+		"MessageId": 1049046,
+		"BodyText": "The contents of these pages are copyrighted. Any rights not expressly granted herein are reserved. T"
+	},{ 
+		"MessageType": "SMS",
+		"Sender": "+4465655656",
+		"Subject": "We may use this information to r",
+		"Time": "Wednesday, 01 April, 2009 6:16:59 pm",
+		"Priority": "Medium",
+		"Attachment": false,
+		"Unread": false,
+		"MessageId": 1049047,
+		"BodyText": "We may use this information to respond to your requests, or to contact you via mail, e-mail or phone"
+	},{ 
+		"MessageType": "SMS",
+		"Sender": "+35876653456",
+		"Subject": "The use of press releases and ot",
+		"Time": "Wednesday, 01 April, 2009 6:16:59 pm",
+		"Priority": "Medium",
+		"Attachment": false,
+		"Unread": false,
+		"MessageId": 1049048,
+		"BodyText": "The use of press releases and other documents classified as public is permitted in public communicat"
+	},{
+		"MessageType": "SMS",
+		"Sender": "0530328732",
+		"Subject": "The use of press releases and ot",
+		"Time": "Wednesday, 01 April, 2009 6:17:00 pm",
+		"Priority": "Medium",
+		"Attachment": false,
+		"Unread": false,
+		"MessageId": 1049054,
+		"BodyText": "The use of press releases and other documents classified as public is permitted in public communicat"
+	}];
+
+    /**
+     * register data!
+     */
+    device.implementation.loadData('Service.Messaging', 'Inbox', data_messaging);
+
+})()
+	
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/preview/data/sensor_data.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,469 @@
+/**
+ * SAPI Sample Data - Sensor
+ */
+
+(function(){
+
+var property = {
+	"AccelerometerAxis":{
+		"Availability":{
+			"PropertyId":"Availability",
+			"PropertyDataType":0,
+			"ItemIndex":-1,
+			"ReadOnly":true,
+			"PropertyValue":1
+			},
+		"ChannelAccuracy":{
+			"PropertyId":"ChannelAccuracy",
+			"PropertyDataType":1,
+			"ItemIndex":-1,
+			"ReadOnly":true,
+			"PropertyValue":10
+			},
+		"ChannelDataFormat":
+		{
+			"PropertyId":"ChannelDataFormat",
+			"PropertyDataType":0,
+			"ItemIndex":-1,
+			"ReadOnly":true,
+			"PropertyValue":2
+		},
+		"ChannelScale":
+		{
+			"PropertyId":"ChannelScale",
+			"PropertyDataType":0,
+			"ItemIndex":-1,
+			"ReadOnly":true,
+			"PropertyValue":0
+		},
+		"ChannelUnit":
+		{
+			"PropertyId":"ChannelUnit",
+			"PropertyDataType":0,
+			"ItemIndex":-1,
+			"ReadOnly":true,
+			"PropertyValue":10
+		},
+		"ConnectionType":
+		{
+			"PropertyId":"ConnectionType",
+			"PropertyDataType":0,
+			"ItemIndex":-1,
+			"ReadOnly":true,
+			"PropertyValue":1
+		},
+		"DataRate":
+		{
+			"PropertyId":"DataRate",
+			"PropertyDataType":0,
+			"ItemIndex":-1,
+			"ReadOnly":true,
+			"PropertyValue":0
+		},
+		"Description":
+		{
+			"PropertyId":"Description",
+			"PropertyDataType":2,
+			"ItemIndex":-1,
+			"ReadOnly":true,
+			"PropertyValue":"Accelerometer"
+		},
+		"MeasureRange":
+		{
+			"PropertyId":"MeasureRange",
+			"PropertyDataType":1,
+			"ItemIndex":-1,
+			"ReadOnly":true,
+			"PropertyValue":0
+		},
+		"ScaledRange":
+		{
+			"PropertyId":"ScaledRange",
+			"PropertyDataType":0,
+			"ItemIndex":-1,
+			"ReadOnly":true,
+			"PropertyValue":8
+		}
+	},
+	"AccelerometerDoubleTapping":
+	{
+		"Availability":
+		{
+			"PropertyId":"Availability",
+			"PropertyDataType":0,
+			"ItemIndex":-1,
+			"ReadOnly":true,
+			"PropertyValue":1
+		},
+		"ChannelAccuracy":
+		{
+			"PropertyId":"ChannelAccuracy",
+			"PropertyDataType":1,
+			"ItemIndex":-1,
+			"ReadOnly":true,
+			"PropertyValue":10
+		},
+		"ChannelDataFormat":
+		{
+			"PropertyId":"ChannelDataFormat",
+			"PropertyDataType":0,
+			"ItemIndex":-1,
+			"ReadOnly":true,
+			"PropertyValue":2
+		},
+		"ChannelScale":
+		{
+			"PropertyId":"ChannelScale",
+			"PropertyDataType":0,
+			"ItemIndex":-1,
+			"ReadOnly":true,
+			"PropertyValue":0
+		},
+		"ChannelUnit":
+		{
+			"PropertyId":"ChannelUnit",
+			"PropertyDataType":0,
+			"ItemIndex":-1,
+			"ReadOnly":true,
+			"PropertyValue":10
+		},
+		"ConnectionType":
+		{
+			"PropertyId":"ConnectionType",
+			"PropertyDataType":0,
+			"ItemIndex":-1,
+			"ReadOnly":true,
+			"PropertyValue":1
+		},
+		"Description":
+		{
+			"PropertyId":"Description",
+			"PropertyDataType":2,
+			"ItemIndex":-1,
+			"ReadOnly":true,
+			"PropertyValue":"Accelerometer"
+		},
+		"MeasureRange":
+		{
+			"PropertyId":"MeasureRange",
+			"PropertyDataType":1,
+			"ItemIndex":-1,
+			"ReadOnly":true,
+			"PropertyValue":0
+		},
+		"ScaledRange":
+		{
+			"PropertyId":"ScaledRange",
+			"PropertyDataType":0,
+			"ItemIndex":-1,
+			"ReadOnly":true,
+			"PropertyValue":8
+		}
+	},
+	"Orientation":
+	{
+		"Availability":
+		{
+			"PropertyId":"Availability",
+			"PropertyDataType":0,
+			"ItemIndex":-1,
+			"ReadOnly":true,
+			"PropertyValue":1
+		},
+		"DataRate":
+		{
+			"PropertyId":"DataRate",
+			"PropertyDataType":0,
+			"ItemIndex":-1,
+			"ReadOnly":true,
+			"PropertyValue":0
+		},
+		"MeasureRange":
+		{
+			"PropertyId":"MeasureRange",
+			"PropertyDataType":0,
+			"ItemIndex":-1,
+			"ReadOnly":true,
+			"PropertyValue":0
+		}
+	},
+	"Rotation":
+	{
+		"Availability":
+		{
+			"PropertyId":"Availability",
+			"PropertyDataType":0,
+			"ItemIndex":-1,
+			"ReadOnly":true,
+			"PropertyValue":1
+		},
+		"ChannelAccuracy":
+		{
+			"PropertyId":"ChannelAccuracy",
+			"PropertyDataType":1,
+			"ItemIndex":-1,
+			"ReadOnly":true,
+			"PropertyValue":0.041666666666666664
+		},
+		"DataRate":
+		{
+			"PropertyId":"DataRate",
+			"PropertyDataType":0,
+			"ItemIndex":-1,
+			"ReadOnly":true,
+			"PropertyValue":0
+		},
+		"MeasureRange":
+		{
+			"PropertyId":"MeasureRange",
+			"PropertyDataType":1,
+			"ItemIndex":-1,
+			"ReadOnly":true,
+			"PropertyValue":359
+		}
+	}
+};
+var data_all =[{
+		"ChannelId":7,
+		"ContextType":2,
+		"Quantity":10,
+		"ChannelType":270553214,
+		"Location":"NoLoc",
+		"VendorId":"Nokia",
+		"DataItemSize":24,
+		"ChannelDataTypeId":270553214
+		},
+		{
+		"ChannelId":8,
+		"ContextType":2,
+		"Quantity":11,
+		"ChannelType":270553217,
+		"Location":"NoLoc",
+		"VendorId":"Nokia",
+		"DataItemSize":16,
+		"ChannelDataTypeId":270553215
+		},
+		{
+		"ChannelId":10,
+		"ContextType":3,
+		"Quantity":12,
+		"ChannelType":270553224,
+		"Location":"NoLoc",
+		"VendorId":"Nokia",
+		"DataItemSize":16,
+		"ChannelDataTypeId":270553224
+		},
+		{
+		"ChannelId":11,
+		"ContextType":3,
+		"Quantity":13,
+		"ChannelType":270553225,
+		"Location":"NoLoc",
+		"VendorId":"Nokia",
+		"DataItemSize":24,
+		"ChannelDataTypeId":270553225
+		}];
+		
+var data_accelerometerAxis = [{
+		"ChannelId":7,
+		"ContextType":2,
+		"Quantity":10,
+		"ChannelType":270553214,
+		"Location":"NoLoc",
+		"VendorId":"Nokia",
+		"DataItemSize":24,
+		"ChannelDataTypeId":270553214
+		}];
+		
+var data_accelerometerDoubleTapping = [{
+		"ChannelId":8,
+		"ContextType":2,
+		"Quantity":11,
+		"ChannelType":270553217,
+		"Location":"NoLoc",
+		"VendorId":"Nokia",
+		"DataItemSize":16,
+		"ChannelDataTypeId":270553215
+		}];
+		
+var data_orientation = [{
+		"ChannelId":10,
+		"ContextType":3,
+		"Quantity":12,
+		"ChannelType":270553224,
+		"Location":"NoLoc",
+		"VendorId":"Nokia",
+		"DataItemSize":16,
+		"ChannelDataTypeId":270553224
+		}];
+		
+var data_rotation = [{
+		"ChannelId":11,
+		"ContextType":3,
+		"Quantity":13,
+		"ChannelType":270553225,
+		"Location":"NoLoc",
+		"VendorId":"Nokia",
+		"DataItemSize":24,
+		"ChannelDataTypeId":270553225
+		}];
+
+
+var dataRet_accelerometerAxis = [{
+		"DataType":"AxisData",
+		"TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+		"XAxisData":30,
+		"YAxisData":30,
+		"ZAxisData":30
+		},{
+		"DataType":"AxisData",
+		"TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+		"XAxisData":35,
+		"YAxisData":30,
+		"ZAxisData":30
+		},{
+		"DataType":"AxisData",
+		"TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+		"XAxisData":30,
+		"YAxisData":35,
+		"ZAxisData":30
+		},{
+		"DataType":"AxisData",
+		"TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+		"XAxisData":30,
+		"YAxisData":30,
+		"ZAxisData":35
+		},{
+		"DataType":"AxisData",
+		"TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+		"XAxisData":40,
+		"YAxisData":30,
+		"ZAxisData":30
+		},{
+		"DataType":"AxisData",
+		"TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+		"XAxisData":30,
+		"YAxisData":40,
+		"ZAxisData":30
+		}];
+		
+var dataRet_accelerometerDoubleTapping = [{
+		"DataType":"DoubleTappingData",
+		"TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",		
+		"DeviceDirection":30
+		},{
+		"DataType":"DoubleTappingData",
+		"TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",		
+		"DeviceDirection":40
+		},{
+		"DataType":"DoubleTappingData",
+		"TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",		
+		"DeviceDirection":50
+		},{
+		"DataType":"DoubleTappingData",
+		"TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",		
+		"DeviceDirection":60
+		},{
+		"DataType":"DoubleTappingData",
+		"TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",		
+		"DeviceDirection":70
+		},{
+		"DataType":"DoubleTappingData",
+		"TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",		
+		"DeviceDirection":80
+		},{
+		"DataType":"DoubleTappingData",
+		"TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",		
+		"DeviceDirection":90
+		}];
+		
+var dataRet_orientation = [{
+		"DataType":"OrientationData",
+		"TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+		"DeviceOrientation":"DisplayUp"		
+		},{
+		"DataType":"OrientationData",
+		"TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+		"DeviceOrientation":"DisplayDown"		
+		},{
+		"DataType":"OrientationData",
+		"TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+		"DeviceOrientation":"DisplayLeftUp"		
+		},{
+		"DataType":"OrientationData",
+		"TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+		"DeviceOrientation":"DisplayRightUp"		
+		},{
+		"DataType":"OrientationData",
+		"TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+		"DeviceOrientation":"DisplayUpwards"		
+		},{
+		"DataType":"OrientationData",
+		"TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+		"DeviceOrientation":"DisplayDownwards"		
+		},{
+		"DataType":"OrientationData",
+		"TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+		"DeviceOrientation":"Undefined"		
+		}];
+		
+var dataRet_rotation = [{
+		"DataType":"RotationData",
+		"TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+		"XRotation":30,
+		"YRotation":35,
+		"ZRotation":30
+		},{
+		"DataType":"RotationData",
+		"TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+		"XRotation":35,
+		"YRotation":30,
+		"ZRotation":30
+		},{
+		"DataType":"RotationData",
+		"TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+		"XRotation":30,
+		"YRotation":30,
+		"ZRotation":35
+		},{
+		"DataType":"RotationData",
+		"TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+		"XRotation":40,
+		"YRotation":30,
+		"ZRotation":30
+		},{
+		"DataType":"RotationData",
+		"TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+		"XRotation":30,
+		"YRotation":40,
+		"ZRotation":30
+		},{
+		"DataType":"RotationData",
+		"TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+		"XRotation":30,
+		"YRotation":30,
+		"ZRotation":40
+		},{
+		"DataType":"RotationData",
+		"TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+		"XRotation":50,
+		"YRotation":50,
+		"ZRotation":50
+		}];
+
+    /**
+     * register data!
+     */
+	device.implementation.loadData('Service.Sensor','SensorProperty',property);
+    device.implementation.loadData('Service.Sensor', 'All', data_all);
+    device.implementation.loadData('Service.Sensor', 'AccelerometerAxis', data_accelerometerAxis);
+    device.implementation.loadData('Service.Sensor', 'AccelerometerDoubleTapping', data_accelerometerDoubleTapping);
+    device.implementation.loadData('Service.Sensor', 'Orientation', data_orientation);
+    device.implementation.loadData('Service.Sensor', 'Rotation', data_rotation);
+/*    device.implementation.loadData('Service.Sensor', 'AccelerometerAxisRet', dataRet_accelerometerAxis);
+    device.implementation.loadData('Service.Sensor', 'AccelerometerDoubleTappingRet', dataRet_accelerometerDoubleTapping);
+    device.implementation.loadData('Service.Sensor', 'OrientationRet', dataRet_orientation);
+    device.implementation.loadData('Service.Sensor', 'RotationRet', dataRet_rotation);*/
+
+})()
+	
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/preview/data/sysInfo_data.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,345 @@
+/**
+ * SAPI Sample Data - SysInfo
+ */
+
+
+(function(){  
+
+var data_5800 = {
+			"battery":{
+				"batterystrength":{
+					"Status":85,
+					"Entity":"Battery",
+					"Key":"BatteryStrength"
+					},
+				"chargingstatus":{
+					"Status":0,
+					"Entity":"Battery",
+					"Key":"ChargingStatus"
+					}
+			},
+			"connectivity":{
+				"bluetooth":{
+					"Status":1,
+					"Entity":"Connectivity",
+					"Key":"BlueTooth"
+					},
+				"infrared":{
+					"Status":-1,
+					"Entity":"Connectivity",
+					"Key":"InfraRed"
+					},
+				"activeconnections":{
+					"ConnectionList":[{
+								"IAPID":5,
+								"IAPName":"Browser",
+								"IAPConnectionName":"",
+								"NetworkName":"Browser",
+								"ConnectionType":7,
+								"ConnectionStatus":1
+								},{
+								"IAPID":1,
+								"IAPName":"airtelgprs.com",
+								"IAPConnectionName":"Mobile Office",
+								"NetworkName":"GPRS",
+								"ConnectionType":6,
+								"ConnectionStatus":1
+								}],
+					"Entity":"Connectivity",
+					"Key":"ActiveConnections"
+				},					
+				"wlanmacaddress":{
+					"StringData":"00:21:fe:97:c5:27",
+					"Entity":"Connectivity",
+					"Key":"WLanMacAddress"
+					}
+			},
+			"device":{
+				"firmwareversion":{
+					"StringData":"V 20.0.012 RnD\n04-03-09\nRM-356\n(c)NMP",
+					"Entity":"Device",
+					"Key":"FirmwareVersion"},
+				"platformversion":{
+					"MajorVersion":"5",
+					"MinorVersion":"0",
+					"Entity":"Device",
+					"Key":"PlatformVersion"
+					},
+				"producttype":{
+					"StringData":"RM-356",
+					"Entity":"Device",
+					"Key":"ProductType"
+					},
+				"manufacturer":{
+					"StringData":"Nokia",
+					"Entity":"Device",
+					"Key":"Manufacturer"
+					},
+				"machineid":{
+					"Status":536926806,
+					"Entity":"Device",
+					"Key":"MachineId"
+					},
+				"phonemodel":{
+					"StringData":"5800 XpressMusic",
+					"Entity":"Device",
+					"Key":"PhoneModel"
+					},
+				"imei":{
+					"StringData":"004401102480155",
+					"Entity":"Device",
+					"Key":"IMEI"
+					}
+			},
+			"display":{
+				"brightness":{
+					"Status":50,
+					"Entity":"Display",
+					"Key":"Brightness"
+					},
+				"screensavertimeout":{
+					"Status":15,
+					"Entity":"Display",
+					"Key":"ScreenSaverTimeout"
+					},
+				"keyguardtime":{
+					"Status":60,
+					"Entity":"Display",
+					"Key":"KeyGuardTime"
+					},
+				"keyguardtime":{
+					"Status":60,
+					"Entity":"Display",
+					"Key":"KeyGuardTime"
+					},
+				"autolocktime":{
+					"Status":0,
+					"Entity":"Display",
+					"Key":"AutoLockTime"
+					},
+				"autolockstatus":{
+					"Status":0,
+					"Entity":"Display",
+					"Key":"AutoLockStatus"
+					},
+				"lighttimeout":{
+					"Status":45,
+					"Entity":"Display",
+					"Key":"LightTimeout"
+					},
+				"displayresolution":{
+					"XPixels":640,
+					"YPixels":360,
+					"Entity":"Display",
+					"Key":"DisplayResolution"
+					},
+				"displayorientation":{
+					"Status":3,
+					"Entity":"Display",
+					"Key":"DisplayOrientation"
+					},
+				"wallpaper":{
+					"StringData":"C://Data//Others//wallpaper.jpeg",
+					"Entity":"Display",
+					"Key":"Wallpaper"
+					}
+				
+			},
+			"features":{
+				"bluetooth":{
+					"Status":1,
+					"Entity":"Features",
+					"Key":"BlueTooth"
+					},
+				"infrared":{
+					"Status":0,
+					"Entity":"Features",
+					"Key":"InfraRed"
+					},
+				"camera":{
+					"Status":1,
+					"Entity":"Features",
+					"Key":"CAMERA"
+					},
+				"memorycard":{
+					"Status":1,
+					"Entity":"Features",
+					"Key":"MemoryCard"
+					},
+				"fmradio":{
+					"Status":1,
+					"Entity":"Features",
+					"Key":"FMRADIO"
+					},
+				"qwerty":{
+					"Status":1,
+					"Entity":"Features",
+					"Key":"QWERTY"
+					},
+				"wlan":{
+					"Status":1,
+					"Entity":"Features",
+					"Key":"WLAN"
+					},
+				"usb":{
+					"Status":1,
+					"Entity":"Features",
+					"Key":"USB"
+					},
+				"pen":{
+					"Status":1,
+					"Entity":"Features",
+					"Key":"Pen"
+					},
+				"led":{
+					"Status":0,
+					"Entity":"Features",
+					"Key":"LED"
+					},
+				"coverui":{
+					"Status":0,
+					"Entity":"Features",
+					"Key":"CoverUI"
+					},
+				"sidevolumekeys":{
+					"Status":1,
+					"Entity":"Features",
+					"Key":"SideVolumeKeys"
+					},
+				"vibra":{
+					"Status":1,
+					"Entity":"Features",
+					"Key":"Vibra"
+					}
+			},
+			"general":{
+				"connectedaccessories":{
+					"AccessoryList":[{"AccessoryType":0,"AccessoryState":1}],
+					"Entity":"General",
+					"Key":"ConnectedAccessories"
+					},
+				"accessorystatus":{
+					"AccessoryInfo":{"AccessoryType":0,"AccessoryState":0},
+					"Entity":"General",
+					"Key":"AccessoryStatus"
+					},
+				"inputlanguage":{
+					"Status":1,
+					"Entity":"General",
+					"Key":"InputLanguage"
+					},
+				"supportedlanguages":{
+					"LanguageList":[1,2,3,5,13,4],
+					"Entity":"General",
+					"Key":"SupportedLanguages"
+					},
+				"predictivetext":{
+					"Status":0,
+					"Entity":"General",
+					"Key":"PredictiveText"
+					},
+				"vibraactive":{
+					"Status":1,
+					"Entity":"General",
+					"Key":"VibraActive"
+					},
+				"availableusbmodes":{
+					"StringList":["PC Suite","Mass storage","Image transfer","Media transfer"],
+					"Entity":"General",
+					"Key":"AvailableUSBModes"
+					},
+				"activeusbmode":{
+					"StringData":"Mass storage",
+					"Entity":"General",
+					"Key":"ActiveUSBMode"
+					},
+				"flipstatus":{
+					"Status":-1,
+					"Entity":"General",
+					"Key":"FlipStatus"
+					},
+				"gripstatus":{
+					"Status":1,
+					"Entity":"General",
+					"Key":"GripStatus"
+					}
+			},
+			"memory":{
+				"listdrives":{
+					"DriveList":["C:\\","D:\\","E:\\","Z:\\"],
+					"Entity":"Memory",
+					"Key":"ListDrives"
+					},
+				"memorycard":{
+					"Status":1,
+					"Entity":"Memory",
+					"Key":"MemoryCard"
+					},
+				"driveinfo":{
+					"Drive": {
+							"C:\\": {
+								"Drive": "C:\\",
+								"CriticalSpace": 131072,
+								"MediaType": 9,
+								"TotalSpace": 90210304,
+								"FreeSpace": 79319040,
+								"DriveName": "",
+								"BatterState": 0
+								},
+							"D:\\": {
+								"Drive": "D:\\",
+								"CriticalSpace": 2700000,
+								"MediaType": 5,
+								"TotalSpace": 52469760,
+								"FreeSpace": 52457472,
+								"DriveName": "",
+								"BatterState": 0
+								},
+							"Z:\\": {
+								"Drive": "Z:\\",
+								"CriticalSpace": 131072,
+								"MediaType": 7,
+								"TotalSpace": 0,
+								"FreeSpace": 0,
+								"DriveName": "RomDrive",
+								"BatterState": 0
+								}
+							},
+					"Entity":"Memory",
+					"Key":"DriveInfo"
+					}
+			},
+			"network":{
+				"registrationstatus":{
+					"Status":4,
+					"Entity":"Network",
+					"Key":"RegistrationStatus"
+					},
+				"networkmode":{
+					"Status":0,
+					"Entity":"Network",
+					"Key":"NetworkMode"
+					},
+				"signalstrength":{
+					"Status":61,
+					"Entity":"Network",
+					"Key":"SignalStrength"
+					},
+				"currentnetwork":{
+					"NetworkName":"Airtel",
+					"NetworkStatus":1,
+					"NetworkMode":1,
+					"CountryCode":"404",
+					"NetworkCode":"45",
+					"LocationStatus":false,
+					"Entity":"Network",
+					"Key":"CurrentNetwork"
+					}
+			}
+	}; 
+	/**
+	 * register data!
+	 */
+	device.implementation.loadData('Service.SysInfo', '', data_5800);
+
+})()
Binary file Wikipedia/preview/images/BrowserNotificationBar-Toogle.gif has changed
Binary file Wikipedia/preview/images/Gradient0Background.png has changed
Binary file Wikipedia/preview/images/IconArea-hover.png has changed
Binary file Wikipedia/preview/images/TransperantImage.png has changed
Binary file Wikipedia/preview/images/active-orientation-icon.png has changed
Binary file Wikipedia/preview/images/battery-icon.png has changed
Binary file Wikipedia/preview/images/console-clear-button.png has changed
Binary file Wikipedia/preview/images/console-close-icon.png has changed
Binary file Wikipedia/preview/images/console-icon.gif has changed
Binary file Wikipedia/preview/images/console-open-icon.png has changed
Binary file Wikipedia/preview/images/default-Icon.png has changed
Binary file Wikipedia/preview/images/device/240x320/Landscape.png has changed
Binary file Wikipedia/preview/images/device/240x320/Portrait.png has changed
Binary file Wikipedia/preview/images/device/320x240/Landscape.png has changed
Binary file Wikipedia/preview/images/device/320x240/Portrait.png has changed
Binary file Wikipedia/preview/images/device/360x640/Landscape.png has changed
Binary file Wikipedia/preview/images/device/360x640/Portrait.png has changed
Binary file Wikipedia/preview/images/device/360x640/hs-landscape.png has changed
Binary file Wikipedia/preview/images/device/360x640/hs-portrait.png has changed
Binary file Wikipedia/preview/images/device/800x352/Landscape.png has changed
Binary file Wikipedia/preview/images/device/MenuItem-keys-Bg2.png has changed
Binary file Wikipedia/preview/images/device/menuKeys-bg.png has changed
Binary file Wikipedia/preview/images/errorIcon.png has changed
Binary file Wikipedia/preview/images/gradient-bg.png has changed
Binary file Wikipedia/preview/images/hs-iframeMask.png has changed
Binary file Wikipedia/preview/images/infoIcon.png has changed
Binary file Wikipedia/preview/images/memory-icon.png has changed
Binary file Wikipedia/preview/images/messaging-icon.png has changed
Binary file Wikipedia/preview/images/normal-orientation-icon.png has changed
Binary file Wikipedia/preview/images/settings-icon.png has changed
Binary file Wikipedia/preview/images/statusBar_240x320.png has changed
Binary file Wikipedia/preview/images/statusBar_320x240.png has changed
Binary file Wikipedia/preview/images/statusBar_360x640.png has changed
Binary file Wikipedia/preview/images/statusBar_640x360.png has changed
Binary file Wikipedia/preview/images/statusBar_800x352.png has changed
Binary file Wikipedia/preview/images/sub-menu-arrow.png has changed
Binary file Wikipedia/preview/images/th-bg-gradient.png has changed
Binary file Wikipedia/preview/images/warningIcon.png has changed
Binary file Wikipedia/preview/images/wrt-help-icon.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/preview/nopreview.html	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,44 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<style type="text/css">
+body {
+	background-image: url(images/Gradient0Background.png);
+	background-repeat: repeat-x;
+	font-family: "Nokia Sans", "Nokia Sans SemiBold", "Arial Narrow";
+	overflow: hidden;
+	color: #FFFFFF;
+}
+div {
+	text-align: center;
+	padding: 20px;
+	margin-top: 50px;
+	margin-right: auto;
+	margin-left: auto;
+	width: 500px;
+	font-size: x-large;
+	font-weight: normal;
+	background-color: #CC3300;
+	border-top-width: 2px;
+	border-right-width: 2px;
+	border-bottom-width: 2px;
+	border-left-width: 2px;
+	border-top-style: solid;
+	border-right-style: solid;
+	border-bottom-style: solid;
+	border-left-style: solid;
+	border-top-color: #FF3300;
+	border-right-color: #710000;
+	border-bottom-color: #710000;
+	border-left-color: #FF3300;
+}
+strong {
+	color: #FFCC00;
+}
+</style>
+</head>
+<body>
+<div> Widget preview is not available for this file, it is not the <strong>MainHtml</strong> file for the widget.
+</div>
+</body>
+</html>
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/000000_40x100_textures_05_inset_soft_25.png has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/0078a3_40x100_textures_02_glass_40.png has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/222222_11x11_icon_arrows_leftright.gif has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/222222_11x11_icon_arrows_updown.gif has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/222222_11x11_icon_close.gif has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/222222_11x11_icon_doc.gif has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/222222_11x11_icon_folder_closed.gif has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/222222_11x11_icon_folder_open.gif has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/222222_11x11_icon_minus.gif has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/222222_11x11_icon_plus.gif has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/222222_7x7_arrow_down.gif has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/222222_7x7_arrow_left.gif has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/222222_7x7_arrow_right.gif has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/222222_7x7_arrow_up.gif has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/555555_40x100_textures_02_glass_20.png has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/cccccc_11x11_icon_arrows_leftright.gif has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/cccccc_11x11_icon_arrows_updown.gif has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/cccccc_11x11_icon_close.gif has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/cccccc_11x11_icon_doc.gif has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/cccccc_11x11_icon_folder_closed.gif has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/cccccc_11x11_icon_folder_open.gif has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/cccccc_11x11_icon_minus.gif has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/cccccc_11x11_icon_plus.gif has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/cccccc_11x11_icon_resize_se.gif has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/cccccc_7x7_arrow_down.gif has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/cccccc_7x7_arrow_left.gif has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/cccccc_7x7_arrow_right.gif has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/cccccc_7x7_arrow_up.gif has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/f58400_40x100_textures_05_inset_soft_30.png has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/ffffff_11x11_icon_arrows_leftright.gif has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/ffffff_11x11_icon_arrows_updown.gif has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/ffffff_11x11_icon_close.gif has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/ffffff_11x11_icon_doc.gif has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/ffffff_11x11_icon_folder_closed.gif has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/ffffff_11x11_icon_folder_open.gif has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/ffffff_11x11_icon_minus.gif has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/ffffff_11x11_icon_plus.gif has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/ffffff_7x7_arrow_down.gif has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/ffffff_7x7_arrow_left.gif has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/ffffff_7x7_arrow_right.gif has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/ffffff_7x7_arrow_up.gif has changed
Binary file Wikipedia/preview/script/jquery-ui/css/ui-darkness/images/slider-handle.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/preview/script/jquery-ui/css/ui-darkness/ui.all.css	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,630 @@
+/*
+ * jQuery UI screen structure and presentation
+ * This CSS file was generated by ThemeRoller, a Filament Group Project for jQuery UI
+ * Author: Scott Jehl, scott@filamentgroup.com, http://www.filamentgroup.com
+ * Visit ThemeRoller.com
+*/
+
+/*
+ * Note: If your ThemeRoller settings have a font size set in ems, your components will scale according to their parent element's font size.
+ * As a rule of thumb, set your body's font size to 62.5% to make 1em = 10px.
+ * body {font-size: 62.5%;}
+*/
+
+
+
+/*UI accordion*/
+.ui-accordion {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	font-family: Segoe UI, Arial, sans-serif;
+	font-size: 0.8em;
+	border-bottom: 1px solid #666666;
+}
+.ui-accordion-group {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	border: 1px solid #666666;
+	border-bottom: none;
+}
+.ui-accordion-header {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	cursor: pointer;
+	background: #555555 url(images/555555_40x100_textures_02_glass_20.png) 0 50% repeat-x;
+}
+.ui-accordion-header a {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	display: block;
+	font-size: 0.8em;
+	font-weight: bold;
+	text-decoration: none;
+	padding: .5em .5em .5em 1.7em;
+	color: #eeeeee;
+	background: url(images/cccccc_7x7_arrow_right.gif) .5em 50% no-repeat;
+}
+.ui-accordion-header a:hover {
+	background: url(images/ffffff_7x7_arrow_right.gif) .5em 50% no-repeat;
+	color: #ffffff;
+}
+.ui-accordion-header:hover {
+	background: #0078a3 url(images/0078a3_40x100_textures_02_glass_40.png) 0 50% repeat-x;
+	color: #ffffff;
+}
+.selected .ui-accordion-header, .selected .ui-accordion-header:hover {
+	background: #f58400 url(images/f58400_40x100_textures_05_inset_soft_30.png) 0 50% repeat-x;
+}
+.selected .ui-accordion-header a, .selected .ui-accordion-header a:hover {
+	color: #ffffff;
+	background: url(images/222222_7x7_arrow_down.gif) .5em 50% no-repeat;
+}
+.ui-accordion-content {
+	background: #000000 url(images/000000_40x100_textures_05_inset_soft_25.png) 0 bottom repeat-x;
+	color: #ffffff;
+	font-size: 0.8em;
+}
+.ui-accordion-content p {
+	padding: 0.8em 1.7em 0.6em;
+}
+
+
+
+
+
+
+/*UI tabs*/
+.ui-tabs-nav {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	font-family: Segoe UI, Arial, sans-serif;
+	font-size: 1.0.8em;
+/*
+	float: left;
+
+*/	position: relative;
+	z-index: 1;
+/*
+	border-right: 1px solid #666666;
+*/
+	bottom: -1px;
+}
+.ui-tabs-nav ul {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+}
+.ui-tabs-nav li {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	float: left;
+	border: 1px solid #666666;
+	border-right: none;
+}
+.ui-tabs-nav li a {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	float: left;
+	font-size: 0.8em;
+	font-weight: bold;
+	text-decoration: none;
+	padding: .5em 1.7em;
+	color: #eeeeee;
+	background: #555555 url(images/555555_40x100_textures_02_glass_20.png) 0 50% repeat-x;
+}
+.ui-tabs-nav li a:hover {
+	background: #0078a3 url(images/0078a3_40x100_textures_02_glass_40.png) 0 50% repeat-x;
+	color: #ffffff;
+}
+.ui-tabs-nav li.ui-tabs-selected {
+	border-bottom-color: #f58400;
+}
+.ui-tabs-nav li.ui-tabs-selected a, .ui-tabs-nav li.ui-tabs-selected a:hover {
+	background: #f58400 url(images/f58400_40x100_textures_05_inset_soft_30.png) 0 50% repeat-x;
+	color: #ffffff;
+}
+.ui-tabs-panel {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	font-family: Segoe UI, Arial, sans-serif;
+	clear:left;
+	border-top: 1px solid #666666;
+/*
+	background: #000000 url(images/000000_40x100_textures_05_inset_soft_25.png) 0 bottom repeat-x;
+
+*/	color: #ffffff;
+	padding: 15px;	
+	font-size: 1.0.8em;
+}
+.ui-tabs-hide {
+	display: none;/* for accessible hiding: position: absolute; left: -99999999px*/;
+}
+
+
+
+
+
+/*slider*/
+.ui-slider {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	font-family: Segoe UI, Arial, sans-serif;
+	font-size: 1.0.8em;
+	background: #000000 url(images/000000_40x100_textures_05_inset_soft_25.png) 0 bottom repeat-x;
+	border: 1px solid #666666;
+	height: .8em;
+	position: relative;
+}
+.ui-slider-handle {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	position: absolute;
+	z-index: 2;
+	top: -7px;
+/*	width: 1.2em;
+	height: 1.2em;
+	background: #555555 url(images/555555_40x100_textures_02_glass_20.png) 0 50% repeat-x;
+	border: 1px solid #666666;
+*/
+	background-image: url(images/slider-handle.png);
+	background-repeat: no-repeat;
+	background-position: 0px 0px;
+	height: 19px;
+	width: 17px;
+}
+.ui-slider-handle:hover {
+	background-position: 0px -19px;
+}
+.ui-slider-handle-active, .ui-slider-handle-active:hover {
+	background-position: 0px -38px;
+}
+.ui-slider-range {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	height: .8em;
+	background: #0078a3 url(images/0078a3_40x100_textures_02_glass_40.png) 0 50% repeat-x;
+	position: absolute;
+	border: 1px solid #666666;
+	border-left: 0;
+	border-right: 0;
+	top: -1px;
+	z-index: 1;
+	opacity:.7;
+/*
+	filter:Alpha(Opacity=70);
+
+*/}
+
+
+
+
+
+
+/*dialog*/
+.ui-dialog {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	font-family: Segoe UI, Arial, sans-serif;
+	font-size: 0.9em;
+	background: #000000 url(images/000000_40x100_textures_05_inset_soft_25.png) 0 bottom repeat-x;
+	color: #ffffff;
+	border: 4px solid #666666;
+	position: relative;
+}
+.ui-resizable-handle {
+	position: absolute;
+	font-size: 0.1px;
+	z-index: 99999;
+}
+.ui-resizable .ui-resizable-handle {
+	display: block; 
+}
+body .ui-resizable-disabled .ui-resizable-handle { display: none; } /* use 'body' to make it more specific (css order) */
+body .ui-resizable-autohide .ui-resizable-handle { display: none; } /* use 'body' to make it more specific (css order) */
+.ui-resizable-n { 
+	cursor: n-resize; 
+	height: 7px; 
+	width: 100%; 
+	top: -5px; 
+	left: 0px;  
+}
+.ui-resizable-s { 
+	cursor: s-resize; 
+	height: 7px; 
+	width: 100%; 
+	bottom: -5px; 
+	left: 0px; 
+}
+.ui-resizable-e { 
+	cursor: e-resize; 
+	width: 7px; 
+	right: -5px; 
+	top: 0px; 
+	height: 100%; 
+}
+.ui-resizable-w { 
+	cursor: w-resize; 
+	width: 7px; 
+	left: -5px; 
+	top: 0px; 
+	height: 100%;
+}
+.ui-resizable-se { 
+	cursor: se-resize; 
+	width: 13px; 
+	height: 13px; 
+	right: 0px; 
+	bottom: 0px; 
+	background: url(images/cccccc_11x11_icon_resize_se.gif) no-repeat 0 0;
+}
+.ui-resizable-sw { 
+	cursor: sw-resize; 
+	width: 9px; 
+	height: 9px; 
+	left: 0px; 
+	bottom: 0px;  
+}
+.ui-resizable-nw { 
+	cursor: nw-resize; 
+	width: 9px; 
+	height: 9px; 
+	left: 0px; 
+	top: 0px; 
+}
+.ui-resizable-ne { 
+	cursor: ne-resize; 
+	width: 9px; 
+	height: 9px; 
+	right: 0px; 
+	top: 0px; 
+}
+.ui-dialog-titlebar {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	padding: .5em 1.5em .5em 0.8em;
+	color: #eeeeee;
+	background: #555555 url(images/555555_40x100_textures_02_glass_20.png) 0 50% repeat-x;
+	border-bottom: 1px solid #666666;
+	font-size: 0.8em;
+	font-weight: bold;
+	position: relative;
+}
+.ui-dialog-title {}
+.ui-dialog-titlebar-close {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	background: url(images/cccccc_11x11_icon_close.gif) 0 0 no-repeat;
+	position: absolute;
+	right: 8px;
+	top: .7em;
+	width: 11px;
+	height: 11px;
+	z-index: 100;
+	cursor: pointer !important;
+}
+.ui-dialog-titlebar-close-hover, .ui-dialog-titlebar-close:hover {
+	background: url(images/ffffff_11x11_icon_close.gif) 0 0 no-repeat;
+}
+.ui-dialog-titlebar-close:active {
+	background: url(images/222222_11x11_icon_close.gif) 0 0 no-repeat;
+}
+.ui-dialog-titlebar-close span {
+	display: none;
+}
+.ui-dialog-content {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	color: #ffffff;
+/*
+	padding: 1.5em 1.7em;	
+*/
+	padding-left: 1px;
+}
+.ui-dialog-buttonpane {
+	position: absolute;
+	bottom: 0;
+	width: 100%;
+	text-align: left;
+	border-top: 1px solid #666666;
+	background: #000000;
+}
+.ui-dialog-buttonpane button {
+	margin: .5em 8px .5em 0;
+	color: #eeeeee;
+	background: #555555 url(images/555555_40x100_textures_02_glass_20.png) 0 50% repeat-x;
+	font-size: 0.8em;
+	font-weight: bolder;
+	border: 1px solid #666666;
+	cursor: pointer;
+	padding: .2em .6em .3em .6em;
+	line-height: 1.4em;
+	float: right;
+}
+.ui-dialog-buttonpane button:hover {
+	color: #ffffff;
+	background: #0078a3 url(images/0078a3_40x100_textures_02_glass_40.png) 0 50% repeat-x;
+	border: 1px solid #4bd94b;
+}
+.ui-dialog-buttonpane button:active {
+	color: #ffffff;
+	background: #f58400 url(images/f58400_40x100_textures_05_inset_soft_30.png) 0 50% repeat-x;
+	border: 1px solid #ffaf0f;
+}
+/* This file skins dialog */
+.ui-dialog.ui-draggable .ui-dialog-titlebar,
+.ui-dialog.ui-draggable .ui-dialog-titlebar {
+	cursor: move;
+}
+
+
+
+
+
+
+
+/*datepicker*/
+/* Main Style Sheet for jQuery UI date picker */
+.ui-datepicker-div, .ui-datepicker-inline, #ui-datepicker-div {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	font-family: Segoe UI, Arial, sans-serif;
+	background: #000000 url(images/000000_40x100_textures_05_inset_soft_25.png) 0 bottom repeat-x;
+	font-size: 1.0.8em;
+	border: 4px solid #666666;
+	width: 15.5em;
+	padding: 2.5em .5em .5em .5em;
+	position: relative;
+}
+.ui-datepicker-div, #ui-datepicker-div {
+	z-index: 9999; /*must have*/
+	display: none;
+}
+.ui-datepicker-inline {
+	float: left;
+	display: block;
+}
+.ui-datepicker-control {
+	display: none;
+}
+.ui-datepicker-current {
+	display: none;
+}
+.ui-datepicker-next, .ui-datepicker-prev {
+	position: absolute;
+	left: .5em;
+	top: .5em;
+	background: #555555 url(images/555555_40x100_textures_02_glass_20.png) 0 50% repeat-x;
+}
+.ui-datepicker-next {
+	left: 14.6em;
+}
+.ui-datepicker-next:hover, .ui-datepicker-prev:hover {
+	background: #0078a3 url(images/0078a3_40x100_textures_02_glass_40.png) 0 50% repeat-x;
+}
+.ui-datepicker-next a, .ui-datepicker-prev a {
+	text-indent: -999999px;
+	width: 1.3em;
+	height: 1.4em;
+	display: block;
+	font-size: 0.8em;
+	background: url(images/cccccc_7x7_arrow_left.gif) 50% 50% no-repeat;
+	border: 1px solid #666666;
+	cursor: pointer;
+}
+.ui-datepicker-next a {
+	background: url(images/cccccc_7x7_arrow_right.gif) 50% 50% no-repeat;
+}
+.ui-datepicker-prev a:hover {
+	background: url(images/ffffff_7x7_arrow_left.gif) 50% 50% no-repeat;
+}
+.ui-datepicker-next a:hover {
+	background: url(images/ffffff_7x7_arrow_right.gif) 50% 50% no-repeat;
+}
+.ui-datepicker-prev a:active {
+	background: url(images/222222_7x7_arrow_left.gif) 50% 50% no-repeat;
+}
+.ui-datepicker-next a:active {
+	background: url(images/222222_7x7_arrow_right.gif) 50% 50% no-repeat;
+}
+.ui-datepicker-header select {
+	border: 1px solid #666666;
+	color: #eeeeee;
+	background: #555555;
+	font-size: 0.8em;
+	line-height: 1.4em;
+	position: absolute;
+	top: .5em;
+	margin: 0 !important;
+}
+.ui-datepicker-header option:focus, .ui-datepicker-header option:hover {
+	background: #0078a3;
+}
+.ui-datepicker-header select.ui-datepicker-new-month {
+	width: 7em;
+	left: 2.2em;
+}
+.ui-datepicker-header select.ui-datepicker-new-year {
+	width: 5em;
+	left: 9.4em;
+}
+table.ui-datepicker {
+	width: 15.5em;
+	text-align: right;
+}
+table.ui-datepicker td a {
+	padding: .0.8em .3em .0.8em 0;
+	display: block;
+	color: #eeeeee;
+	background: #555555 url(images/555555_40x100_textures_02_glass_20.png) 0 50% repeat-x;
+	cursor: pointer;
+	border: 1px solid #000000;
+}
+table.ui-datepicker td a:hover {
+	border: 1px solid #4bd94b;
+	color: #ffffff;
+	background: #0078a3 url(images/0078a3_40x100_textures_02_glass_40.png) 0 50% repeat-x;
+}
+table.ui-datepicker td a:active {
+	border: 1px solid #ffaf0f;
+	color: #ffffff;
+	background: #f58400 url(images/f58400_40x100_textures_05_inset_soft_30.png) 0 50% repeat-x;
+}
+table.ui-datepicker .ui-datepicker-title-row td {
+	padding: .3em 0;
+	text-align: center;
+	font-size: .9em;
+	color: #ffffff;
+	text-transform: uppercase;
+}
+table.ui-datepicker .ui-datepicker-title-row td a {
+	color: #ffffff;
+}
+.ui-datepicker-cover {
+	display: none;
+	display: block;
+	position: absolute;
+	z-index: -1;
+/*
+	filter: mask();
+
+*/	top: -4px;
+	left: -4px;
+	width: 193px;
+	height: 200px;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*
+Generic ThemeRoller Classes
+>> Make your jQuery Components ThemeRoller-Compatible!
+*/
+
+/*component global class*/
+.ui-component {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+	font-family: Segoe UI, Arial, sans-serif;
+	font-size: 1.0.8em;
+}
+/*component content styles*/
+.ui-component-content {
+	border: 1px solid #666666;
+	background: #000000 url(images/000000_40x100_textures_05_inset_soft_25.png) 0 bottom repeat-x;
+	color: #ffffff;
+}
+.ui-component-content a {
+	color: #ffffff;
+	text-decoration: underline;
+}
+/*component states*/
+.ui-default-state {
+	border: 1px solid #666666;
+	background: #555555 url(images/555555_40x100_textures_02_glass_20.png) 0 50% repeat-x;
+	font-weight: bold;
+	color: #eeeeee !important;
+}
+.ui-default-state a {
+	color: #eeeeee;
+}
+.ui-default-state:hover, .ui-hover-state {
+	border: 1px solid #4bd94b;
+	background: #0078a3 url(images/0078a3_40x100_textures_02_glass_40.png) 0 50% repeat-x;
+	font-weight: bold;
+	color: #ffffff !important;
+}
+.ui-hover-state a {
+	color: #ffffff;
+}
+.ui-default-state:active, .ui-active-state {
+	border: 1px solid #ffaf0f;
+	background: #f58400 url(images/f58400_40x100_textures_05_inset_soft_30.png) 0 50% repeat-x;
+	font-weight: bold;
+	color: #ffffff !important;
+	outline: none;
+}
+.ui-active-state a {
+	color: #ffffff;
+	outline: none;
+}
+/*icons*/
+.ui-arrow-right-default {background: url(images/cccccc_7x7_arrow_right.gif) no-repeat 50% 50%;}
+.ui-arrow-right-default:hover, .ui-arrow-right-hover {background: url(images/ffffff_7x7_arrow_right.gif) no-repeat 50% 50%;}
+.ui-arrow-right-default:active, .ui-arrow-right-active {background: url(images/222222_7x7_arrow_right.gif) no-repeat 50% 50%;}
+.ui-arrow-right-content {background: url(images/cccccc_7x7_arrow_right.gif) no-repeat 50% 50%;}
+
+.ui-arrow-left-default {background: url(images/cccccc_7x7_arrow_left.gif) no-repeat 50% 50%;}
+.ui-arrow-left-default:hover, .ui-arrow-left-hover {background: url(images/ffffff_7x7_arrow_left.gif) no-repeat 50% 50%;}
+.ui-arrow-left-default:active, .ui-arrow-left-active {background: url(images/222222_7x7_arrow_left.gif) no-repeat 50% 50%;}
+.ui-arrow-left-content {background: url(images/cccccc_7x7_arrow_left.gif) no-repeat 50% 50%;}
+
+.ui-arrow-down-default {background: url(images/cccccc_7x7_arrow_down.gif) no-repeat 50% 50%;}
+.ui-arrow-down-default:hover, .ui-arrow-down-hover {background: url(images/ffffff_7x7_arrow_down.gif) no-repeat 50% 50%;}
+.ui-arrow-down-default:active, .ui-arrow-down-active {background: url(images/222222_7x7_arrow_down.gif) no-repeat 50% 50%;}
+.ui-arrow-down-content {background: url(images/cccccc_7x7_arrow_down.gif) no-repeat 50% 50%;}
+
+.ui-arrow-up-default {background: url(images/cccccc_7x7_arrow_up.gif) no-repeat 50% 50%;}
+.ui-arrow-up-default:hover, .ui-arrow-up-hover {background: url(images/ffffff_7x7_arrow_up.gif) no-repeat 50% 50%;}
+.ui-arrow-up-default:active, .ui-arrow-up-active {background: url(images/222222_7x7_arrow_up.gif) no-repeat 50% 50%;}
+.ui-arrow-up-content {background: url(images/cccccc_7x7_arrow_up.gif) no-repeat 50% 50%;}
+
+.ui-close-default {background: url(images/cccccc_11x11_icon_close.gif) no-repeat 50% 50%;}
+.ui-close-default:hover, .ui-close-hover {background: url(images/ffffff_11x11_icon_close.gif) no-repeat 50% 50%;}
+.ui-close-default:active, .ui-close-active {background: url(images/222222_11x11_icon_close.gif) no-repeat 50% 50%;}
+.ui-close-content {background: url(images/222222_11x11_icon_close.gif) no-repeat 50% 50%;}
+
+.ui-folder-closed-default {background: url(images/cccccc_11x11_icon_folder_closed.gif) no-repeat 50% 50%;}
+.ui-folder-closed-default:hover, .ui-folder-closed-hover {background: url(images/ffffff_11x11_icon_folder_closed.gif) no-repeat 50% 50%;}
+.ui-folder-closed-default:active, .ui-folder-closed-active {background: url(images/222222_11x11_icon_folder_closed.gif) no-repeat 50% 50%;}
+.ui-folder-closed-content {background: url(images/cccccc_11x11_icon_folder_closed.gif) no-repeat 50% 50%;}
+
+.ui-folder-open-default {background: url(images/cccccc_11x11_icon_folder_open.gif) no-repeat 50% 50%;}
+.ui-folder-open-default:hover, .ui-folder-open-hover {background: url(images/ffffff_11x11_icon_folder_open.gif) no-repeat 50% 50%;}
+.ui-folder-open-default:active, .ui-folder-open-active {background: url(images/222222_11x11_icon_folder_open.gif) no-repeat 50% 50%;}
+.ui-folder-open-content {background: url(images/222222_11x11_icon_folder_open.gif) no-repeat 50% 50%;}
+
+.ui-doc-default {background: url(images/cccccc_11x11_icon_doc.gif) no-repeat 50% 50%;}
+.ui-doc-default:hover, .ui-doc-hover {background: url(images/ffffff_11x11_icon_doc.gif) no-repeat 50% 50%;}
+.ui-doc-default:active, .ui-doc-active {background: url(images/222222_11x11_icon_doc.gif) no-repeat 50% 50%;}
+.ui-doc-content {background: url(images/cccccc_11x11_icon_doc.gif) no-repeat 50% 50%;}
+
+.ui-arrows-leftright-default {background: url(images/cccccc_11x11_icon_arrows_leftright.gif) no-repeat 50% 50%;}
+.ui-arrows-leftright-default:hover, .ui-arrows-leftright-hover {background: url(images/ffffff_11x11_icon_arrows_leftright.gif) no-repeat 50% 50%;}
+.ui-arrows-leftright-default:active, .ui-arrows-leftright-active {background: url(images/222222_11x11_icon_arrows_leftright.gif) no-repeat 50% 50%;}
+.ui-arrows-leftright-content {background: url(images/cccccc_11x11_icon_arrows_leftright.gif) no-repeat 50% 50%;}
+
+.ui-arrows-updown-default {background: url(images/cccccc_11x11_icon_arrows_updown.gif) no-repeat 50% 50%;}
+.ui-arrows-updown-default:hover, .ui-arrows-updown-hover {background: url(images/ffffff_11x11_icon_arrows_updown.gif) no-repeat 50% 50%;}
+.ui-arrows-updown-default:active, .ui-arrows-updown-active {background: url(images/222222_11x11_icon_arrows_updown.gif) no-repeat 50% 50%;}
+.ui-arrows-updown-content {background: url(images/cccccc_11x11_icon_arrows_updown.gif) no-repeat 50% 50%;}
+
+.ui-minus-default {background: url(images/cccccc_11x11_icon_minus.gif) no-repeat 50% 50%;}
+.ui-minus-default:hover, .ui-minus-hover {background: url(images/ffffff_11x11_icon_minus.gif) no-repeat 50% 50%;}
+.ui-minus-default:active, .ui-minus-active {background: url(images/222222_11x11_icon_minus.gif) no-repeat 50% 50%;}
+.ui-minus-content {background: url(images/cccccc_11x11_icon_minus.gif) no-repeat 50% 50%;}
+
+.ui-plus-default {background: url(images/cccccc_11x11_icon_plus.gif) no-repeat 50% 50%;}
+.ui-plus-default:hover, .ui-plus-hover {background: url(images/ffffff_11x11_icon_plus.gif) no-repeat 50% 50%;}
+.ui-plus-default:active, .ui-plus-active {background: url(images/222222_11x11_icon_plus.gif) no-repeat 50% 50%;}
+.ui-plus-content {background: url(images/cccccc_11x11_icon_plus.gif) no-repeat 50% 50%;}
+
+/*hidden elements*/
+.ui-hidden {
+	display: none;/* for accessible hiding: position: absolute; left: -99999999px*/;
+}
+.ui-accessible-hidden {
+	 position: absolute; left: -99999999px;
+}
+/*reset styles*/
+.ui-reset {
+	/*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+}
+/*clearfix class*/
+.ui-clearfix:after {
+    content: "."; 
+    display: block; 
+    height: 0; 
+    clear: both; 
+    visibility: hidden;
+}
+.ui-clearfix {display: block;}
+/* Hides from IE-mac \*/
+* html .ui-clearfix {height: 1%;}
+.ui-clearfix {display: block;}
+/* End hide from IE-mac */
+
+/* Note: for resizable styles, use the styles listed above in the dialog section */
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/preview/script/jquery-ui/js/jquery-1.2.6.min.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,32 @@
+/*
+ * jQuery 1.2.6 - New Wave Javascript
+ *
+ * Copyright (c) 2008 John Resig (jquery.com)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * $Date: 2008-05-24 14:22:17 -0400 (Sat, 24 May 2008) $
+ * $Rev: 5685 $
+ */
+(function(){var _jQuery=window.jQuery,_$=window.$;var jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context);};var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/,isSimple=/^.[^:#\[\.]*$/,undefined;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this;}if(typeof selector=="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1])selector=jQuery.clean([match[1]],context);else{var elem=document.getElementById(match[3]);if(elem){if(elem.id!=match[3])return jQuery().find(selector);return jQuery(elem);}selector=[];}}else
+return jQuery(context).find(selector);}else if(jQuery.isFunction(selector))return jQuery(document)[jQuery.fn.ready?"ready":"load"](selector);return this.setArray(jQuery.makeArray(selector));},jquery:"1.2.6",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(elems){var ret=jQuery(elems);ret.prevObject=this;return ret;},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this;},each:function(callback,args){return jQuery.each(this,callback,args);},index:function(elem){var ret=-1;return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this);},attr:function(name,value,type){var options=name;if(name.constructor==String)if(value===undefined)return this[0]&&jQuery[type||"attr"](this[0],name);else{options={};options[name]=value;}return this.each(function(i){for(name in options)jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));});},css:function(key,value){if((key=='width'||key=='height')&&parseFloat(value)<0)value=undefined;return this.attr(key,value,"curCSS");},text:function(text){if(typeof text!="object"&&text!=null)return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return ret;},wrapAll:function(html){if(this[0])jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild)elem=elem.firstChild;return elem;}).append(this);return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,false,function(elem){if(this.nodeType==1)this.appendChild(elem);});},prepend:function(){return this.domManip(arguments,true,true,function(elem){if(this.nodeType==1)this.insertBefore(elem,this.firstChild);});},before:function(){return this.domManip(arguments,false,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,true,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(selector){var elems=jQuery.map(this,function(elem){return jQuery.find(selector,elem);});return this.pushStack(/[^+>] [^+>]/.test(selector)||selector.indexOf("..")>-1?jQuery.unique(elems):elems);},clone:function(events){var ret=this.map(function(){if(jQuery.browser.msie&&!jQuery.isXMLDoc(this)){var clone=this.cloneNode(true),container=document.createElement("div");container.appendChild(clone);return jQuery.clean([container.innerHTML])[0];}else
+return this.cloneNode(true);});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined)this[expando]=null;});if(events===true)this.find("*").andSelf().each(function(i){if(this.nodeType==3)return;var events=jQuery.data(this,"events");for(var type in events)for(var handler in events[type])jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);});return ret;},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);})||jQuery.multiFilter(selector,this));},not:function(selector){if(selector.constructor==String)if(isSimple.test(selector))return this.pushStack(jQuery.multiFilter(selector,this,true));else
+selector=jQuery.multiFilter(selector,this);var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;});},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector=='string'?jQuery(selector):jQuery.makeArray(selector))));},is:function(selector){return!!selector&&jQuery.multiFilter(selector,this).length>0;},hasClass:function(selector){return this.is("."+selector);},val:function(value){if(value==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0)return null;for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery.browser.msie&&!option.attributes.value.specified?option.text:option.value;if(one)return value;values.push(value);}}return values;}else
+return(this[0].value||"").replace(/\r/g,"");}return undefined;}if(value.constructor==Number)value+='';return this.each(function(){if(this.nodeType!=1)return;if(value.constructor==Array&&/radio|checkbox/.test(this.type))this.checked=(jQuery.inArray(this.value,value)>=0||jQuery.inArray(this.name,value)>=0);else if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0);});if(!values.length)this.selectedIndex=-1;}else
+this.value=value;});},html:function(value){return value==undefined?(this[0]?this[0].innerHTML:null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},eq:function(i){return this.slice(i,i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length)data=jQuery.data(this[0],key);return data===undefined&&parts[1]?this.data(parts[0]):data;}else
+return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});},domManip:function(args,table,reverse,callback){var clone=this.length>1,elems;return this.each(function(){if(!elems){elems=jQuery.clean(args,this.ownerDocument);if(reverse)elems.reverse();}var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(elems[0],"tr"))obj=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"));var scripts=jQuery([]);jQuery.each(elems,function(){var elem=clone?jQuery(this).clone(true)[0]:this;if(jQuery.nodeName(elem,"script"))scripts=scripts.add(elem);else{if(elem.nodeType==1)scripts=scripts.add(jQuery("script",elem).remove());callback.call(obj,elem);}});scripts.each(evalScript);});}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src)jQuery.ajax({url:elem.src,async:false,dataType:"script"});else
+jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");if(elem.parentNode)elem.parentNode.removeChild(elem);}function now(){return+new Date;}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};i=2;}if(typeof target!="object"&&typeof target!="function")target={};if(length==i){target=this;--i;}for(;i<length;i++)if((options=arguments[i])!=null)for(var name in options){var src=target[name],copy=options[name];if(target===copy)continue;if(deep&&copy&&typeof copy=="object"&&!copy.nodeType)target[name]=jQuery.extend(deep,src||(copy.length!=null?[]:{}),copy);else if(copy!==undefined)target[name]=copy;}return target;};var expando="jQuery"+now(),uuid=0,windowData={},exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,defaultView=document.defaultView||{};jQuery.extend({noConflict:function(deep){window.$=_$;if(deep)window.jQuery=_jQuery;return jQuery;},isFunction:function(fn){return!!fn&&typeof fn!="string"&&!fn.nodeName&&fn.constructor!=Array&&/^[\s[]?function/.test(fn+"");},isXMLDoc:function(elem){return elem.documentElement&&!elem.body||elem.tagName&&elem.ownerDocument&&!elem.ownerDocument.body;},globalEval:function(data){data=jQuery.trim(data);if(data){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.browser.msie)script.text=data;else
+script.appendChild(document.createTextNode(data));head.insertBefore(script,head.firstChild);head.removeChild(script);}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase();},cache:{},data:function(elem,name,data){elem=elem==window?windowData:elem;var id=elem[expando];if(!id)id=elem[expando]=++uuid;if(name&&!jQuery.cache[id])jQuery.cache[id]={};if(data!==undefined)jQuery.cache[id][name]=data;return name?jQuery.cache[id][name]:id;},removeData:function(elem,name){elem=elem==window?windowData:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id])break;if(!name)jQuery.removeData(elem);}}else{try{delete elem[expando];}catch(e){if(elem.removeAttribute)elem.removeAttribute(expando);}delete jQuery.cache[id];}},each:function(object,callback,args){var name,i=0,length=object.length;if(args){if(length==undefined){for(name in object)if(callback.apply(object[name],args)===false)break;}else
+for(;i<length;)if(callback.apply(object[i++],args)===false)break;}else{if(length==undefined){for(name in object)if(callback.call(object[name],name,object[name])===false)break;}else
+for(var value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}return object;},prop:function(elem,value,type,i,name){if(jQuery.isFunction(value))value=value.call(elem,i);return value&&value.constructor==Number&&type=="curCSS"&&!exclude.test(name)?value+"px":value;},className:{add:function(elem,classNames){jQuery.each((classNames||"").split(/\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className))elem.className+=(elem.className?" ":"")+className;});},remove:function(elem,classNames){if(elem.nodeType==1)elem.className=classNames!=undefined?jQuery.grep(elem.className.split(/\s+/),function(className){return!jQuery.className.has(classNames,className);}).join(" "):"";},has:function(elem,className){return jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}callback.call(elem);for(var name in options)elem.style[name]=old[name];},css:function(elem,name,force){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;var padding=0,border=0;jQuery.each(which,function(){padding+=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;border+=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;});val-=Math.round(padding+border);}if(jQuery(elem).is(":visible"))getWH();else
+jQuery.swap(elem,props,getWH);return Math.max(0,val);}return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret,style=elem.style;function color(elem){if(!jQuery.browser.safari)return false;var ret=defaultView.getComputedStyle(elem,null);return!ret||ret.getPropertyValue("color")=="";}if(name=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret;}if(jQuery.browser.opera&&name=="display"){var save=style.outline;style.outline="0 solid black";style.outline=save;}if(name.match(/float/i))name=styleFloat;if(!force&&style&&style[name])ret=style[name];else if(defaultView.getComputedStyle){if(name.match(/float/i))name="float";name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle&&!color(elem))ret=computedStyle.getPropertyValue(name);else{var swap=[],stack=[],a=elem,i=0;for(;a&&color(a);a=a.parentNode)stack.unshift(a);for(;i<stack.length;i++)if(color(stack[i])){swap[i]=stack[i].style.display;stack[i].style.display="block";}ret=name=="display"&&swap[stack.length-1]!=null?"none":(computedStyle&&computedStyle.getPropertyValue(name))||"";for(i=0;i<swap.length;i++)if(swap[i]!=null)stack[i].style.display=swap[i];}if(name=="opacity"&&ret=="")ret="1";}else if(elem.currentStyle){var camelCase=name.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase();});ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var left=style.left,rsLeft=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;style.left=ret||0;ret=style.pixelLeft+"px";style.left=left;elem.runtimeStyle.left=rsLeft;}}return ret;},clean:function(elems,context){var ret=[];context=context||document;if(typeof context.createElement=='undefined')context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;jQuery.each(elems,function(i,elem){if(!elem)return;if(elem.constructor==Number)elem+='';if(typeof elem=="string"){elem=elem.replace(/(<(\w+)[^>]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+"></"+tag+">";});var tags=jQuery.trim(elem).toLowerCase(),div=context.createElement("div");var wrap=!tags.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!tags.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!tags.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!tags.indexOf("<td")||!tags.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!tags.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||jQuery.browser.msie&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--)div=div.lastChild;if(jQuery.browser.msie){var tbody=!tags.indexOf("<table")&&tags.indexOf("<tbody")<0?div.firstChild&&div.firstChild.childNodes:wrap[1]=="<table>"&&tags.indexOf("<tbody")<0?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j)if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length)tbody[j].parentNode.removeChild(tbody[j]);if(/^\s/.test(elem))div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);}elem=jQuery.makeArray(div.childNodes);}if(elem.length===0&&(!jQuery.nodeName(elem,"form")&&!jQuery.nodeName(elem,"select")))return;if(elem[0]==undefined||jQuery.nodeName(elem,"form")||elem.options)ret.push(elem);else
+ret=jQuery.merge(ret,elem);});return ret;},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8)return undefined;var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined,msie=jQuery.browser.msie;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&jQuery.browser.safari)elem.parentNode.selectedIndex;if(name in elem&&notxml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode)throw"type property can't be changed";elem[name]=value;}if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name))return elem.getAttributeNode(name).nodeValue;return elem[name];}if(msie&&notxml&&name=="style")return jQuery.attr(elem.style,"cssText",value);if(set)elem.setAttribute(name,""+value);var attr=msie&&notxml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr;}if(msie&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(value)+''=="NaN"?"":"alpha(opacity="+value*100+")");}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+'':"";}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase();});if(set)elem[name]=value;return elem[name];},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"");},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||array.split||array.setInterval||array.call)ret[0]=array;else
+while(i)ret[--i]=array[i];}return ret;},inArray:function(elem,array){for(var i=0,length=array.length;i<length;i++)if(array[i]===elem)return i;return-1;},merge:function(first,second){var i=0,elem,pos=first.length;if(jQuery.browser.msie){while(elem=second[i++])if(elem.nodeType!=8)first[pos++]=elem;}else
+while(elem=second[i++])first[pos++]=elem;return first;},unique:function(array){var ret=[],done={};try{for(var i=0,length=array.length;i<length;i++){var id=jQuery.data(array[i]);if(!done[id]){done[id]=true;ret.push(array[i]);}}}catch(e){ret=array;}return ret;},grep:function(elems,callback,inv){var ret=[];for(var i=0,length=elems.length;i<length;i++)if(!inv!=!callback(elems[i],i))ret.push(elems[i]);return ret;},map:function(elems,callback){var ret=[];for(var i=0,length=elems.length;i<length;i++){var value=callback(elems[i],i);if(value!=null)ret[ret.length]=value;}return ret.concat.apply([],ret);}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};var styleFloat=jQuery.browser.msie?"styleFloat":"cssFloat";jQuery.extend({boxModel:!jQuery.browser.msie||document.compatMode=="CSS1Compat",props:{"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing"}});jQuery.each({parent:function(elem){return elem.parentNode;},parents:function(elem){return jQuery.dir(elem,"parentNode");},next:function(elem){return jQuery.nth(elem,2,"nextSibling");},prev:function(elem){return jQuery.nth(elem,2,"previousSibling");},nextAll:function(elem){return jQuery.dir(elem,"nextSibling");},prevAll:function(elem){return jQuery.dir(elem,"previousSibling");},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},children:function(elem){return jQuery.sibling(elem.firstChild);},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}},function(name,fn){jQuery.fn[name]=function(selector){var ret=jQuery.map(this,fn);if(selector&&typeof selector=="string")ret=jQuery.multiFilter(selector,ret);return this.pushStack(jQuery.unique(ret));};});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(){var args=arguments;return this.each(function(){for(var i=0,length=args.length;i<length;i++)jQuery(args[i])[original](this);});};});jQuery.each({removeAttr:function(name){jQuery.attr(this,name,"");if(this.nodeType==1)this.removeAttribute(name);},addClass:function(classNames){jQuery.className.add(this,classNames);},removeClass:function(classNames){jQuery.className.remove(this,classNames);},toggleClass:function(classNames){jQuery.className[jQuery.className.has(this,classNames)?"remove":"add"](this,classNames);},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).r.length){jQuery("*",this).add(this).each(function(){jQuery.event.remove(this);jQuery.removeData(this);});if(this.parentNode)this.parentNode.removeChild(this);}},empty:function(){jQuery(">*",this).remove();while(this.firstChild)this.removeChild(this.firstChild);}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?jQuery.browser.opera&&document.body["client"+name]||jQuery.browser.safari&&window["inner"+name]||document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(Math.max(document.body["scroll"+name],document.documentElement["scroll"+name]),Math.max(document.body["offset"+name],document.documentElement["offset"+name])):size==undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,size.constructor==String?size:size+"px");};});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0;}var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2]);},"#":function(a,i,m){return a.getAttribute("id")==m[2];},":":{lt:function(a,i,m){return i<m[3]-0;},gt:function(a,i,m){return i>m[3]-0;},nth:function(a,i,m){return m[3]-0==i;},eq:function(a,i,m){return m[3]-0==i;},first:function(a,i){return i==0;},last:function(a,i,m,r){return i==r.length-1;},even:function(a,i){return i%2==0;},odd:function(a,i){return i%2;},"first-child":function(a){return a.parentNode.getElementsByTagName("*")[0]==a;},"last-child":function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a;},"only-child":function(a){return!jQuery.nth(a.parentNode.lastChild,2,"previousSibling");},parent:function(a){return a.firstChild;},empty:function(a){return!a.firstChild;},contains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0;},visible:function(a){return"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden";},hidden:function(a){return"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden";},enabled:function(a){return!a.disabled;},disabled:function(a){return a.disabled;},checked:function(a){return a.checked;},selected:function(a){return a.selected||jQuery.attr(a,"selected");},text:function(a){return"text"==a.type;},radio:function(a){return"radio"==a.type;},checkbox:function(a){return"checkbox"==a.type;},file:function(a){return"file"==a.type;},password:function(a){return"password"==a.type;},submit:function(a){return"submit"==a.type;},image:function(a){return"image"==a.type;},reset:function(a){return"reset"==a.type;},button:function(a){return"button"==a.type||jQuery.nodeName(a,"button");},input:function(a){return/input|select|textarea|button/i.test(a.nodeName);},has:function(a,i,m){return jQuery.find(m[3],a).length;},header:function(a){return/h\d/i.test(a.nodeName);},animated:function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;}}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r);}return cur;},find:function(t,context){if(typeof t!="string")return[t];if(context&&context.nodeType!=1&&context.nodeType!=9)return[];context=context||document;var ret=[context],done=[],last,nodeName;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false,re=quickChild,m=re.exec(t);if(m){nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++)for(var c=ret[i].firstChild;c;c=c.nextSibling)if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName))r.push(c);ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0)continue;foundToken=true;}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var merge={};nodeName=m[2].toUpperCase();m=m[1];for(var j=0,rl=ret.length;j<rl;j++){var n=m=="~"||m=="+"?ret[j].nextSibling:ret[j].firstChild;for(;n;n=n.nextSibling)if(n.nodeType==1){var id=jQuery.data(n);if(m=="~"&&merge[id])break;if(!nodeName||n.nodeName.toUpperCase()==nodeName){if(m=="~")merge[id]=true;r.push(n);}if(m=="+")break;}}ret=r;t=jQuery.trim(t.replace(re,""));foundToken=true;}}if(t&&!foundToken){if(!t.indexOf(",")){if(context==ret[0])ret.shift();done=jQuery.merge(done,ret);r=ret=[context];t=" "+t.substr(1,t.length);}else{var re2=quickID;var m=re2.exec(t);if(m){m=[0,m[2],m[3],m[1]];}else{re2=quickClass;m=re2.exec(t);}m[2]=m[2].replace(/\\/g,"");var elem=ret[ret.length-1];if(m[1]=="#"&&elem&&elem.getElementById&&!jQuery.isXMLDoc(elem)){var oid=elem.getElementById(m[2]);if((jQuery.browser.msie||jQuery.browser.opera)&&oid&&typeof oid.id=="string"&&oid.id!=m[2])oid=jQuery('[@id="'+m[2]+'"]',elem)[0];ret=r=oid&&(!m[3]||jQuery.nodeName(oid,m[3]))?[oid]:[];}else{for(var i=0;ret[i];i++){var tag=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];if(tag=="*"&&ret[i].nodeName.toLowerCase()=="object")tag="param";r=jQuery.merge(r,ret[i].getElementsByTagName(tag));}if(m[1]==".")r=jQuery.classFilter(r,m[2]);if(m[1]=="#"){var tmp=[];for(var i=0;r[i];i++)if(r[i].getAttribute("id")==m[2]){tmp=[r[i]];break;}r=tmp;}ret=r;}t=t.replace(re2,"");}}if(t){var val=jQuery.filter(t,r);ret=r=val.r;t=jQuery.trim(val.t);}}if(t)ret=[];if(ret&&context==ret[0])ret.shift();done=jQuery.merge(done,ret);return done;},classFilter:function(r,m,not){m=" "+m+" ";var tmp=[];for(var i=0;r[i];i++){var pass=(" "+r[i].className+" ").indexOf(m)>=0;if(!not&&pass||not&&!pass)tmp.push(r[i]);}return tmp;},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break;}}if(!m)break;if(m[1]==":"&&m[2]=="not")r=isSimple.test(m[3])?jQuery.filter(m[3],r,true).r:jQuery(r).not(m[3]);else if(m[1]==".")r=jQuery.classFilter(r,m[2],not);else if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i<rl;i++){var a=r[i],z=a[jQuery.props[m[2]]||m[2]];if(z==null||/href|src|selected/.test(m[2]))z=jQuery.attr(a,m[2])||'';if((type==""&&!!z||type=="="&&z==m[5]||type=="!="&&z!=m[5]||type=="^="&&z&&!z.indexOf(m[5])||type=="$="&&z.substr(z.length-m[5].length)==m[5]||(type=="*="||type=="~=")&&z.indexOf(m[5])>=0)^not)tmp.push(a);}r=tmp;}else if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"0n+"+m[3]||m[3]),first=(test[1]+(test[2]||1))-0,last=test[3]-0;for(var i=0,rl=r.length;i<rl;i++){var node=r[i],parentNode=node.parentNode,id=jQuery.data(parentNode);if(!merge[id]){var c=1;for(var n=parentNode.firstChild;n;n=n.nextSibling)if(n.nodeType==1)n.nodeIndex=c++;merge[id]=true;}var add=false;if(first==0){if(node.nodeIndex==last)add=true;}else if((node.nodeIndex-last)%first==0&&(node.nodeIndex-last)/first>=0)add=true;if(add^not)tmp.push(node);}r=tmp;}else{var fn=jQuery.expr[m[1]];if(typeof fn=="object")fn=fn[m[2]];if(typeof fn=="string")fn=eval("false||function(a,i){return "+fn+";}");r=jQuery.grep(r,function(elem,i){return fn(elem,i,m,r);},not);}}return{r:r,t:t};},dir:function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1)matched.push(cur);cur=cur[dir];}return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir])if(cur.nodeType==1&&++num==result)break;return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem)r.push(n);}return r;}});jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8)return;if(jQuery.browser.msie&&elem.setInterval)elem=window;if(!handler.guid)handler.guid=this.guid++;if(data!=undefined){var fn=handler;handler=this.proxy(fn,function(){return fn.apply(this,arguments);});handler.data=data;}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){if(typeof jQuery!="undefined"&&!jQuery.event.triggered)return jQuery.event.handle.apply(arguments.callee.elem,arguments);});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];handler.type=parts[1];var handlers=events[type];if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem)===false){if(elem.addEventListener)elem.addEventListener(type,handle,false);else if(elem.attachEvent)elem.attachEvent("on"+type,handle);}}handlers[handler.guid]=handler;jQuery.event.global[type]=true;});elem=null;},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8)return;var events=jQuery.data(elem,"events"),ret,index;if(events){if(types==undefined||(typeof types=="string"&&types.charAt(0)=="."))for(var type in events)this.remove(elem,type+(types||""));else{if(types.type){handler=types.handler;types=types.type;}jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];if(events[type]){if(handler)delete events[type][handler.guid];else
+for(handler in events[type])if(!parts[1]||events[type][handler].type==parts[1])delete events[type][handler];for(ret in events[type])break;if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem)===false){if(elem.removeEventListener)elem.removeEventListener(type,jQuery.data(elem,"handle"),false);else if(elem.detachEvent)elem.detachEvent("on"+type,jQuery.data(elem,"handle"));}ret=null;delete events[type];}}});}for(ret in events)break;if(!ret){var handle=jQuery.data(elem,"handle");if(handle)handle.elem=null;jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle");}}},trigger:function(type,data,elem,donative,extra){data=jQuery.makeArray(data);if(type.indexOf("!")>=0){type=type.slice(0,-1);var exclusive=true;}if(!elem){if(this.global[type])jQuery("*").add([window,document]).trigger(type,data);}else{if(elem.nodeType==3||elem.nodeType==8)return undefined;var val,ret,fn=jQuery.isFunction(elem[type]||null),event=!data[0]||!data[0].preventDefault;if(event){data.unshift({type:type,target:elem,preventDefault:function(){},stopPropagation:function(){},timeStamp:now()});data[0][expando]=true;}data[0].type=type;if(exclusive)data[0].exclusive=true;var handle=jQuery.data(elem,"handle");if(handle)val=handle.apply(elem,data);if((!fn||(jQuery.nodeName(elem,'a')&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false)val=false;if(event)data.shift();if(extra&&jQuery.isFunction(extra)){ret=extra.apply(elem,val==null?data:data.concat(val));if(ret!==undefined)val=ret;}if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(elem,'a')&&type=="click")){this.triggered=true;try{elem[type]();}catch(e){}}this.triggered=false;}return val;},handle:function(event){var val,ret,namespace,all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);namespace=event.type.split(".");event.type=namespace[0];namespace=namespace[1];all=!namespace&&!event.exclusive;handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||handler.type==namespace){event.handler=handler;event.data=handler.data;ret=handler.apply(this,arguments);if(val!==false)val=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}}return val;},fix:function(event){if(event[expando]==true)return event;var originalEvent=event;event={originalEvent:originalEvent};var props="altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target timeStamp toElement type view wheelDelta which".split(" ");for(var i=props.length;i;i--)event[props[i]]=originalEvent[props[i]];event[expando]=true;event.preventDefault=function(){if(originalEvent.preventDefault)originalEvent.preventDefault();originalEvent.returnValue=false;};event.stopPropagation=function(){if(originalEvent.stopPropagation)originalEvent.stopPropagation();originalEvent.cancelBubble=true;};event.timeStamp=event.timeStamp||now();if(!event.target)event.target=event.srcElement||document;if(event.target.nodeType==3)event.target=event.target.parentNode;if(!event.relatedTarget&&event.fromElement)event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0);}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode))event.which=event.charCode||event.keyCode;if(!event.metaKey&&event.ctrlKey)event.metaKey=event.ctrlKey;if(!event.which&&event.button)event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));return event;},proxy:function(fn,proxy){proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy;},special:{ready:{setup:function(){bindReady();return;},teardown:function(){return;}},mouseenter:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseover",jQuery.event.special.mouseenter.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseover",jQuery.event.special.mouseenter.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseenter";return jQuery.event.handle.apply(this,arguments);}},mouseleave:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseout",jQuery.event.special.mouseleave.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseout",jQuery.event.special.mouseleave.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseleave";return jQuery.event.handle.apply(this,arguments);}}}};jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments);});return this.each(function(){jQuery.event.add(this,type,one,fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn);});},triggerHandler:function(type,data,fn){return this[0]&&jQuery.event.trigger(type,data,this[0],false,fn);},toggle:function(fn){var args=arguments,i=1;while(i<args.length)jQuery.event.proxy(fn,args[i++]);return this.click(jQuery.event.proxy(fn,function(event){this.lastToggle=(this.lastToggle||0)%i;event.preventDefault();return args[this.lastToggle++].apply(this,arguments)||false;}));},hover:function(fnOver,fnOut){return this.bind('mouseenter',fnOver).bind('mouseleave',fnOut);},ready:function(fn){bindReady();if(jQuery.isReady)fn.call(document,jQuery);else
+jQuery.readyList.push(function(){return fn.call(this,jQuery);});return this;}});jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.call(document);});jQuery.readyList=null;}jQuery(document).triggerHandler("ready");}}});var readyBound=false;function bindReady(){if(readyBound)return;readyBound=true;if(document.addEventListener&&!jQuery.browser.opera)document.addEventListener("DOMContentLoaded",jQuery.ready,false);if(jQuery.browser.msie&&window==top)(function(){if(jQuery.isReady)return;try{document.documentElement.doScroll("left");}catch(error){setTimeout(arguments.callee,0);return;}jQuery.ready();})();if(jQuery.browser.opera)document.addEventListener("DOMContentLoaded",function(){if(jQuery.isReady)return;for(var i=0;i<document.styleSheets.length;i++)if(document.styleSheets[i].disabled){setTimeout(arguments.callee,0);return;}jQuery.ready();},false);if(jQuery.browser.safari){var numStyles;(function(){if(jQuery.isReady)return;if(document.readyState!="loaded"&&document.readyState!="complete"){setTimeout(arguments.callee,0);return;}if(numStyles===undefined)numStyles=jQuery("style, link[rel=stylesheet]").length;if(document.styleSheets.length!=numStyles){setTimeout(arguments.callee,0);return;}jQuery.ready();})();}jQuery.event.add(window,"load",jQuery.ready);}jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,"+"mousedown,mouseup,mousemove,mouseover,mouseout,change,select,"+"submit,keydown,keypress,keyup,error").split(","),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name);};});var withinElement=function(event,elem){var parent=event.relatedTarget;while(parent&&parent!=elem)try{parent=parent.parentNode;}catch(error){parent=elem;}return parent==elem;};jQuery(window).bind("unload",function(){jQuery("*").add(document).unbind();});jQuery.fn.extend({_load:jQuery.fn.load,load:function(url,params,callback){if(typeof url!='string')return this._load(url);var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}callback=callback||function(){};var type="GET";if(params)if(jQuery.isFunction(params)){callback=params;params=null;}else{params=jQuery.param(params);type="POST";}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified")self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText);self.each(callback,[res.responseText,status,res]);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:val.constructor==Array?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=now();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null;}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{url:location.href,global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null,username:null,password:null,accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));var jsonp,jsre=/=\?(&|$)/g,status,data,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!="string")s.data=jQuery.param(s.data);if(s.dataType=="jsonp"){if(type=="GET"){if(!s.url.match(jsre))s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?";}else if(!s.data||!s.data.match(jsre))s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";s.dataType="json";}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data)s.data=(s.data+"").replace(jsre,"="+jsonp+"$1");s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}if(head)head.removeChild(script);};}if(s.dataType=="script"&&s.cache==null)s.cache=false;if(s.cache===false&&type=="GET"){var ts=now();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"");}if(s.data&&type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null;}if(s.global&&!jQuery.active++)jQuery.event.trigger("ajaxStart");var remote=/^(?:\w+:)?\/\/([^\/?#]+)/;if(s.dataType=="script"&&type=="GET"&&remote.test(s.url)&&remote.exec(s.url)[1]!=location.host){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset)script.charset=s.scriptCharset;if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();head.removeChild(script);}};}head.appendChild(script);return undefined;}var requestDone=false;var xhr=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();if(s.username)xhr.open(type,s.url,s.async,s.username,s.password);else
+xhr.open(type,s.url,s.async);try{if(s.data)xhr.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default);}catch(e){}if(s.beforeSend&&s.beforeSend(xhr,s)===false){s.global&&jQuery.active--;xhr.abort();return false;}if(s.global)jQuery.event.trigger("ajaxSend",[xhr,s]);var onreadystatechange=function(isTimeout){if(!requestDone&&xhr&&(xhr.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}status=isTimeout=="timeout"&&"timeout"||!jQuery.httpSuccess(xhr)&&"error"||s.ifModified&&jQuery.httpNotModified(xhr,s.url)&&"notmodified"||"success";if(status=="success"){try{data=jQuery.httpData(xhr,s.dataType,s.dataFilter);}catch(e){status="parsererror";}}if(status=="success"){var modRes;try{modRes=xhr.getResponseHeader("Last-Modified");}catch(e){}if(s.ifModified&&modRes)jQuery.lastModified[s.url]=modRes;if(!jsonp)success();}else
+jQuery.handleError(s,xhr,status);complete();if(s.async)xhr=null;}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0)setTimeout(function(){if(xhr){xhr.abort();if(!requestDone)onreadystatechange("timeout");}},s.timeout);}try{xhr.send(s.data);}catch(e){jQuery.handleError(s,xhr,null,e);}if(!s.async)onreadystatechange();function success(){if(s.success)s.success(data,status);if(s.global)jQuery.event.trigger("ajaxSuccess",[xhr,s]);}function complete(){if(s.complete)s.complete(xhr,status);if(s.global)jQuery.event.trigger("ajaxComplete",[xhr,s]);if(s.global&&!--jQuery.active)jQuery.event.trigger("ajaxStop");}return xhr;},handleError:function(s,xhr,status,e){if(s.error)s.error(xhr,status,e);if(s.global)jQuery.event.trigger("ajaxError",[xhr,s,e]);},active:0,httpSuccess:function(xhr){try{return!xhr.status&&location.protocol=="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");return xhr.status==304||xhrRes==jQuery.lastModified[url]||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpData:function(xhr,type,filter){var ct=xhr.getResponseHeader("content-type"),xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.tagName=="parsererror")throw"parsererror";if(filter)data=filter(data,type);if(type=="script")jQuery.globalEval(data);if(type=="json")data=eval("("+data+")");return data;},param:function(a){var s=[];if(a.constructor==Array||a.jquery)jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value));});else
+for(var j in a)if(a[j]&&a[j].constructor==Array)jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this));});else
+s.push(encodeURIComponent(j)+"="+encodeURIComponent(jQuery.isFunction(a[j])?a[j]():a[j]));return s.join("&").replace(/%20/g,"+");}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock||"";if(jQuery.css(this,"display")=="none"){var elem=jQuery("<"+this.tagName+" />").appendTo("body");this.style.display=elem.css("display");if(this.style.display=="none")this.style.display="block";elem.remove();}}).end();},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");this.style.display="none";}).end();},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();});},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback);},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback);},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback);},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback);},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){if(this.nodeType!=1)return false;var opt=jQuery.extend({},optall),p,hidden=jQuery(this).is(":hidden"),self=this;for(p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden)return opt.complete.call(this);if(p=="height"||p=="width"){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}if(opt.overflow!=null)this.style.overflow="hidden";opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val))e[val=="toggle"?hidden?"show":"hide":val](prop);else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}if(parts[1])end=((parts[1]=="-="?-1:1)*end)+start;e.custom(start,end,unit);}else
+e.custom(start,val,"");}});return true;});},queue:function(type,fn){if(jQuery.isFunction(type)||(type&&type.constructor==Array)){fn=type;type="fx";}if(!type||(typeof type=="string"&&!fn))return queue(this[0],type);return this.each(function(){if(fn.constructor==Array)queue(this,type,fn);else{queue(this,type).push(fn);if(queue(this,type).length==1)fn.call(this);}});},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue)this.queue([]);this.each(function(){for(var i=timers.length-1;i>=0;i--)if(timers[i].elem==this){if(gotoEnd)timers[i](true);timers.splice(i,1);}});if(!gotoEnd)this.dequeue();return this;}});var queue=function(elem,type,array){if(elem){type=type||"fx";var q=jQuery.data(elem,type+"queue");if(!q||array)q=jQuery.data(elem,type+"queue",jQuery.makeArray(array));}return q;};jQuery.fn.dequeue=function(type){type=type||"fx";return this.each(function(){var q=queue(this,type);q.shift();if(q.length)q[0].call(this);});};jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:jQuery.fx.speeds[opt.duration])||jQuery.fx.speeds.def;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false)jQuery(this).dequeue();if(jQuery.isFunction(opt.old))opt.old.call(this);};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],timerId:null,fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig)options.orig={};}});jQuery.fx.prototype={update:function(){if(this.options.step)this.options.step.call(this.elem,this.now,this);(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if(this.prop=="height"||this.prop=="width")this.elem.style.display="block";},cur:function(force){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null)return this.elem[this.prop];var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var self=this;function t(gotoEnd){return self.step(gotoEnd);}t.elem=this.elem;jQuery.timers.push(t);if(jQuery.timerId==null){jQuery.timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++)if(!timers[i]())timers.splice(i--,1);if(!timers.length){clearInterval(jQuery.timerId);jQuery.timerId=null;}},13);}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(0,this.cur());if(this.prop=="width"||this.prop=="height")this.elem.style[this.prop]="1px";jQuery(this.elem).show();},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(gotoEnd){var t=now();if(gotoEnd||t>this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim)if(this.options.curAnim[i]!==true)done=false;if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none")this.elem.style.display="block";}if(this.options.hide)this.elem.style.display="none";if(this.options.hide||this.options.show)for(var p in this.options.curAnim)jQuery.attr(this.elem.style,p,this.options.orig[p]);}if(done)this.options.complete.call(this.elem);return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}return true;}};jQuery.extend(jQuery.fx,{speeds:{slow:600,fast:200,def:400},step:{scrollLeft:function(fx){fx.elem.scrollLeft=fx.now;},scrollTop:function(fx){fx.elem.scrollTop=fx.now;},opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){fx.elem.style[fx.prop]=fx.now+fx.unit;}}});jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem)with(jQuery.browser){var parent=elem.parentNode,offsetChild=elem,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522&&!/adobeair/i.test(userAgent),css=jQuery.curCSS,fixed=css(elem,"position")=="fixed";if(elem.getBoundingClientRect){var box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));add(-doc.documentElement.clientLeft,-doc.documentElement.clientTop);}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&!/^t(able|d|h)$/i.test(offsetParent.tagName)||safari&&!safari2)border(offsetParent);if(!fixed&&css(offsetParent,"position")=="fixed")fixed=true;offsetChild=/^body$/i.test(offsetParent.tagName)?offsetChild:offsetParent;offsetParent=offsetParent.offsetParent;}while(parent&&parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table.*$/i.test(css(parent,"display")))add(-parent.scrollLeft,-parent.scrollTop);if(mozilla&&css(parent,"overflow")!="visible")border(parent);parent=parent.parentNode;}if((safari2&&(fixed||css(offsetChild,"position")=="absolute"))||(mozilla&&css(offsetChild,"position")!="absolute"))add(-doc.body.offsetLeft,-doc.body.offsetTop);if(fixed)add(Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));}results={top:top,left:left};}function border(elem){add(jQuery.curCSS(elem,"borderLeftWidth",true),jQuery.curCSS(elem,"borderTopWidth",true));}function add(l,t){left+=parseInt(l,10)||0;top+=parseInt(t,10)||0;}return results;};jQuery.fn.extend({position:function(){var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=num(this,'marginTop');offset.left-=num(this,'marginLeft');parentOffset.top+=num(offsetParent,'borderTopWidth');parentOffset.left+=num(offsetParent,'borderLeftWidth');results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}return results;},offsetParent:function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&jQuery.css(offsetParent,'position')=='static'))offsetParent=offsetParent.offsetParent;return jQuery(offsetParent);}});jQuery.each(['Left','Top'],function(i,name){var method='scroll'+name;jQuery.fn[method]=function(val){if(!this[0])return;return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(!i?val:jQuery(window).scrollLeft(),i?val:jQuery(window).scrollTop()):this[method]=val;}):this[0]==window||this[0]==document?self[i?'pageYOffset':'pageXOffset']||jQuery.boxModel&&document.documentElement[method]||document.body[method]:this[0][method];};});jQuery.each(["Height","Width"],function(i,name){var tl=i?"Left":"Top",br=i?"Right":"Bottom";jQuery.fn["inner"+name]=function(){return this[name.toLowerCase()]()+num(this,"padding"+tl)+num(this,"padding"+br);};jQuery.fn["outer"+name]=function(margin){return this["inner"+name]()+num(this,"border"+tl+"Width")+num(this,"border"+br+"Width")+(margin?num(this,"margin"+tl)+num(this,"margin"+br):0);};});})();
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/preview/script/jquery-ui/js/jquery-ui-1.6.custom.min.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,78 @@
+/*
+ * jQuery UI 1.6
+ *
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI
+ */
(function(C){var I=C.fn.remove,D=C.browser.mozilla&&(parseFloat(C.browser.version)<1.9);C.ui={version:"1.6",plugin:{add:function(K,L,N){var M=C.ui[K].prototype;for(var J in N){M.plugins[J]=M.plugins[J]||[];M.plugins[J].push([L,N[J]])}},call:function(J,L,K){var N=J.plugins[L];if(!N){return }for(var M=0;M<N.length;M++){if(J.options[N[M][0]]){N[M][1].apply(J.element,K)}}}},contains:function(L,K){var J=C.browser.safari&&C.browser.version<522;if(L.contains&&!J){return L.contains(K)}if(L.compareDocumentPosition){return !!(L.compareDocumentPosition(K)&16)}while(K=K.parentNode){if(K==L){return true}}return false},cssCache:{},css:function(J){if(C.ui.cssCache[J]){return C.ui.cssCache[J]}var K=C('<div class="ui-gen">').addClass(J).css({position:"absolute",top:"-5000px",left:"-5000px",display:"block"}).appendTo("body");C.ui.cssCache[J]=!!((!(/auto|default/).test(K.css("cursor"))||(/^[1-9]/).test(K.css("height"))||(/^[1-9]/).test(K.css("width"))||!(/none/).test(K.css("backgroundImage"))||!(/transparent|rgba\(0, 0, 0, 0\)/).test(K.css("backgroundColor"))));try{C("body").get(0).removeChild(K.get(0))}catch(L){}return C.ui.cssCache[J]},hasScroll:function(M,K){if(C(M).css("overflow")=="hidden"){return false}var J=(K&&K=="left")?"scrollLeft":"scrollTop",L=false;if(M[J]>0){return true}M[J]=1;L=(M[J]>0);M[J]=0;return L},isOverAxis:function(K,J,L){return(K>J)&&(K<(J+L))},isOver:function(O,K,N,M,J,L){return C.ui.isOverAxis(O,N,J)&&C.ui.isOverAxis(K,M,L)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(D){var F=C.attr,E=C.fn.removeAttr,H="http://www.w3.org/2005/07/aaa",A=/^aria-/,B=/^wairole:/;C.attr=function(K,J,L){var M=L!==undefined;return(J=="role"?(M?F.call(this,K,J,"wairole:"+L):(F.apply(this,arguments)||"").replace(B,"")):(A.test(J)?(M?K.setAttributeNS(H,J.replace(A,"aaa:"),L):F.call(this,K,J.replace(A,"aaa:"))):F.apply(this,arguments)))};C.fn.removeAttr=function(J){return(A.test(J)?this.each(function(){this.removeAttributeNS(H,J.replace(A,""))}):E.call(this,J))}}C.fn.extend({remove:function(){C("*",this).add(this).each(function(){C(this).triggerHandler("remove")});return I.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var J;if((C.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){J=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(C.curCSS(this,"position",1))&&(/(auto|scroll)/).test(C.curCSS(this,"overflow",1)+C.curCSS(this,"overflow-y",1)+C.curCSS(this,"overflow-x",1))}).eq(0)}else{J=this.parents().filter(function(){return(/(auto|scroll)/).test(C.curCSS(this,"overflow",1)+C.curCSS(this,"overflow-y",1)+C.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!J.length?C(document):J}});C.extend(C.expr[":"],{data:function(K,L,J){return C.data(K,J[3])},tabbable:function(L,M,K){var N=L.nodeName.toLowerCase();function J(O){return !(C(O).is(":hidden")||C(O).parents(":hidden").length)}return(L.tabIndex>=0&&(("a"==N&&L.href)||(/input|select|textarea|button/.test(N)&&"hidden"!=L.type&&!L.disabled))&&J(L))}});function G(M,N,O,L){function K(Q){var P=C[M][N][Q]||[];return(typeof P=="string"?P.split(/,?\s+/):P)}var J=K("getter");if(L.length==1&&typeof L[0]=="string"){J=J.concat(K("getterSetter"))}return(C.inArray(O,J)!=-1)}C.widget=function(K,J){var L=K.split(".")[0];K=K.split(".")[1];C.fn[K]=function(P){var N=(typeof P=="string"),O=Array.prototype.slice.call(arguments,1);if(N&&P.substring(0,1)=="_"){return this}if(N&&G(L,K,P,O)){var M=C.data(this[0],K);return(M?M[P].apply(M,O):undefined)}return this.each(function(){var Q=C.data(this,K);(!Q&&!N&&C.data(this,K,new C[L][K](this,P)));(Q&&N&&C.isFunction(Q[P])&&Q[P].apply(Q,O))})};C[L]=C[L]||{};C[L][K]=function(O,N){var M=this;this.widgetName=K;this.widgetEventPrefix=C[L][K].eventPrefix||K;this.widgetBaseClass=L+"-"+K;this.options=C.extend({},C.widget.defaults,C[L][K].defaults,C.metadata&&C.metadata.get(O)[K],N);this.element=C(O).bind("setData."+K,function(Q,P,R){return M._setData(P,R)}).bind("getData."+K,function(Q,P){return M._getData(P)}).bind("remove",function(){return M.destroy()});this._init()};C[L][K].prototype=C.extend({},C.widget.prototype,J);C[L][K].getterSetter="option"};C.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName)},option:function(L,M){var K=L,J=this;if(typeof L=="string"){if(M===undefined){return this._getData(L)}K={};K[L]=M}C.each(K,function(N,O){J._setData(N,O)})},_getData:function(J){return this.options[J]},_setData:function(J,K){this.options[J]=K;if(J=="disabled"){this.element[K?"addClass":"removeClass"](this.widgetBaseClass+"-disabled")}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(K,L,M){var J=(K==this.widgetEventPrefix?K:this.widgetEventPrefix+K);L=L||C.event.fix({type:J,target:this.element[0]});return this.element.triggerHandler(J,[L,M],this.options[K])}};C.widget.defaults={disabled:false};C.ui.mouse={_mouseInit:function(){var J=this;this.element.bind("mousedown."+this.widgetName,function(K){return J._mouseDown(K)}).bind("click."+this.widgetName,function(K){if(J._preventClickEvent){J._preventClickEvent=false;return false}});if(C.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(C.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(L){(this._mouseStarted&&this._mouseUp(L));this._mouseDownEvent=L;var K=this,M=(L.which==1),J=(typeof this.options.cancel=="string"?C(L.target).parents().add(L.target).filter(this.options.cancel).length:false);if(!M||J||!this._mouseCapture(L)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){K.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(L)&&this._mouseDelayMet(L)){this._mouseStarted=(this._mouseStart(L)!==false);if(!this._mouseStarted){L.preventDefault();return true}}this._mouseMoveDelegate=function(N){return K._mouseMove(N)};this._mouseUpDelegate=function(N){return K._mouseUp(N)};C(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);if(!C.browser.safari){L.preventDefault()}return true},_mouseMove:function(J){if(C.browser.msie&&!J.button){return this._mouseUp(J)}if(this._mouseStarted){this._mouseDrag(J);return J.preventDefault()}if(this._mouseDistanceMet(J)&&this._mouseDelayMet(J)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,J)!==false);(this._mouseStarted?this._mouseDrag(J):this._mouseUp(J))}return !this._mouseStarted},_mouseUp:function(J){C(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=true;this._mouseStop(J)}return false},_mouseDistanceMet:function(J){return(Math.max(Math.abs(this._mouseDownEvent.pageX-J.pageX),Math.abs(this._mouseDownEvent.pageY-J.pageY))>=this.options.distance)},_mouseDelayMet:function(J){return this.mouseDelayMet},_mouseStart:function(J){},_mouseDrag:function(J){},_mouseStop:function(J){},_mouseCapture:function(J){return true}};C.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);/*
+ * jQuery UI Draggable 1.6
+ *
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Draggables
+ *
+ * Depends:
+ *	ui.core.js
+ */
(function(A){A.widget("ui.draggable",A.extend({},A.ui.mouse,{_init:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"}(this.options.cssNamespace&&this.element.addClass(this.options.cssNamespace+"-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));this._mouseInit()},destroy:function(){if(!this.element.data("draggable")){return }this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy()},_mouseCapture:function(B){var C=this.options;if(this.helper||C.disabled||A(B.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(B);if(!this.handle){return false}return true},_mouseStart:function(B){var C=this.options;this.helper=this._createHelper(B);this._cacheHelperProportions();if(A.ui.ddmanager){A.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};A.extend(this.offset,{click:{left:B.pageX-this.offset.left,top:B.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});if(C.cursorAt){this._adjustOffsetFromHelper(C.cursorAt)}this.originalPosition=this._generatePosition(B);if(C.containment){this._setContainment()}this._propagate("start",B);this._cacheHelperProportions();if(A.ui.ddmanager&&!C.dropBehaviour){A.ui.ddmanager.prepareOffsets(this,B)}this.helper.addClass("ui-draggable-dragging");this._mouseDrag(B,true);return true},_mouseDrag:function(B,C){this.position=this._generatePosition(B);this.positionAbs=this._convertPositionTo("absolute");if(!C){this.position=this._propagate("drag",B)||this.position}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}if(A.ui.ddmanager){A.ui.ddmanager.drag(this,B)}return false},_mouseStop:function(C){var D=false;if(A.ui.ddmanager&&!this.options.dropBehaviour){var D=A.ui.ddmanager.drop(this,C)}if((this.options.revert=="invalid"&&!D)||(this.options.revert=="valid"&&D)||this.options.revert===true||(A.isFunction(this.options.revert)&&this.options.revert.call(this.element,D))){var B=this;A(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){B._propagate("stop",C);B._clear()})}else{this._propagate("stop",C);this._clear()}return false},_getHandle:function(B){var C=!this.options.handle||!A(this.options.handle,this.element).length?true:false;A(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==B.target){C=true}});return C},_createHelper:function(C){var D=this.options;var B=A.isFunction(D.helper)?A(D.helper.apply(this.element[0],[C])):(D.helper=="clone"?this.element.clone():this.element);if(!B.parents("body").length){B.appendTo((D.appendTo=="parent"?this.element[0].parentNode:D.appendTo))}if(B[0]!=this.element[0]&&!(/(fixed|absolute)/).test(B.css("position"))){B.css("position","absolute")}return B},_adjustOffsetFromHelper:function(B){if(B.left!=undefined){this.offset.click.left=B.left+this.margins.left}if(B.right!=undefined){this.offset.click.left=this.helperProportions.width-B.right+this.margins.left}if(B.top!=undefined){this.offset.click.top=B.top+this.margins.top}if(B.bottom!=undefined){this.offset.click.top=this.helperProportions.height-B.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var B=this.offsetParent.offset();if((this.offsetParent[0]==document.body&&A.browser.mozilla)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&A.browser.msie)){B={top:0,left:0}}return{top:B.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:B.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var B=this.element.position();return{top:B.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:B.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var E=this.options;if(E.containment=="parent"){E.containment=this.helper[0].parentNode}if(E.containment=="document"||E.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,A(E.containment=="document"?document:window).width()-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),(A(E.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)]}if(!(/^(document|window|parent)$/).test(E.containment)){var C=A(E.containment)[0];var D=A(E.containment).offset();var B=(A(C).css("overflow")!="hidden");this.containment=[D.left+(parseInt(A(C).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left-this.margins.left,D.top+(parseInt(A(C).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top-this.margins.top,D.left+(B?Math.max(C.scrollWidth,C.offsetWidth):C.offsetWidth)-(parseInt(A(C).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left,D.top+(B?Math.max(C.scrollHeight,C.offsetHeight):C.offsetHeight)-(parseInt(A(C).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(D,F){if(!F){F=this.position}var C=D=="absolute"?1:-1;var B=this[(this.cssPosition=="absolute"?"offset":"scroll")+"Parent"],E=(/(html|body)/i).test(B[0].tagName);return{top:(F.top+this.offset.relative.top*C+this.offset.parent.top*C+(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(E?0:B.scrollTop()))*C+this.margins.top*C),left:(F.left+this.offset.relative.left*C+this.offset.parent.left*C+(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():(E?0:B.scrollLeft()))*C+this.margins.left*C)}},_generatePosition:function(D){var G=this.options,C=this[(this.cssPosition=="absolute"?"offset":"scroll")+"Parent"],H=(/(html|body)/i).test(C[0].tagName);var B={top:(D.pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(H?0:C.scrollTop()))),left:(D.pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():H?0:C.scrollLeft()))};if(!this.originalPosition){return B}if(this.containment){if(B.left<this.containment[0]){B.left=this.containment[0]}if(B.top<this.containment[1]){B.top=this.containment[1]}if(B.left>this.containment[2]){B.left=this.containment[2]}if(B.top>this.containment[3]){B.top=this.containment[3]}}if(G.grid){var F=this.originalPosition.top+Math.round((B.top-this.originalPosition.top)/G.grid[1])*G.grid[1];B.top=this.containment?(!(F<this.containment[1]||F>this.containment[3])?F:(!(F<this.containment[1])?F-G.grid[1]:F+G.grid[1])):F;var E=this.originalPosition.left+Math.round((B.left-this.originalPosition.left)/G.grid[0])*G.grid[0];B.left=this.containment?(!(E<this.containment[0]||E>this.containment[2])?E:(!(E<this.containment[0])?E-G.grid[0]:E+G.grid[0])):E}return B},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},_propagate:function(C,B){A.ui.plugin.call(this,C,[B,this._uiHash()]);if(C=="drag"){this.positionAbs=this._convertPositionTo("absolute")}return this.element.triggerHandler(C=="drag"?C:"drag"+C,[B,this._uiHash()],this.options[C])},plugins:{},_uiHash:function(B){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,options:this.options}}}));A.extend(A.ui.draggable,{version:"1.6",defaults:{appendTo:"parent",axis:false,cancel:":input",connectToSortable:false,containment:false,cssNamespace:"ui",cursor:"default",cursorAt:null,delay:0,distance:1,grid:false,handle:false,helper:"original",iframeFix:false,opacity:1,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:null}});A.ui.plugin.add("draggable","connectToSortable",{start:function(B,D){var C=A(this).data("draggable");C.sortables=[];A(D.options.connectToSortable).each(function(){A(this+"").each(function(){if(A.data(this,"sortable")){var E=A.data(this,"sortable");C.sortables.push({instance:E,shouldRevert:E.options.revert});E._refreshItems();E._propagate("activate",B,C)}})})},stop:function(B,D){var C=A(this).data("draggable");A.each(C.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;C.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(B);this.instance.element.triggerHandler("sortreceive",[B,A.extend(this.instance._ui(),{sender:C.element})],this.instance.options["receive"]);this.instance.options.helper=this.instance.options._helper;if(C.options.helper=="original"){this.instance.currentItem.css({top:"auto",left:"auto"})}}else{this.instance.cancelHelperRemoval=false;this.instance._propagate("deactivate",B,C)}})},drag:function(C,F){var E=A(this).data("draggable"),B=this;var D=function(I){var N=this.offset.click.top,M=this.offset.click.left;var G=this.positionAbs.top,K=this.positionAbs.left;var J=I.height,L=I.width;var O=I.top,H=I.left;return A.ui.isOver(G+N,K+M,O,H,J,L)};A.each(E.sortables,function(G){if(D.call(E,this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=A(B).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return F.helper[0]};C.target=this.instance.currentItem[0];this.instance._mouseCapture(C,true);this.instance._mouseStart(C,true,true);this.instance.offset.click.top=E.offset.click.top;this.instance.offset.click.left=E.offset.click.left;this.instance.offset.parent.left-=E.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=E.offset.parent.top-this.instance.offset.parent.top;E._propagate("toSortable",C)}if(this.instance.currentItem){this.instance._mouseDrag(C)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._mouseStop(C,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}E._propagate("fromSortable",C)}}})}});A.ui.plugin.add("draggable","cursor",{start:function(C,D){var B=A("body");if(B.css("cursor")){D.options._cursor=B.css("cursor")}B.css("cursor",D.options.cursor)},stop:function(B,C){if(C.options._cursor){A("body").css("cursor",C.options._cursor)}}});A.ui.plugin.add("draggable","iframeFix",{start:function(B,C){A(C.options.iframeFix===true?"iframe":C.options.iframeFix).each(function(){A('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(A(this).offset()).appendTo("body")})},stop:function(B,C){A("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});A.ui.plugin.add("draggable","opacity",{start:function(C,D){var B=A(D.helper);if(B.css("opacity")){D.options._opacity=B.css("opacity")}B.css("opacity",D.options.opacity)},stop:function(B,C){if(C.options._opacity){A(C.helper).css("opacity",C.options._opacity)}}});A.ui.plugin.add("draggable","scroll",{start:function(C,D){var E=D.options;var B=A(this).data("draggable");if(B.scrollParent[0]!=document&&B.scrollParent[0].tagName!="HTML"){B.overflowOffset=B.scrollParent.offset()}},drag:function(D,E){var F=E.options,B=false;var C=A(this).data("draggable");if(C.scrollParent[0]!=document&&C.scrollParent[0].tagName!="HTML"){if((C.overflowOffset.top+C.scrollParent[0].offsetHeight)-D.pageY<F.scrollSensitivity){C.scrollParent[0].scrollTop=B=C.scrollParent[0].scrollTop+F.scrollSpeed}else{if(D.pageY-C.overflowOffset.top<F.scrollSensitivity){C.scrollParent[0].scrollTop=B=C.scrollParent[0].scrollTop-F.scrollSpeed}}if((C.overflowOffset.left+C.scrollParent[0].offsetWidth)-D.pageX<F.scrollSensitivity){C.scrollParent[0].scrollLeft=B=C.scrollParent[0].scrollLeft+F.scrollSpeed}else{if(D.pageX-C.overflowOffset.left<F.scrollSensitivity){C.scrollParent[0].scrollLeft=B=C.scrollParent[0].scrollLeft-F.scrollSpeed}}}else{if(D.pageY-A(document).scrollTop()<F.scrollSensitivity){B=A(document).scrollTop(A(document).scrollTop()-F.scrollSpeed)}else{if(A(window).height()-(D.pageY-A(document).scrollTop())<F.scrollSensitivity){B=A(document).scrollTop(A(document).scrollTop()+F.scrollSpeed)}}if(D.pageX-A(document).scrollLeft()<F.scrollSensitivity){B=A(document).scrollLeft(A(document).scrollLeft()-F.scrollSpeed)}else{if(A(window).width()-(D.pageX-A(document).scrollLeft())<F.scrollSensitivity){B=A(document).scrollLeft(A(document).scrollLeft()+F.scrollSpeed)}}}if(B!==false&&A.ui.ddmanager&&!F.dropBehaviour){A.ui.ddmanager.prepareOffsets(C,D)}if(B!==false&&C.cssPosition=="absolute"&&C.scrollParent[0]!=document&&A.ui.contains(C.scrollParent[0],C.offsetParent[0])){C.offset.parent=C._getParentOffset()}if(B!==false&&C.cssPosition=="relative"&&!(C.scrollParent[0]!=document&&C.scrollParent[0]!=C.offsetParent[0])){C.offset.relative=C._getRelativeOffset()}}});A.ui.plugin.add("draggable","snap",{start:function(B,D){var C=A(this).data("draggable");C.snapElements=[];A(D.options.snap.constructor!=String?(D.options.snap.items||":data(draggable)"):D.options.snap).each(function(){var F=A(this);var E=F.offset();if(this!=C.element[0]){C.snapElements.push({item:this,width:F.outerWidth(),height:F.outerHeight(),top:E.top,left:E.left})}})},drag:function(M,K){var E=A(this).data("draggable");var Q=K.options.snapTolerance;var P=K.absolutePosition.left,O=P+E.helperProportions.width,D=K.absolutePosition.top,C=D+E.helperProportions.height;for(var N=E.snapElements.length-1;N>=0;N--){var L=E.snapElements[N].left,J=L+E.snapElements[N].width,I=E.snapElements[N].top,S=I+E.snapElements[N].height;if(!((L-Q<P&&P<J+Q&&I-Q<D&&D<S+Q)||(L-Q<P&&P<J+Q&&I-Q<C&&C<S+Q)||(L-Q<O&&O<J+Q&&I-Q<D&&D<S+Q)||(L-Q<O&&O<J+Q&&I-Q<C&&C<S+Q))){if(E.snapElements[N].snapping){(E.options.snap.release&&E.options.snap.release.call(E.element,M,A.extend(E._uiHash(),{snapItem:E.snapElements[N].item})))}E.snapElements[N].snapping=false;continue}if(K.options.snapMode!="inner"){var B=Math.abs(I-C)<=Q;var R=Math.abs(S-D)<=Q;var G=Math.abs(L-O)<=Q;var H=Math.abs(J-P)<=Q;if(B){K.position.top=E._convertPositionTo("relative",{top:I-E.helperProportions.height,left:0}).top}if(R){K.position.top=E._convertPositionTo("relative",{top:S,left:0}).top}if(G){K.position.left=E._convertPositionTo("relative",{top:0,left:L-E.helperProportions.width}).left}if(H){K.position.left=E._convertPositionTo("relative",{top:0,left:J}).left}}var F=(B||R||G||H);if(K.options.snapMode!="outer"){var B=Math.abs(I-D)<=Q;var R=Math.abs(S-C)<=Q;var G=Math.abs(L-P)<=Q;var H=Math.abs(J-O)<=Q;if(B){K.position.top=E._convertPositionTo("relative",{top:I,left:0}).top}if(R){K.position.top=E._convertPositionTo("relative",{top:S-E.helperProportions.height,left:0}).top}if(G){K.position.left=E._convertPositionTo("relative",{top:0,left:L}).left}if(H){K.position.left=E._convertPositionTo("relative",{top:0,left:J-E.helperProportions.width}).left}}if(!E.snapElements[N].snapping&&(B||R||G||H||F)){(E.options.snap.snap&&E.options.snap.snap.call(E.element,M,A.extend(E._uiHash(),{snapItem:E.snapElements[N].item})))}E.snapElements[N].snapping=(B||R||G||H||F)}}});A.ui.plugin.add("draggable","stack",{start:function(B,C){var D=A.makeArray(A(C.options.stack.group)).sort(function(F,E){return(parseInt(A(F).css("zIndex"),10)||C.options.stack.min)-(parseInt(A(E).css("zIndex"),10)||C.options.stack.min)});A(D).each(function(E){this.style.zIndex=C.options.stack.min+E});this[0].style.zIndex=C.options.stack.min+D.length}});A.ui.plugin.add("draggable","zIndex",{start:function(C,D){var B=A(D.helper);if(B.css("zIndex")){D.options._zIndex=B.css("zIndex")}B.css("zIndex",D.options.zIndex)},stop:function(B,C){if(C.options._zIndex){A(C.helper).css("zIndex",C.options._zIndex)}}})})(jQuery);/*
+ * jQuery UI Droppable 1.6
+ *
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Droppables
+ *
+ * Depends:
+ *	ui.core.js
+ *	ui.draggable.js
+ */
(function(A){A.widget("ui.droppable",{_init:function(){var C=this.options,B=C.accept;this.isover=0;this.isout=1;this.options.accept=this.options.accept&&A.isFunction(this.options.accept)?this.options.accept:function(D){return D.is(B)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};A.ui.ddmanager.droppables[this.options.scope]=A.ui.ddmanager.droppables[this.options.scope]||[];A.ui.ddmanager.droppables[this.options.scope].push(this);(this.options.cssNamespace&&this.element.addClass(this.options.cssNamespace+"-droppable"))},destroy:function(){var B=A.ui.ddmanager.droppables[this.options.scope];for(var C=0;C<B.length;C++){if(B[C]==this){B.splice(C,1)}}this.element.removeClass("ui-droppable-disabled").removeData("droppable").unbind(".droppable")},_setData:function(B,C){if(B=="accept"){this.options.accept=C&&A.isFunction(C)?C:function(D){return D.is(accept)}}else{A.widget.prototype._setData.apply(this,arguments)}},_activate:function(C){var B=A.ui.ddmanager.current;A.ui.plugin.call(this,"activate",[C,this.ui(B)]);if(B){this.element.triggerHandler("dropactivate",[C,this.ui(B)],this.options.activate)}},_deactivate:function(C){var B=A.ui.ddmanager.current;A.ui.plugin.call(this,"deactivate",[C,this.ui(B)]);if(B){this.element.triggerHandler("dropdeactivate",[C,this.ui(B)],this.options.deactivate)}},_over:function(C){var B=A.ui.ddmanager.current;if(!B||(B.currentItem||B.element)[0]==this.element[0]){return }if(this.options.accept.call(this.element,(B.currentItem||B.element))){A.ui.plugin.call(this,"over",[C,this.ui(B)]);this.element.triggerHandler("dropover",[C,this.ui(B)],this.options.over)}},_out:function(C){var B=A.ui.ddmanager.current;if(!B||(B.currentItem||B.element)[0]==this.element[0]){return }if(this.options.accept.call(this.element,(B.currentItem||B.element))){A.ui.plugin.call(this,"out",[C,this.ui(B)]);this.element.triggerHandler("dropout",[C,this.ui(B)],this.options.out)}},_drop:function(C,D){var B=D||A.ui.ddmanager.current;if(!B||(B.currentItem||B.element)[0]==this.element[0]){return false}var E=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var F=A.data(this,"droppable");if(F.options.greedy&&A.ui.intersect(B,A.extend(F,{offset:F.element.offset()}),F.options.tolerance)){E=true;return false}});if(E){return false}if(this.options.accept.call(this.element,(B.currentItem||B.element))){A.ui.plugin.call(this,"drop",[C,this.ui(B)]);this.element.triggerHandler("drop",[C,this.ui(B)],this.options.drop);return this.element}return false},plugins:{},ui:function(B){return{draggable:(B.currentItem||B.element),helper:B.helper,position:B.position,absolutePosition:B.positionAbs,options:this.options,element:this.element}}});A.extend(A.ui.droppable,{version:"1.6",defaults:{accept:"*",activeClass:null,cssNamespace:"ui",greedy:false,hoverClass:null,scope:"default",tolerance:"intersect"}});A.ui.intersect=function(O,I,M){if(!I.offset){return false}var D=(O.positionAbs||O.position.absolute).left,C=D+O.helperProportions.width,L=(O.positionAbs||O.position.absolute).top,K=L+O.helperProportions.height;var F=I.offset.left,B=F+I.proportions.width,N=I.offset.top,J=N+I.proportions.height;switch(M){case"fit":return(F<D&&C<B&&N<L&&K<J);break;case"intersect":return(F<D+(O.helperProportions.width/2)&&C-(O.helperProportions.width/2)<B&&N<L+(O.helperProportions.height/2)&&K-(O.helperProportions.height/2)<J);break;case"pointer":var G=((O.positionAbs||O.position.absolute).left+(O.clickOffset||O.offset.click).left),H=((O.positionAbs||O.position.absolute).top+(O.clickOffset||O.offset.click).top),E=A.ui.isOver(H,G,N,F,I.proportions.height,I.proportions.width);return E;break;case"touch":return((L>=N&&L<=J)||(K>=N&&K<=J)||(L<N&&K>J))&&((D>=F&&D<=B)||(C>=F&&C<=B)||(D<F&&C>B));break;default:return false;break}};A.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(E,G){var B=A.ui.ddmanager.droppables[E.options.scope];var F=G?G.type:null;var H=(E.currentItem||E.element).find(":data(droppable)").andSelf();droppablesLoop:for(var D=0;D<B.length;D++){if(B[D].options.disabled||(E&&!B[D].options.accept.call(B[D].element,(E.currentItem||E.element)))){continue}for(var C=0;C<H.length;C++){if(H[C]==B[D].element[0]){B[D].proportions.height=0;continue droppablesLoop}}B[D].visible=B[D].element.css("display")!="none";if(!B[D].visible){continue}B[D].offset=B[D].element.offset();B[D].proportions={width:B[D].element[0].offsetWidth,height:B[D].element[0].offsetHeight};if(F=="dragstart"||F=="sortactivate"){B[D]._activate.call(B[D],G)}}},drop:function(B,C){var D=false;A.each(A.ui.ddmanager.droppables[B.options.scope],function(){if(!this.options){return }if(!this.options.disabled&&this.visible&&A.ui.intersect(B,this,this.options.tolerance)){D=this._drop.call(this,C)}if(!this.options.disabled&&this.visible&&this.options.accept.call(this.element,(B.currentItem||B.element))){this.isout=1;this.isover=0;this._deactivate.call(this,C)}});return D},drag:function(B,C){if(B.options.refreshPositions){A.ui.ddmanager.prepareOffsets(B,C)}A.each(A.ui.ddmanager.droppables[B.options.scope],function(){if(this.options.disabled||this.greedyChild||!this.visible){return }var E=A.ui.intersect(B,this,this.options.tolerance);var G=!E&&this.isover==1?"isout":(E&&this.isover==0?"isover":null);if(!G){return }var F;if(this.options.greedy){var D=this.element.parents(":data(droppable):eq(0)");if(D.length){F=A.data(D[0],"droppable");F.greedyChild=(G=="isover"?1:0)}}if(F&&G=="isover"){F["isover"]=0;F["isout"]=1;F._out.call(F,C)}this[G]=1;this[G=="isout"?"isover":"isout"]=0;this[G=="isover"?"_over":"_out"].call(this,C);if(F&&G=="isout"){F["isout"]=0;F["isover"]=1;F._over.call(F,C)}})}};A.ui.plugin.add("droppable","activeClass",{activate:function(B,C){A(this).addClass(C.options.activeClass)},deactivate:function(B,C){A(this).removeClass(C.options.activeClass)},drop:function(B,C){A(this).removeClass(C.options.activeClass)}});A.ui.plugin.add("droppable","hoverClass",{over:function(B,C){A(this).addClass(C.options.hoverClass)},out:function(B,C){A(this).removeClass(C.options.hoverClass)},drop:function(B,C){A(this).removeClass(C.options.hoverClass)}})})(jQuery);/*
+ * jQuery UI Accordion 1.6
+ *
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Accordion
+ *
+ * Depends:
+ *	ui.core.js
+ */
(function(E){E.widget("ui.accordion",{_init:function(){var H=this.options;if(H.navigation){var K=this.element.find("a").filter(H.navigationFilter);if(K.length){if(K.filter(H.header).length){H.active=K}else{H.active=K.parent().parent().prev();K.addClass("current")}}}H.headers=this.element.find(H.header);H.active=C(H.headers,H.active);if(E.browser.msie){this.element.find("a").css("zoom","1")}if(!this.element.hasClass("ui-accordion")){this.element.addClass("ui-accordion");E('<span class="ui-accordion-left"></span>').insertBefore(H.headers);E('<span class="ui-accordion-right"></span>').appendTo(H.headers);H.headers.addClass("ui-accordion-header")}var J;if(H.fillSpace){J=this.element.parent().height();H.headers.each(function(){J-=E(this).outerHeight()});var I=0;H.headers.next().each(function(){I=Math.max(I,E(this).innerHeight()-E(this).height())}).height(J-I)}else{if(H.autoHeight){J=0;H.headers.next().each(function(){J=Math.max(J,E(this).outerHeight())}).height(J)}}this.element.attr("role","tablist");var G=this;H.headers.attr("role","tab").bind("keydown",function(L){return G._keydown(L)}).next().attr("role","tabpanel");H.headers.not(H.active||"").attr("aria-expanded","false").attr("tabIndex","-1").next().hide();if(!H.active.length){H.headers.eq(0).attr("tabIndex","0")}else{H.active.attr("aria-expanded","true").attr("tabIndex","0").parent().andSelf().addClass(H.selectedClass)}if(!E.browser.safari){H.headers.find("a").attr("tabIndex","-1")}if(H.event){this.element.bind((H.event)+".accordion",F)}},destroy:function(){this.options.headers.parent().andSelf().removeClass(this.options.selectedClass);this.options.headers.prev(".ui-accordion-left").remove();this.options.headers.children(".ui-accordion-right").remove();this.options.headers.next().css("display","");if(this.options.fillSpace||this.options.autoHeight){this.options.headers.next().css("height","")}E.removeData(this.element[0],"accordion");this.element.removeClass("ui-accordion").unbind(".accordion")},_keydown:function(J){if(this.options.disabled||J.altKey||J.ctrlKey){return }var K=E.ui.keyCode;var I=this.options.headers.length;var G=this.options.headers.index(J.target);var H=false;switch(J.keyCode){case K.RIGHT:case K.DOWN:H=this.options.headers[(G+1)%I];break;case K.LEFT:case K.UP:H=this.options.headers[(G-1+I)%I];break;case K.SPACE:case K.ENTER:return F.call(this.element[0],{target:J.target})}if(H){E(J.target).attr("tabIndex","-1");E(H).attr("tabIndex","0");H.focus();return false}return true},activate:function(G){F.call(this.element[0],{target:C(this.options.headers,G)[0]})}});function B(H,G){return function(){return H.apply(G,arguments)}}function D(I){if(!E.data(this,"accordion")){return }var G=E.data(this,"accordion");var H=G.options;H.running=I?0:--H.running;if(H.running){return }if(H.clearStyle){H.toShow.add(H.toHide).css({height:"",overflow:""})}G._trigger("change",null,H.data)}function A(G,N,K,L,O){var Q=E.data(this,"accordion").options;Q.toShow=G;Q.toHide=N;Q.data=K;var H=B(D,this);E.data(this,"accordion")._trigger("changestart",null,Q.data);Q.running=N.size()===0?G.size():N.size();if(Q.animated){var J={};if(!Q.alwaysOpen&&L){J={toShow:E([]),toHide:N,complete:H,down:O,autoHeight:Q.autoHeight}}else{J={toShow:G,toHide:N,complete:H,down:O,autoHeight:Q.autoHeight}}if(!Q.proxied){Q.proxied=Q.animated}if(!Q.proxiedDuration){Q.proxiedDuration=Q.duration}Q.animated=E.isFunction(Q.proxied)?Q.proxied(J):Q.proxied;Q.duration=E.isFunction(Q.proxiedDuration)?Q.proxiedDuration(J):Q.proxiedDuration;var P=E.ui.accordion.animations,I=Q.duration,M=Q.animated;if(!P[M]){P[M]=function(R){this.slide(R,{easing:M,duration:I||700})}}P[M](J)}else{if(!Q.alwaysOpen&&L){G.toggle()}else{N.hide();G.show()}H(true)}N.prev().attr("aria-expanded","false").attr("tabIndex","-1");G.prev().attr("aria-expanded","true").attr("tabIndex","0").focus()}function F(L){var J=E.data(this,"accordion").options;if(J.disabled){return false}if(!L.target&&!J.alwaysOpen){J.active.parent().andSelf().toggleClass(J.selectedClass);var I=J.active.next(),M={options:J,newHeader:E([]),oldHeader:J.active,newContent:E([]),oldContent:I},G=(J.active=E([]));A.call(this,G,I,M);return false}var K=E(L.target);K=E(K.parents(J.header)[0]||K);var H=K[0]==J.active[0];if(J.running||(J.alwaysOpen&&H)){return false}if(!K.is(J.header)){return }J.active.parent().andSelf().toggleClass(J.selectedClass);if(!H){K.parent().andSelf().addClass(J.selectedClass)}var G=K.next(),I=J.active.next(),M={options:J,newHeader:H&&!J.alwaysOpen?E([]):K,oldHeader:J.active,newContent:H&&!J.alwaysOpen?E([]):G,oldContent:I},N=J.headers.index(J.active[0])>J.headers.index(K[0]);J.active=H?E([]):K;A.call(this,G,I,M,H,N);return false}function C(H,G){return G?typeof G=="number"?H.filter(":eq("+G+")"):H.not(H.not(G)):G===false?E([]):H.filter(":eq(0)")}E.extend(E.ui.accordion,{version:"1.6",defaults:{autoHeight:true,alwaysOpen:true,animated:"slide",event:"click",header:"a",navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()},running:0,selectedClass:"selected"},animations:{slide:function(G,J){G=E.extend({easing:"swing",duration:300},G,J);if(!G.toHide.size()){G.toShow.animate({height:"show"},G);return }var I=G.toHide.height(),L=G.toShow.height(),N=L/I,K=G.toShow.outerHeight()-G.toShow.height(),H=G.toShow.css("marginBottom"),M=G.toShow.css("overflow");tmargin=G.toShow.css("marginTop");G.toShow.css({height:0,overflow:"hidden",marginTop:0,marginBottom:-K}).show();G.toHide.filter(":hidden").each(G.complete).end().filter(":visible").animate({height:"hide"},{step:function(O){var P=(I-O)*N;if(E.browser.msie||E.browser.opera){P=Math.ceil(P)}G.toShow.height(P)},duration:G.duration,easing:G.easing,complete:function(){if(!G.autoHeight){G.toShow.css("height","auto")}G.toShow.css({marginTop:tmargin,marginBottom:H,overflow:M});G.complete()}})},bounceslide:function(G){this.slide(G,{easing:G.down?"easeOutBounce":"swing",duration:G.down?1000:200})},easeslide:function(G){this.slide(G,{easing:"easeinout",duration:700})}}})})(jQuery);/*
+ * jQuery UI Dialog 1.6
+ *
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Dialog
+ *
+ * Depends:
+ *	ui.core.js
+ *	ui.draggable.js
+ *	ui.resizable.js
+ */
(function(B){var A={dragStart:"start.draggable",drag:"drag.draggable",dragStop:"stop.draggable",maxHeight:"maxHeight.resizable",minHeight:"minHeight.resizable",maxWidth:"maxWidth.resizable",minWidth:"minWidth.resizable",resizeStart:"start.resizable",resize:"drag.resizable",resizeStop:"stop.resizable"};B.widget("ui.dialog",{_init:function(){this.originalTitle=this.element.attr("title");this.options.title=this.options.title||this.originalTitle;var M=this,N=this.options,F=this.element.removeAttr("title").addClass("ui-dialog-content").wrap("<div></div>").wrap("<div></div>"),I=(this.uiDialogContainer=F.parent()).addClass("ui-dialog-container").css({position:"relative",width:"100%",height:"100%"}),E=(this.uiDialogTitlebar=B("<div></div>")).addClass("ui-dialog-titlebar").mousedown(function(){M.moveToTop()}).prependTo(I),J=B('<a href="#"/>').addClass("ui-dialog-titlebar-close").attr("role","button").appendTo(E),G=(this.uiDialogTitlebarCloseText=B("<span/>")).text(N.closeText).appendTo(J),L=N.title||"&nbsp;",D=B.ui.dialog.getTitleId(this.element),C=B("<span/>").addClass("ui-dialog-title").attr("id",D).html(L).prependTo(E),K=(this.uiDialog=I.parent()).appendTo(document.body).hide().addClass("ui-dialog").addClass(N.dialogClass).css({position:"absolute",width:N.width,height:N.height,overflow:"hidden",zIndex:N.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(O){(N.closeOnEscape&&O.keyCode&&O.keyCode==B.ui.keyCode.ESCAPE&&M.close())}).attr({role:"dialog","aria-labelledby":D}).mouseup(function(){M.moveToTop()}),H=(this.uiDialogButtonPane=B("<div></div>")).addClass("ui-dialog-buttonpane").css({position:"absolute",bottom:0}).appendTo(K),J=B(".ui-dialog-titlebar-close",E).hover(function(){B(this).addClass("ui-dialog-titlebar-close-hover")},function(){B(this).removeClass("ui-dialog-titlebar-close-hover")}).mousedown(function(O){O.stopPropagation()}).click(function(){M.close();return false});E.find("*").add(E).disableSelection();(N.draggable&&B.fn.draggable&&this._makeDraggable());(N.resizable&&B.fn.resizable&&this._makeResizable());this._createButtons(N.buttons);this._isOpen=false;(N.bgiframe&&B.fn.bgiframe&&K.bgiframe());(N.autoOpen&&this.open())},destroy:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content").hide().appendTo("body");this.uiDialog.remove();(this.originalTitle&&this.element.attr("title",this.originalTitle))},close:function(){if(false===this._trigger("beforeclose",null,{options:this.options})){return }(this.overlay&&this.overlay.destroy());this.uiDialog.hide(this.options.hide).unbind("keypress.ui-dialog");this._trigger("close",null,{options:this.options});B.ui.dialog.overlay.resize();this._isOpen=false},isOpen:function(){return this._isOpen},moveToTop:function(F){if((this.options.modal&&!F)||(!this.options.stack&&!this.options.modal)){return this._trigger("focus",null,{options:this.options})}var E=this.options.zIndex,D=this.options;B(".ui-dialog:visible").each(function(){E=Math.max(E,parseInt(B(this).css("z-index"),10)||D.zIndex)});(this.overlay&&this.overlay.$el.css("z-index",++E));var C={scrollTop:this.element.attr("scrollTop"),scrollLeft:this.element.attr("scrollLeft")};this.uiDialog.css("z-index",++E);this.element.attr(C);this._trigger("focus",null,{options:this.options})},open:function(){if(this._isOpen){return }this.overlay=this.options.modal?new B.ui.dialog.overlay(this):null;(this.uiDialog.next().length&&this.uiDialog.appendTo("body"));this._position(this.options.position);this.uiDialog.show(this.options.show);(this.options.autoResize&&this._size());this.moveToTop(true);(this.options.modal&&this.uiDialog.bind("keypress.ui-dialog",function(E){if(E.keyCode!=B.ui.keyCode.TAB){return }var D=B(":tabbable",this),F=D.filter(":first")[0],C=D.filter(":last")[0];if(E.target==C&&!E.shiftKey){setTimeout(function(){F.focus()},1)}else{if(E.target==F&&E.shiftKey){setTimeout(function(){C.focus()},1)}}}));this.uiDialog.find(":tabbable:first").focus();this._trigger("open",null,{options:this.options});this._isOpen=true},_createButtons:function(F){var E=this,C=false,D=this.uiDialogButtonPane;D.empty().hide();B.each(F,function(){return !(C=true)});if(C){D.show();B.each(F,function(G,H){B('<button type="button"></button>').text(G).click(function(){H.apply(E.element[0],arguments)}).appendTo(D)})}},_makeDraggable:function(){var C=this,D=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content",helper:D.dragHelper,handle:".ui-dialog-titlebar",start:function(){C.moveToTop();(D.dragStart&&D.dragStart.apply(C.element[0],arguments))},drag:function(){(D.drag&&D.drag.apply(C.element[0],arguments))},stop:function(){(D.dragStop&&D.dragStop.apply(C.element[0],arguments));B.ui.dialog.overlay.resize()}})},_makeResizable:function(F){F=(F===undefined?this.options.resizable:F);var C=this,E=this.options,D=typeof F=="string"?F:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",helper:E.resizeHelper,maxWidth:E.maxWidth,maxHeight:E.maxHeight,minWidth:E.minWidth,minHeight:E.minHeight,start:function(){(E.resizeStart&&E.resizeStart.apply(C.element[0],arguments))},resize:function(){(E.autoResize&&C._size.apply(C));(E.resize&&E.resize.apply(C.element[0],arguments))},handles:D,stop:function(){(E.autoResize&&C._size.apply(C));(E.resizeStop&&E.resizeStop.apply(C.element[0],arguments));B.ui.dialog.overlay.resize()}})},_position:function(H){var D=B(window),E=B(document),F=E.scrollTop(),C=E.scrollLeft(),G=F;if(B.inArray(H,["center","top","right","bottom","left"])>=0){H=[H=="right"||H=="left"?H:"center",H=="top"||H=="bottom"?H:"middle"]}if(H.constructor!=Array){H=["center","middle"]}if(H[0].constructor==Number){C+=H[0]}else{switch(H[0]){case"left":C+=0;break;case"right":C+=D.width()-this.uiDialog.outerWidth();break;default:case"center":C+=(D.width()-this.uiDialog.outerWidth())/2}}if(H[1].constructor==Number){F+=H[1]}else{switch(H[1]){case"top":F+=0;break;case"bottom":F+=(B.browser.opera?window.innerHeight:D.height())-this.uiDialog.outerHeight();break;default:case"middle":F+=((B.browser.opera?window.innerHeight:D.height())-this.uiDialog.outerHeight())/2}}F=Math.max(F,G);this.uiDialog.css({top:F,left:C})},_setData:function(D,E){(A[D]&&this.uiDialog.data(A[D],E));switch(D){case"buttons":this._createButtons(E);break;case"closeText":this.uiDialogTitlebarCloseText.text(E);break;case"draggable":(E?this._makeDraggable():this.uiDialog.draggable("destroy"));break;case"height":this.uiDialog.height(E);break;case"position":this._position(E);break;case"resizable":var C=this.uiDialog,F=this.uiDialog.is(":data(resizable)");(F&&!E&&C.resizable("destroy"));(F&&typeof E=="string"&&C.resizable("option","handles",E));(F||this._makeResizable(E));break;case"title":B(".ui-dialog-title",this.uiDialogTitlebar).html(E||"&nbsp;");break;case"width":this.uiDialog.width(E);break}B.widget.prototype._setData.apply(this,arguments)},_size:function(){var D=this.uiDialogContainer,G=this.uiDialogTitlebar,E=this.element,F=(parseInt(E.css("margin-top"),10)||0)+(parseInt(E.css("margin-bottom"),10)||0),C=(parseInt(E.css("margin-left"),10)||0)+(parseInt(E.css("margin-right"),10)||0);E.height(D.height()-G.outerHeight()-F);E.width(D.width()-C)}});B.extend(B.ui.dialog,{version:"1.6",defaults:{autoOpen:true,autoResize:true,bgiframe:false,buttons:{},closeOnEscape:true,closeText:"close",draggable:true,height:200,minHeight:100,minWidth:150,modal:false,overlay:{},position:"center",resizable:true,stack:true,width:300,zIndex:1000},getter:"isOpen",uuid:0,getTitleId:function(C){return"ui-dialog-title-"+(C.attr("id")||++this.uuid)},overlay:function(C){this.$el=B.ui.dialog.overlay.create(C)}});B.extend(B.ui.dialog.overlay,{instances:[],events:B.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(C){return C+".dialog-overlay"}).join(" "),create:function(D){if(this.instances.length===0){setTimeout(function(){B("a, :input").bind(B.ui.dialog.overlay.events,function(){var F=false;var H=B(this).parents(".ui-dialog");if(H.length){var E=B(".ui-dialog-overlay");if(E.length){var G=parseInt(E.css("z-index"),10);E.each(function(){G=Math.max(G,parseInt(B(this).css("z-index"),10))});F=parseInt(H.css("z-index"),10)>G}else{F=true}}return F})},1);B(document).bind("keydown.dialog-overlay",function(E){(D.options.closeOnEscape&&E.keyCode&&E.keyCode==B.ui.keyCode.ESCAPE&&D.close())});B(window).bind("resize.dialog-overlay",B.ui.dialog.overlay.resize)}var C=B("<div></div>").appendTo(document.body).addClass("ui-dialog-overlay").css(B.extend({borderWidth:0,margin:0,padding:0,position:"absolute",top:0,left:0,width:this.width(),height:this.height()},D.options.overlay));(D.options.bgiframe&&B.fn.bgiframe&&C.bgiframe());this.instances.push(C);return C},destroy:function(C){this.instances.splice(B.inArray(this.instances,C),1);if(this.instances.length===0){B("a, :input").add([document,window]).unbind(".dialog-overlay")}C.remove()},height:function(){if(B.browser.msie&&B.browser.version<7){var D=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var C=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(D<C){return B(window).height()+"px"}else{return D+"px"}}else{if(B.browser.opera){return Math.max(window.innerHeight,B(document).height())+"px"}else{return B(document).height()+"px"}}},width:function(){if(B.browser.msie&&B.browser.version<7){var C=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);var D=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(C<D){return B(window).width()+"px"}else{return C+"px"}}else{if(B.browser.opera){return Math.max(window.innerWidth,B(document).width())+"px"}else{return B(document).width()+"px"}}},resize:function(){var C=B([]);B.each(B.ui.dialog.overlay.instances,function(){C=C.add(this)});C.css({width:0,height:0}).css({width:B.ui.dialog.overlay.width(),height:B.ui.dialog.overlay.height()})}});B.extend(B.ui.dialog.overlay.prototype,{destroy:function(){B.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);/*
+ * jQuery UI Slider 1.6
+ *
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Slider
+ *
+ * Depends:
+ *	ui.core.js
+ */
(function(A){A.fn.unwrap=A.fn.unwrap||function(B){return this.each(function(){A(this).parents(B).eq(0).after(this).remove()})};A.widget("ui.slider",{_init:function(){var B=this;this.element.addClass("ui-slider");this._initBoundaries();this.handle=A(this.options.handle,this.element);if(!this.handle.length){B.handle=B.generated=A(B.options.handles||[0]).map(function(){var D=A("<div/>").addClass("ui-slider-handle").appendTo(B.element);if(this.id){D.attr("id",this.id)}return D[0]})}var C=function(D){this.element=A(D);this.element.data("mouse",this);this.options=B.options;this.element.bind("mousedown",function(){if(B.currentHandle){this.blur(B.currentHandle)}B._focus(this,true)});this._mouseInit()};A.extend(C.prototype,A.ui.mouse,{_mouseCapture:function(){return true},_mouseStart:function(D){return B._start.call(B,D,this.element[0])},_mouseDrag:function(D){return B._drag.call(B,D,this.element[0])},_mouseStop:function(D){return B._stop.call(B,D,this.element[0])},trigger:function(D){this._mouseDown(D)}});A(this.handle).each(function(){new C(this)}).wrap('<a href="#" style="outline:none;border:none;"></a>').parent().bind("click",function(){return false}).bind("focus",function(D){B._focus(this.firstChild)}).bind("blur",function(D){B._blur(this.firstChild)}).bind("keydown",function(D){if(!B.options.noKeyboard){return B._keydown(D.keyCode,this.firstChild)}});this.element.bind("mousedown.slider",function(D){if(A(D.target).is(".ui-slider-handle")){return }B._click.apply(B,[D]);B.currentHandle.data("mouse").trigger(D);B.firstValue=B.firstValue+1});A.each(this.options.handles||[],function(D,E){B.moveTo(E.start,D,true)});if(!isNaN(this.options.startValue)){this.moveTo(this.options.startValue,0,true)}this.previousHandle=A(this.handle[0]);if(this.handle.length==2&&this.options.range){this._createRange()}},destroy:function(){this.element.removeClass("ui-slider ui-slider-disabled").removeData("slider").unbind(".slider");if(this.handle&&this.handle.length){this.handle.unwrap("a");this.handle.each(function(){var B=A(this).data("mouse");B&&B._mouseDestroy()})}this.generated&&this.generated.remove()},_start:function(B,C){var D=this.options;if(D.disabled){return false}this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};if(!this.currentHandle){this._focus(this.previousHandle,true)}this.offset=this.element.offset();this.handleOffset=this.currentHandle.offset();this.clickOffset={top:B.pageY-this.handleOffset.top,left:B.pageX-this.handleOffset.left};this.firstValue=this.value();this._propagate("start",B);this._drag(B,C);return true},_drag:function(C,E){var F=this.options;var B={top:C.pageY-this.offset.top-this.clickOffset.top,left:C.pageX-this.offset.left-this.clickOffset.left};if(!this.currentHandle){this._focus(this.previousHandle,true)}B.left=this._translateLimits(B.left,"x");B.top=this._translateLimits(B.top,"y");if(F.stepping.x){var D=this._convertValue(B.left,"x");D=this._round(D/F.stepping.x)*F.stepping.x;B.left=this._translateValue(D,"x")}if(F.stepping.y){var D=this._convertValue(B.top,"y");D=this._round(D/F.stepping.y)*F.stepping.y;B.top=this._translateValue(D,"y")}B.left=this._translateRange(B.left,"x");B.top=this._translateRange(B.top,"y");if(F.axis!="vertical"){this.currentHandle.css({left:B.left})}if(F.axis!="horizontal"){this.currentHandle.css({top:B.top})}this.currentHandle.data("mouse").sliderValue={x:this._round(this._convertValue(B.left,"x"))||0,y:this._round(this._convertValue(B.top,"y"))||0};if(this.rangeElement){this._updateRange()}this._propagate("slide",C);return false},_stop:function(B){this._propagate("stop",B);if(this.firstValue!=this.value()){this._propagate("change",B)}this._focus(this.currentHandle,true);return false},_round:function(B){return this.options.round?parseInt(B,10):parseFloat(B)},_setData:function(B,C){A.widget.prototype._setData.apply(this,arguments);if(/min|max|steps/.test(B)){this._initBoundaries()}if(B=="range"){C?this.handle.length==2&&this._createRange():this._removeRange()}},_initBoundaries:function(){var B=this.element[0],C=this.options;this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};A.extend(C,{axis:C.axis||(B.offsetWidth<B.offsetHeight?"vertical":"horizontal"),max:!isNaN(parseInt(C.max,10))?{x:parseInt(C.max,10),y:parseInt(C.max,10)}:({x:C.max&&C.max.x||100,y:C.max&&C.max.y||100}),min:!isNaN(parseInt(C.min,10))?{x:parseInt(C.min,10),y:parseInt(C.min,10)}:({x:C.min&&C.min.x||0,y:C.min&&C.min.y||0})});C.realMax={x:C.max.x-C.min.x,y:C.max.y-C.min.y};C.stepping={x:C.stepping&&C.stepping.x||parseInt(C.stepping,10)||(C.steps?C.realMax.x/(C.steps.x||parseInt(C.steps,10)||C.realMax.x):0),y:C.stepping&&C.stepping.y||parseInt(C.stepping,10)||(C.steps?C.realMax.y/(C.steps.y||parseInt(C.steps,10)||C.realMax.y):0)}},_keydown:function(F,E){if(this.options.disabled){return }var C=F;if(/(33|34|35|36|37|38|39|40)/.test(C)){var G=this.options,B,I;if(/(35|36)/.test(C)){B=(C==35)?G.max.x:G.min.x;I=(C==35)?G.max.y:G.min.y}else{var H=/(34|37|40)/.test(C)?"-=":"+=";var D=/(37|38|39|40)/.test(C)?"_oneStep":"_pageStep";B=H+this[D]("x");I=H+this[D]("y")}this.moveTo({x:B,y:I},E);return false}return true},_focus:function(B,C){this.currentHandle=A(B).addClass("ui-slider-handle-active");if(C){this.currentHandle.parent()[0].focus()}},_blur:function(B){A(B).removeClass("ui-slider-handle-active");if(this.currentHandle&&this.currentHandle[0]==B){this.previousHandle=this.currentHandle;this.currentHandle=null}},_click:function(C){var D=[C.pageX,C.pageY];var B=false;this.handle.each(function(){if(this==C.target){B=true}});if(B||this.options.disabled||!(this.currentHandle||this.previousHandle)){return }if(!this.currentHandle&&this.previousHandle){this._focus(this.previousHandle,true)}this.offset=this.element.offset();this.moveTo({y:this._convertValue(C.pageY-this.offset.top-this.currentHandle[0].offsetHeight/2,"y"),x:this._convertValue(C.pageX-this.offset.left-this.currentHandle[0].offsetWidth/2,"x")},null,!this.options.distance)},_createRange:function(){if(this.rangeElement){return }this.rangeElement=A("<div></div>").addClass("ui-slider-range").css({position:"absolute"}).appendTo(this.element);this._updateRange()},_removeRange:function(){this.rangeElement.remove();this.rangeElement=null},_updateRange:function(){var C=this.options.axis=="vertical"?"top":"left";var B=this.options.axis=="vertical"?"height":"width";this.rangeElement.css(C,(this._round(A(this.handle[0]).css(C))||0)+this._handleSize(0,this.options.axis=="vertical"?"y":"x")/2);this.rangeElement.css(B,(this._round(A(this.handle[1]).css(C))||0)-(this._round(A(this.handle[0]).css(C))||0))},_getRange:function(){return this.rangeElement?this._convertValue(this._round(this.rangeElement.css(this.options.axis=="vertical"?"height":"width")),this.options.axis=="vertical"?"y":"x"):null},_handleIndex:function(){return this.handle.index(this.currentHandle[0])},value:function(D,B){if(this.handle.length==1){this.currentHandle=this.handle}if(!B){B=this.options.axis=="vertical"?"y":"x"}var C=A(D!=undefined&&D!==null?this.handle[D]||D:this.currentHandle);if(C.data("mouse").sliderValue){return this._round(C.data("mouse").sliderValue[B])}else{return this._round(((this._round(C.css(B=="x"?"left":"top"))/(this.actualSize[B=="x"?"width":"height"]-this._handleSize(D,B)))*this.options.realMax[B])+this.options.min[B])}},_convertValue:function(C,B){return this.options.min[B]+(C/(this.actualSize[B=="x"?"width":"height"]-this._handleSize(null,B)))*this.options.realMax[B]},_translateValue:function(C,B){return((C-this.options.min[B])/this.options.realMax[B])*(this.actualSize[B=="x"?"width":"height"]-this._handleSize(null,B))},_translateRange:function(D,B){if(this.rangeElement){if(this.currentHandle[0]==this.handle[0]&&D>=this._translateValue(this.value(1),B)){D=this._translateValue(this.value(1,B)-this._oneStep(B),B)}if(this.currentHandle[0]==this.handle[1]&&D<=this._translateValue(this.value(0),B)){D=this._translateValue(this.value(0,B)+this._oneStep(B),B)}}if(this.options.handles){var C=this.options.handles[this._handleIndex()];if(D<this._translateValue(C.min,B)){D=this._translateValue(C.min,B)}else{if(D>this._translateValue(C.max,B)){D=this._translateValue(C.max,B)}}}return D},_translateLimits:function(C,B){if(C>=this.actualSize[B=="x"?"width":"height"]-this._handleSize(null,B)){C=this.actualSize[B=="x"?"width":"height"]-this._handleSize(null,B)}if(C<=0){C=0}return C},_handleSize:function(C,B){return A(C!=undefined&&C!==null?this.handle[C]:this.currentHandle)[0]["offset"+(B=="x"?"Width":"Height")]},_oneStep:function(B){return this.options.stepping[B]||1},_pageStep:function(B){return 10},moveTo:function(F,E,G){var H=this.options;this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};if(E==undefined&&!this.currentHandle&&this.handle.length!=1){return false}if(E==undefined&&!this.currentHandle){E=0}if(E!=undefined){this.currentHandle=this.previousHandle=A(this.handle[E]||E)}if(F.x!==undefined&&F.y!==undefined){var B=F.x,I=F.y}else{var B=F,I=F}if(B!==undefined&&B.constructor!=Number){var D=/^\-\=/.test(B),C=/^\+\=/.test(B);if(D||C){B=this.value(null,"x")+this._round(B.replace(D?"=":"+=",""))}else{B=isNaN(this._round(B))?undefined:this._round(B)}}if(I!==undefined&&I.constructor!=Number){var D=/^\-\=/.test(I),C=/^\+\=/.test(I);if(D||C){I=this.value(null,"y")+this._round(I.replace(D?"=":"+=",""))}else{I=isNaN(this._round(I))?undefined:this._round(I)}}if(H.axis!="vertical"&&B!==undefined){if(H.stepping.x){B=this._round(B/H.stepping.x)*H.stepping.x}B=this._translateValue(B,"x");B=this._translateLimits(B,"x");B=this._translateRange(B,"x");H.animate?this.currentHandle.stop().animate({left:B},(Math.abs(parseInt(this.currentHandle.css("left"),10)-B))*(!isNaN(parseInt(H.animate,10))?H.animate:5)):this.currentHandle.css({left:B})}if(H.axis!="horizontal"&&I!==undefined){if(H.stepping.y){I=this._round(I/H.stepping.y)*H.stepping.y}I=this._translateValue(I,"y");I=this._translateLimits(I,"y");I=this._translateRange(I,"y");H.animate?this.currentHandle.stop().animate({top:I},(Math.abs(parseInt(this.currentHandle.css("top"),10)-I))*(!isNaN(parseInt(H.animate,10))?H.animate:5)):this.currentHandle.css({top:I})}if(this.rangeElement){this._updateRange()}this.currentHandle.data("mouse").sliderValue={x:this._round(this._convertValue(B,"x"))||0,y:this._round(this._convertValue(I,"y"))||0};if(!G){this._propagate("start",null);this._propagate("slide",null);this._propagate("stop",null);this._propagate("change",null)}},_propagate:function(C,B){A.ui.plugin.call(this,C,[B,this.ui()]);this.element.triggerHandler(C=="slide"?C:"slide"+C,[B,this.ui()],this.options[C])},plugins:{},ui:function(B){return{options:this.options,handle:this.currentHandle,value:this.options.axis!="both"||!this.options.axis?this._round(this.value(null,this.options.axis=="vertical"?"y":"x")):{x:this._round(this.value(null,"x")),y:this._round(this.value(null,"y"))},range:this._getRange()}}});A.extend(A.ui.slider,{getter:"value",version:"1.6",defaults:{animate:false,distance:1,handle:".ui-slider-handle",round:true}})})(jQuery);/*
+ * jQuery UI Tabs 1.6
+ *
+ * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Tabs
+ *
+ * Depends:
+ *	ui.core.js
+ */
(function(A){A.widget("ui.tabs",{_init:function(){this._tabify(true)},destroy:function(){var B=this.options;this.element.unbind(".tabs").removeClass(B.navClass).removeData("tabs");this.$tabs.each(function(){var C=A.data(this,"href.tabs");if(C){this.href=C}var D=A(this).unbind(".tabs");A.each(["href","load","cache"],function(E,F){D.removeData(F+".tabs")})});this.$lis.add(this.$panels).each(function(){if(A.data(this,"destroy.tabs")){A(this).remove()}else{A(this).removeClass([B.selectedClass,B.deselectableClass,B.disabledClass,B.panelClass,B.hideClass].join(" "))}});if(B.cookie){this._cookie(null,B.cookie)}},_setData:function(B,C){if((/^selected/).test(B)){this.select(C)}else{this.options[B]=C;this._tabify()}},length:function(){return this.$tabs.length},_tabId:function(B){return B.title&&B.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+A.data(B)},_sanitizeSelector:function(B){return B.replace(/:/g,"\\:")},_cookie:function(){var B=this.cookie||(this.cookie="ui-tabs-"+A.data(this.element[0]));return A.cookie.apply(null,[B].concat(A.makeArray(arguments)))},_tabify:function(N){this.$lis=A("li:has(a[href])",this.element);this.$tabs=this.$lis.map(function(){return A("a",this)[0]});this.$panels=A([]);var O=this,C=this.options;this.$tabs.each(function(Q,P){if(P.hash&&P.hash.replace("#","")){O.$panels=O.$panels.add(O._sanitizeSelector(P.hash))}else{if(A(P).attr("href")!="#"){A.data(P,"href.tabs",P.href);A.data(P,"load.tabs",P.href);var S=O._tabId(P);P.href="#"+S;var R=A("#"+S);if(!R.length){R=A(C.panelTemplate).attr("id",S).addClass(C.panelClass).insertAfter(O.$panels[Q-1]||O.element);R.data("destroy.tabs",true)}O.$panels=O.$panels.add(R)}else{C.disabled.push(Q+1)}}});if(N){this.element.addClass(C.navClass);this.$panels.addClass(C.panelClass);if(C.selected===undefined){if(location.hash){this.$tabs.each(function(Q,P){if(P.hash==location.hash){C.selected=Q;return false}})}else{if(C.cookie){var I=parseInt(O._cookie(),10);if(I&&O.$tabs[I]){C.selected=I}}else{if(O.$lis.filter("."+C.selectedClass).length){C.selected=O.$lis.index(O.$lis.filter("."+C.selectedClass)[0])}}}}C.selected=C.selected===null||C.selected!==undefined?C.selected:0;C.disabled=A.unique(C.disabled.concat(A.map(this.$lis.filter("."+C.disabledClass),function(Q,P){return O.$lis.index(Q)}))).sort();if(A.inArray(C.selected,C.disabled)!=-1){C.disabled.splice(A.inArray(C.selected,C.disabled),1)}this.$panels.addClass(C.hideClass);this.$lis.removeClass(C.selectedClass);if(C.selected!==null){this.$panels.eq(C.selected).removeClass(C.hideClass);var E=[C.selectedClass];if(C.deselectable){E.push(C.deselectableClass)}this.$lis.eq(C.selected).addClass(E.join(" "));var J=function(){O._trigger("show",null,O.ui(O.$tabs[C.selected],O.$panels[C.selected]))};if(A.data(this.$tabs[C.selected],"load.tabs")){this.load(C.selected,J)}else{J()}}A(window).bind("unload",function(){O.$tabs.unbind(".tabs");O.$lis=O.$tabs=O.$panels=null})}else{C.selected=this.$lis.index(this.$lis.filter("."+C.selectedClass)[0])}if(C.cookie){this._cookie(C.selected,C.cookie)}for(var G=0,M;M=this.$lis[G];G++){A(M)[A.inArray(G,C.disabled)!=-1&&!A(M).hasClass(C.selectedClass)?"addClass":"removeClass"](C.disabledClass)}if(C.cache===false){this.$tabs.removeData("cache.tabs")}var B,H;if(C.fx){if(C.fx.constructor==Array){B=C.fx[0];H=C.fx[1]}else{B=H=C.fx}}function D(P,Q){P.css({display:""});if(A.browser.msie&&Q.opacity){P[0].style.removeAttribute("filter")}}var K=H?function(P,Q){Q.animate(H,H.duration||"normal",function(){Q.removeClass(C.hideClass);D(Q,H);O._trigger("show",null,O.ui(P,Q[0]))})}:function(P,Q){Q.removeClass(C.hideClass);O._trigger("show",null,O.ui(P,Q[0]))};var L=B?function(Q,P,R){P.animate(B,B.duration||"normal",function(){P.addClass(C.hideClass);D(P,B);if(R){K(Q,R,P)}})}:function(Q,P,R){P.addClass(C.hideClass);if(R){K(Q,R)}};function F(R,T,P,S){var Q=[C.selectedClass];if(C.deselectable){Q.push(C.deselectableClass)}T.addClass(Q.join(" ")).siblings().removeClass(Q.join(" "));L(R,P,S)}this.$tabs.unbind(".tabs").bind(C.event+".tabs",function(){var S=A(this).parents("li:eq(0)"),P=O.$panels.filter(":visible"),R=A(O._sanitizeSelector(this.hash));if((S.hasClass(C.selectedClass)&&!C.deselectable)||S.hasClass(C.disabledClass)||A(this).hasClass(C.loadingClass)||O._trigger("select",null,O.ui(this,R[0]))===false){this.blur();return false}C.selected=O.$tabs.index(this);if(C.deselectable){if(S.hasClass(C.selectedClass)){O.options.selected=null;S.removeClass([C.selectedClass,C.deselectableClass].join(" "));O.$panels.stop();L(this,P);this.blur();return false}else{if(!P.length){O.$panels.stop();var Q=this;O.load(O.$tabs.index(this),function(){S.addClass([C.selectedClass,C.deselectableClass].join(" "));K(Q,R)});this.blur();return false}}}if(C.cookie){O._cookie(C.selected,C.cookie)}O.$panels.stop();if(R.length){var Q=this;O.load(O.$tabs.index(this),P.length?function(){F(Q,S,P,R)}:function(){S.addClass(C.selectedClass);K(Q,R)})}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(A.browser.msie){this.blur()}return false});if(C.event!="click"){this.$tabs.bind("click.tabs",function(){return false})}},add:function(E,D,C){if(C==undefined){C=this.$tabs.length}var G=this.options;var I=A(G.tabTemplate.replace(/#\{href\}/g,E).replace(/#\{label\}/g,D));I.data("destroy.tabs",true);var H=E.indexOf("#")==0?E.replace("#",""):this._tabId(A("a:first-child",I)[0]);var F=A("#"+H);if(!F.length){F=A(G.panelTemplate).attr("id",H).addClass(G.hideClass).data("destroy.tabs",true)}F.addClass(G.panelClass);if(C>=this.$lis.length){I.appendTo(this.element);F.appendTo(this.element[0].parentNode)}else{I.insertBefore(this.$lis[C]);F.insertBefore(this.$panels[C])}G.disabled=A.map(G.disabled,function(K,J){return K>=C?++K:K});this._tabify();if(this.$tabs.length==1){I.addClass(G.selectedClass);F.removeClass(G.hideClass);var B=A.data(this.$tabs[0],"load.tabs");if(B){this.load(C,B)}}this._trigger("add",null,this.ui(this.$tabs[C],this.$panels[C]))},remove:function(B){var D=this.options,E=this.$lis.eq(B).remove(),C=this.$panels.eq(B).remove();if(E.hasClass(D.selectedClass)&&this.$tabs.length>1){this.select(B+(B+1<this.$tabs.length?1:-1))}D.disabled=A.map(A.grep(D.disabled,function(G,F){return G!=B}),function(G,F){return G>=B?--G:G});this._tabify();this._trigger("remove",null,this.ui(E.find("a")[0],C[0]))},enable:function(B){var C=this.options;if(A.inArray(B,C.disabled)==-1){return }var D=this.$lis.eq(B).removeClass(C.disabledClass);if(A.browser.safari){D.css("display","inline-block");setTimeout(function(){D.css("display","block")},0)}C.disabled=A.grep(C.disabled,function(F,E){return F!=B});this._trigger("enable",null,this.ui(this.$tabs[B],this.$panels[B]))},disable:function(C){var B=this,D=this.options;if(C!=D.selected){this.$lis.eq(C).addClass(D.disabledClass);D.disabled.push(C);D.disabled.sort();this._trigger("disable",null,this.ui(this.$tabs[C],this.$panels[C]))}},select:function(B){if(typeof B=="string"){B=this.$tabs.index(this.$tabs.filter("[href$="+B+"]")[0])}this.$tabs.eq(B).trigger(this.options.event+".tabs")},load:function(G,K){var L=this,D=this.options,E=this.$tabs.eq(G),J=E[0],H=K==undefined||K===false,B=E.data("load.tabs");K=K||function(){};if(!B||!H&&A.data(J,"cache.tabs")){K();return }var M=function(N){var O=A(N),P=O.find("*:last");return P.length&&P.is(":not(img)")&&P||O};var C=function(){L.$tabs.filter("."+D.loadingClass).removeClass(D.loadingClass).each(function(){if(D.spinner){M(this).parent().html(M(this).data("label.tabs"))}});L.xhr=null};if(D.spinner){var I=M(J).html();M(J).wrapInner("<em></em>").find("em").data("label.tabs",I).html(D.spinner)}var F=A.extend({},D.ajaxOptions,{url:B,success:function(P,N){A(L._sanitizeSelector(J.hash)).html(P);C();if(D.cache){A.data(J,"cache.tabs",true)}L._trigger("load",null,L.ui(L.$tabs[G],L.$panels[G]));try{D.ajaxOptions.success(P,N)}catch(O){}K()}});if(this.xhr){this.xhr.abort();C()}E.addClass(D.loadingClass);L.xhr=A.ajax(F)},url:function(C,B){this.$tabs.eq(C).removeData("cache.tabs").data("load.tabs",B)},ui:function(C,B){return{options:this.options,tab:C,panel:B,index:this.$tabs.index(C)}}});A.extend(A.ui.tabs,{version:"1.6",getter:"length",defaults:{ajaxOptions:null,cache:false,cookie:null,deselectable:false,deselectableClass:"ui-tabs-deselectable",disabled:[],disabledClass:"ui-tabs-disabled",event:"click",fx:null,hideClass:"ui-tabs-hide",idPrefix:"ui-tabs-",loadingClass:"ui-tabs-loading",navClass:"ui-tabs-nav",panelClass:"ui-tabs-panel",panelTemplate:"<div></div>",selectedClass:"ui-tabs-selected",spinner:"Loading&#8230;",tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>'}});A.extend(A.ui.tabs.prototype,{rotation:null,rotate:function(C,F){F=F||false;var B=this,E=this.options.selected;function G(){B.rotation=setInterval(function(){E=++E<B.$tabs.length?E:0;B.select(E)},C)}function D(H){if(!H||H.clientX){clearInterval(B.rotation)}}if(C){G();if(!F){this.$tabs.bind(this.options.event+".tabs",D)}else{this.$tabs.bind(this.options.event+".tabs",function(){D();E=B.options.selected;G()})}}else{D();this.$tabs.unbind(this.options.event+".tabs",D)}}})})(jQuery);
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/preview/script/lib/console.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,121 @@
+//	for console support
+if ((typeof window.parent.console == 'undefined') || ( (/AppleWebKit/i.test(navigator.userAgent)) && !(/Version/i.test(navigator.userAgent))) ){
+	window.console = {
+	
+			sprintf: function(args){
+				if (typeof args == 'undefined') {
+					return null;
+				}
+				
+				if (args.length < 1) {
+					return null;
+				};
+				
+				if (typeof args[0] != 'string') {
+					return null;
+				}
+				
+				if (typeof RegExp == 'undefined') {
+					return null;
+				}
+				
+				if (args.length == 1) {
+					return args[0];
+				}
+				
+				
+				var str = args[0];
+				var newString = args[0];
+				var arr = new Array();
+				var exp = new RegExp(/[^%](%)([a-zA-Z])/g);
+				var match = null;
+				var lastMatch = 0;
+				var argPos = 1;
+				while (match = exp.exec(str) && argPos < args.length) {
+					if (str[exp.lastIndex - 1] == "%") {
+						
+					}
+					else 
+						if (str[exp.lastIndex - 1] == "d") {
+							arr.push(str.substring(lastMatch, exp.lastIndex - 2));
+							arr.push(args[argPos++]);
+						}
+						else 
+							if (str[exp.lastIndex - 1] == "i") {
+								arr.push(str.substring(lastMatch, exp.lastIndex - 2));
+								arr.push(args[argPos++]);
+							}
+							else 
+								if (str[exp.lastIndex - 1] == "f") {
+									arr.push(str.substring(lastMatch, exp.lastIndex - 2));
+									arr.push(args[argPos++]);
+								}
+								else 
+									if (str[exp.lastIndex - 1] == "s") {
+										arr.push(str.substring(lastMatch, exp.lastIndex - 2));
+										arr.push(args[argPos++]);
+									}
+									else 
+										if (str[exp.lastIndex - 1] != "%") {
+											arr.push(str.substring(lastMatch, exp.lastIndex - 2));
+											arr.push("\"");
+											arr.push(args[argPos++]);
+											arr.push("\"");
+										}
+					lastMatch = exp.lastIndex;
+				}
+				if (lastMatch < str.length) {
+					arr.push(str.substring(lastMatch, str.length));
+				}
+				while (argPos < args.length) {
+					arr.push(" ");
+					arr.push(args[argPos++]);
+				}
+				return arr.join("").replace(/\%\%/g,"%");
+			},
+		error: function(){
+			var errorStr = console.sprintf(arguments);
+			if (errorStr) {
+				_BRIDGE_REF.nokia.layout.log('error', errorStr);
+			}
+		},
+		info: function(){
+			var errorStr = console.sprintf(arguments);
+			if (errorStr) {
+				_BRIDGE_REF.nokia.layout.log('info', errorStr);
+			}
+		},
+		warn: function(){
+			var errorStr = console.sprintf(arguments);
+			if (errorStr) {
+				_BRIDGE_REF.nokia.layout.log('warn', errorStr);
+			}
+		},
+		log: function(){
+			var errorStr = console.sprintf(arguments);
+			if (errorStr) {
+				_BRIDGE_REF.nokia.layout.log('log', errorStr);
+			}
+		},
+		debug: function(){
+			var errorStr = console.sprintf(arguments);
+			if (errorStr) {
+				_BRIDGE_REF.nokia.layout.log('debug', errorStr);
+			}
+		},
+		assert: function(){
+			var errorStr = console.sprintf(arguments);
+			if (errorStr) {
+				//	@todo
+			}
+		}
+	}
+	
+	//	enable the Console.
+	_BRIDGE_REF.nokia.layout._console_enabled = true;
+	_BRIDGE_REF.nokia.layout.render();
+
+}
+
+//	make TRUE console.js script loaded
+window.parent.NOKIA.scriptsLoaded.console = true;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/preview/script/lib/device.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,544 @@
+/**
+ * device.js
+ * 
+ * Nokia Web Runtime Service API emulation 
+ * WRT v1.1
+ * 
+ * Copyright 2009 Nokia Corporation. All rights reserved.
+*/
+
+
+/**
+ * device object. entry point to device service API (SAPI)
+ */
+var device = {
+	/**
+	 * device API public method
+	 * 
+	 * @method
+	 * @param {string} provider Name of service provider, eg, "Service.Calendar"
+	 * @param {string} Interface Name of interface, eg, "IDataSource"
+	 * @return {Object} service object  
+	 */
+	getServiceObject: function(provider, Interface){
+
+		if (!device.implementation.context)
+			throw 'device implementation object not instantiated!'
+
+		if (device.implementation.options.enabled) 
+			return device.implementation.getInterface(provider, Interface);
+		else {
+			device.implementation.context.notify('device SAPI is disabled.');
+			throw 'device not defined!';
+		}
+	}
+};
+
+
+
+/**
+ * implementation of device emulation mode
+ * 
+ * @param {String} 		version - version number (default: current version)
+ * @return {Object} 	returns new implementation context object 
+ * @constructor 		
+ */
+device.implementation = function(version){
+
+	this.version = version || '';
+	
+	// set context to current object
+	device.implementation.context = this;	
+
+	var libpath = 'preview/script/lib/',
+		datapath = 'preview/data/';
+	
+	// load implementation files
+	// this is done async by the browser engine, so be aware of sync conditions!!
+	if (version == '1')
+		loadSAPI(libpath + 'sapi1/');
+	else if (!version)
+		loadSAPI();
+	else
+		throw 'unsuppported SAPI version!';
+	
+	function loadSAPI(path){
+		var path = path || (libpath + "sapi/");
+		
+		// load API
+		loadScript(path + "AppManager.js");
+		loadScript(path + "Calendar.js");
+		loadScript(path + "Contact.js");
+		loadScript(path + "Landmarks.js");
+		loadScript(path + "Location.js");
+		loadScript(path + "Logging.js");
+		loadScript(path + "MediaManagement.js");
+		loadScript(path + "Messaging.js");
+		loadScript(path + "Sensor.js");
+		loadScript(path + "SysInfo.js");
+		
+		// load sample data
+		loadScript(datapath + "appManager_data.js");
+		loadScript(datapath + "calendar_data.js");
+		loadScript(datapath + "contact_data.js");
+		loadScript(datapath + "landmarks_data.js");
+		loadScript(datapath + "location_data.js");
+		loadScript(datapath + "logging_data.js");
+		loadScript(datapath + "mediaManagement_data.js");
+		loadScript(datapath + "messaging_data.js");
+		loadScript(datapath + "sensor_data.js");
+		loadScript(datapath + "sysInfo_data.js");
+	}
+	
+	function loadScript(src){
+		var head = document.getElementsByTagName("head")[0] || document.documentElement, 
+			script = document.createElement("script");
+		
+		script.type = "text/javascript";
+		script.src = src;
+		head.appendChild(script);
+	}
+};
+
+(function(){
+device.implementation.prototype = {
+	
+	/**
+	 * Result object
+	 * 
+	 * object returned by API calls
+	 * 
+	 * @param {Object} value
+	 * @param {Integer} code
+	 * @param {String} msg
+	 */
+	Result : function(value, code, msg){
+		return {
+			ReturnValue	: value,
+			ErrorCode	: code || 0,
+			ErrorMessage: msg || undefined
+		};
+	},
+	
+	/**
+	 * AsyncResult object
+	 * 
+	 * object returned by API calls with callbacks
+	 * 
+	 * @param {Integer} transaction id
+	 * @param {Integer} code
+	 * @param {String} msg
+	 */
+	AsyncResult : function(id, code, msg){
+		return {
+			TransactionID	: id,
+			ErrorCode		: code || 0,
+			ErrorMessage	: msg || undefined
+		};
+	},
+	/**
+	 * ErrorResult object
+	 * 
+	 * object returned by API calls when error
+	 * 
+	 * @param {Integer} code
+	 * @param {String} msg
+	 */
+	ErrorResult : function(code, msg){
+		device.implementation.context.debug(code, msg);		
+		return {
+			ErrorCode	: code || 0,
+			ErrorMessage: msg || undefined
+		};
+	},
+	
+	/**
+	 * Iterator object
+	 * 
+	 * object returned as ReturnValue by some API
+	 * 
+	 * @param {Array} data
+	 */
+	Iterator : function(data){
+		var index = 0,
+			data = data || [];
+		return {
+			/**
+			 * reset
+			 */
+			reset : function(){
+				index = 0;
+			},
+			
+			/**
+	 		* getNext
+	 		*/
+			getNext : function(){
+				return index < data.length ? data[index++] : undefined;
+			}
+		}
+	},
+	
+	
+	/**
+	 * internal __methods__
+	 */
+	
+	$break: 	{}, // 'not implemented',
+	
+	debug: function() {
+		if (device.implementation.options.debug && window.console && console.log) 
+			console.log(arguments);
+	},
+	
+	// notify developer of api action
+	notify: function(msg){
+		if (window.console && console.warn)
+			console.warn('API Notice -- ' + msg);
+	},
+	
+	getData : function(provider){
+		if (!device.implementation.data[provider])
+			throw "no data defined for provider '"+provider+"'";
+		
+		if (device.implementation.data[provider]['default'])
+			return device.implementation.data[provider]['default'];
+		else 
+			return device.implementation.data[provider]; 
+	},	
+	
+	getUniqueID : function(){
+		return Number(''+Number(new Date())+ Math.floor(1000*Math.random()));
+	},
+	
+	callAsync : function(object, method, criteria, callback, flag){
+		flag = flag || false;
+		var tid = setTimeout(function(){
+			var result,
+				eventCode = {completed:2, error:4, progress:9},
+				code = eventCode.completed;
+			try{
+				// call method in object's context
+				// flag is passed to trigger the method in case of mandatory callback arg
+				if (flag)
+					result = method.call(object, criteria, null, flag);
+				else
+					result = method.call(object, criteria);
+			} 
+			catch(e){
+				code = eventCode.error;
+			}
+			callback(tid, code, result);
+			
+		}, device.implementation.options.callbackDelay);
+		
+		return this.AsyncResult(tid);
+	},
+		
+	addListener : function(provider, eventType, criteria, callback, handler){
+		if (!device.implementation.listeners[provider])
+			device.implementation.listeners[provider] = {};
+			
+		var tid = this.getUniqueID();
+		device.implementation.listeners[provider][eventType] = {
+			'criteria': criteria,
+			'callback': callback,
+			'handler': handler,
+			'transactionID' : tid
+		};
+		return this.AsyncResult(tid);
+	},
+
+	/*
+	 * specify either eventType or transactionID
+	 * return true if found and removed
+	 */
+	removeListener: function(provider, eventType, transactionID){
+		transactionID = transactionID || null;
+		if (transactionID) {
+			var allEvents = device.implementation.listeners[provider];
+			for (var i in allEvents) {
+				var event = allEvents[i];
+				if (event.transactionID == transactionID) {
+					device.implementation.listeners[provider][i] = null;
+					delete device.implementation.listeners[provider][i];
+					return true;
+				}
+			}
+		}
+		else 
+			if (eventType &&
+			this.hasListener(provider, eventType)) {
+				device.implementation.listeners[provider][eventType] = null;
+				delete device.implementation.listeners[provider][eventType];
+				return true;
+			}
+		return false;
+	},
+
+	hasListener: function(provider, eventType) {	
+		if (!device.implementation.listeners[provider]
+			|| !device.implementation.listeners[provider][eventType])
+			return false;
+				
+		return true;
+	},
+
+	// pluck object properties as array	
+	keys: function(obj) {
+		var keys = [];
+		for (var p in obj)
+			keys.push(p);
+		return keys;
+	},
+	
+	// extend object properties 
+	extend: function(root, ext) {
+		for (var p in ext)
+			root[p] = ext[p];
+		return root;
+	},
+	
+	// extended text string functionality 
+	_t: function(str){
+		
+		str = typeof str != 'undefined' ? String(str) : '';
+		return new StringEx(str);
+	}		
+};
+
+	/**
+	 * extended String object (available only within device.implementation.context through _t() method)
+	 */ 
+	var StringEx = function(str){
+		// define base String non-transferrable methods!
+		this.toString = function(){return str;};
+		this.valueOf = function(){return str.valueOf();};
+	};
+	StringEx.prototype = new String();
+
+	
+	/**
+	 * simple sprintf-type functionality
+	 * 
+	 * "string {title} %s and %s and {here} ".arg({title:'T', here:'H'}, 1, 'there')"
+	 * ==> string T 1 and there and H
+	 * hash (if present) must be first argument
+	 *
+	 * @param {Object} [hash] optional hash to replace {tags}
+	 * @param {String,Number} data for %s tags
+	 * @return {String} original string with tags replaced   
+	 */
+	StringEx.prototype.arg = function(){
+	    var pattern = /\%s|\{\w+\}/g;
+	    var args = arguments, 
+			len = arguments.length, 
+			hash = arguments[0],
+			i = typeof hash == 'object' && !(hash instanceof String) ? 1 : 0;
+			
+	    return this.replace(pattern, function(capture){
+			var key = capture != '%s' && capture.match(/\w+/);
+			if (key)
+				return hash && hash[key] ? hash[key] : capture;
+			else		
+				return i < len ? args[i++] : capture;
+		});
+	}
+	
+	/**
+	 * trim whitespace from beginning and end of string
+	 * @return {String} trimmed string
+	 */
+	StringEx.prototype.trim = function(){
+		return this.replace(/^\s+/, '').replace(/\s+$/, '');
+	}
+	
+	/**
+	 * capitalize string
+	 * @return {String} capitalized string
+	 */
+	StringEx.prototype.capitalize = function(){
+    	return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase();
+	}
+	
+})();
+
+
+/*
+ * device.implementation static (class) properties
+ */
+
+
+/**
+ * pointer to current instantiated device.implementation object.
+ * use to access device.implemenation namespace.
+ * 
+ * @see device.implementation 
+ */
+device.implementation.context = null;	
+
+
+/**
+ * emulation settings options
+ */
+device.implementation.options = {
+	
+	/**
+	 * callback delay (msec)
+	 * @property {Number} 
+	 */
+	callbackDelay	: 1200,
+	
+	/**
+	 * debug flag
+	 * @property {Boolean} 
+	 */
+	debug			: false,
+	
+	/**
+	 * enabled flag
+	 * @property {Boolean} 
+	 */
+	enabled			: true
+};
+
+
+/**
+ * store of interfaces (objects) in the current device implementation.
+ * format: [provider][interface]
+ * 
+ * @property {Object} 
+ */
+device.implementation.interfaces = {};
+
+
+/**
+ * store of data objects defined for current implementation.
+ * data is added useing the loadData method. 
+ * 
+ * @property {Object} format depends on data
+ */
+device.implementation.data = {};
+
+
+/**
+ * store of event listeners
+ * format: [provider][eventType]
+ */
+device.implementation.listeners = {}; 
+
+
+/*
+ * device.implementation static (class) methods
+ */
+
+
+/**
+ * Add a service provider to device implementation
+ * 
+ * @param {string} provider Name of service provider, eg, "Service.Calendar"
+ * @param {string} Interface Name of interface, eg, "IDataService"
+ * @param {Object} serviceProvider Service object
+ * @return  none
+ */
+device.implementation.extend = function(provider, Interface, serviceProvider){
+
+	if (!device.implementation.interfaces[provider])
+		device.implementation.interfaces[provider] = {}; 
+	
+	device.implementation.interfaces[provider][Interface] = serviceProvider;
+};
+
+
+/**
+ * Internal implementation to return a service provider interface object
+ * 
+ * @param {String} provider  Service provider name 
+ * @param {String} Interface	Provider interface name
+ * @exception {String} exception thrown if provider or interface is not implemented 
+ * @return {Object} the service provider interface object or 'undefined'
+ */	
+device.implementation.getInterface = function(provider, Interface){
+		
+	if (device.implementation.interfaces[provider] 
+		&& typeof device.implementation.interfaces[provider][Interface] == 'object') 
+	{
+		var service = new Object();
+		service[Interface] = device.implementation.interfaces[provider][Interface];
+		return service;
+	}
+	else
+		throw 'Error: unknown error'; 
+};
+
+
+/**
+ * Loads data to the data store
+ * 
+ * @param {String} provider  Service provider name 
+ * @param {String} type Data name/label
+ * @param {Function,Object,Array} dataFactory Function to generate the data object, or array/object
+ * @return none
+ */
+device.implementation.loadData = function(provider, type, dataFactory){
+
+	type = type || 'default';
+	if (!device.implementation.data[provider]) 
+		device.implementation.data[provider] = {};
+		
+	device.implementation.data[provider][type] = 
+		typeof dataFactory == 'function' 
+			? dataFactory()
+			: dataFactory;
+};
+
+
+/**
+ * trigger an event listener
+ * 
+ * @param {String} provider Service provider name
+ * @param {String} eventType event type 
+ * @param {Variant} data ReturnValue for callback function 
+ */
+device.implementation.triggerListener = function(provider, eventType, data){
+
+	if (!device.implementation.context.hasListener(provider, eventType)) {
+		device.implementation.context.notify('no listener defined for provider=' + provider + ', eventType=' + eventType);
+		return;
+	}
+	var listener = device.implementation.listeners[provider][eventType];
+
+	// call the provider's handler
+	listener.handler(listener.transactionID, listener.criteria, listener.callback, data);
+}
+
+
+
+/*
+ * ERROR CODES
+ */
+device.implementation.ERR_SUCCESS			 		= 0;
+device.implementation.ERR_INVALID_SERVICE_ARGUMENT	= 1000;
+device.implementation.ERR_UNKNOWN_ARGUMENT_NAME		= 1001;
+device.implementation.ERR_BAD_ARGUMENT_TYPE			= 1002;
+device.implementation.ERR_MISSING_ARGUMENT 			= 1003;
+device.implementation.ERR_SERVICE_NOT_SUPPORTED		= 1004;
+device.implementation.ERR_SERVICE_IN_USE 			= 1005;
+device.implementation.ERR_SERVICE_NOT_READY 		= 1006;
+device.implementation.ERR_NO_MEMORY		 			= 1007;
+device.implementation.ERR_HARDWARE_NOT_AVAILABLE	= 1008;
+device.implementation.ERR_SEVER_BUSY				= 1009;
+device.implementation.ERR_ENTRY_EXISTS				= 1010;
+device.implementation.ERR_ACCESS_DENIED				= 1011;
+device.implementation.ERR_NOT_FOUND					= 1012;
+device.implementation.ERR_UNKNOWN_FORMAT			= 1013;
+device.implementation.ERR_GENERAL_ERROR				= 1014;
+device.implementation.ERR_CANCEL_SUCCESS			= 1015;
+device.implementation.ERR_SERVICE_TIMEDOUT			= 1016;
+device.implementation.ERR_PATH_NOT_FOUND			= 1017;
+
+
+
+// instantiate device imlementation
+new device.implementation();
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/preview/script/lib/loader.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,121 @@
+/*
+ * Emulator, which manages the device interacations
+ */
+if (typeof _BRIDGE_REF == "undefined" || !_BRIDGE_REF) {
+
+	var _BRIDGE_REF = {
+		parent: window.parent || false,
+		nokia: window.parent.NOKIA || false,
+		sysInfoObject : null
+	};
+
+	_BRIDGE_REF.namespace = function(name){
+		var parts = name.split('.');
+		var current = _BRIDGE_REF;
+		for (var key in parts) {
+			if (!current[parts[key]]) {
+				current[parts[key]] = {};
+			}
+			current = current[parts[key]];
+		}
+	};
+	
+	/*
+	 * _BRIDGE_REF.helper functions
+	 */
+	_BRIDGE_REF.namespace('helper.loadScript');
+	_BRIDGE_REF.helper = {
+		path: document.location.pathname,
+		loadScript: function(path){
+			var head = document.getElementsByTagName("head")[0] || document.documentElement;
+			var script = document.createElement("script");
+			
+			script.type = "text/javascript";
+			script.src = path;
+			head.appendChild(script);
+		},
+		
+		addEvent: function(obj, type, fn){
+			if (obj.addEventListener) {
+				obj.addEventListener(type, fn, false);
+			}
+			else 
+				if (obj.attachEvent) {
+					obj["e" + type + fn] = fn;
+					obj[type + fn] = function(){
+						obj["e" + type + fn](window.event);
+					}
+					obj.attachEvent("on" + type, obj[type + fn]);
+				}
+		},
+		
+		getElementsLengthInObject : function(items){
+			var count = 0;
+			for (var i in items) 
+				count++;
+			
+			return count;
+		},
+		
+		getBatteryStrength : function(){
+			
+		},
+		
+		console : function(){
+			if (!typeof window.console) {
+				_BRIDGE_REF.helper.loadScript("preview/script/lib/console.js");
+			}			
+		}
+		
+	};
+	
+	
+	/*
+	 Load Scripts
+	 */
+	_BRIDGE_REF.helper.loadScript("preview/script/lib/widget.js");
+	_BRIDGE_REF.helper.loadScript("preview/script/lib/systeminfo.js");
+	_BRIDGE_REF.helper.loadScript("preview/script/lib/menu.js");
+	_BRIDGE_REF.helper.loadScript("preview/script/lib/menuItem.js");
+	_BRIDGE_REF.helper.loadScript("preview/script/lib/console.js");
+
+	//	Inject SAPI scripts	
+	if (_BRIDGE_REF.nokia) {
+		var wrtVersion = _BRIDGE_REF.nokia.helper.readCookie('_WRT_VERSION');
+		if ((typeof wrtVersion == 'undefined') || (wrtVersion == 'WRT 1.1')) {
+			_BRIDGE_REF.nokia.version = 'WRT 1.1';
+			_BRIDGE_REF.nokia.helper.createCookie('_WRT_VERSION', 'WRT 1.1');
+			_BRIDGE_REF.helper.loadScript("preview/script/lib/device.js");
+		}
+		else {
+			_BRIDGE_REF.nokia.version = 'WRT 1.0';
+		}
+	}
+	else {
+		_BRIDGE_REF.helper.loadScript("preview/script/lib/device.js");
+	}
+
+	/*
+	 window native functions over-riding
+	 */
+	if ( (typeof window.frameElement != 'undefined') && (typeof _BRIDGE_REF.nokia  != 'undefined') && window !== window.parent) {
+		//	alert
+		window.alert = function(msg){
+			return window.parent.alert(msg);
+		};
+		
+		//	confirm
+		window.confirm = function(msg){
+			return window.parent.confirm(msg);
+		};
+		
+		//	prompt
+		window.prompt = function(msg, str){
+			return window.parent.prompt(msg, str)
+		};
+	}
+
+	//	make TRUE loader.js script loaded
+	window.parent.NOKIA.scriptsLoaded.loader = true;
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/preview/script/lib/menu.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,497 @@
+/**
+ * widget object constructor
+ * @param {void}
+ *     widget()
+ * @return {void}
+ */ 
+
+if (typeof window.menu == "undefined" || !window.menu) 
+{
+	window.menu = 
+	{
+		author : 'Nokia WRT Emulation Library',
+		items : [],
+		index : null,
+		isDimmed : false,	
+			
+		//	Event triggers
+		onShow : null,
+		onRightSoftKeySelect : null,
+	};
+	
+	
+	/*
+		Function 	:	menu.append()
+		Argument	:	MenuItem Object
+		Returns		:	Void
+		Description	:	Function appends MenuItem to a Menu Object
+	*/
+	menu.append = function(MenuItem)
+	{
+		if(this.allowedTypeOf(MenuItem))
+		{
+			var i;
+			var flag = true;
+			try{
+			for(var key in this.items)
+			{
+				if(this.items[key].id == MenuItem.id)
+				{	
+					flag = false; 
+					break; 
+				}
+			}} catch(e){ }
+			if(flag)
+			{
+				//	MenuItem.parent = this;
+				this.items[MenuItem.id] = MenuItem;
+			}
+		}
+	}
+	
+	
+	/*
+		Function 	:	menu.remove()
+		Argument	:	MenuItem Object
+		Returns		:	Void
+		Description	:	Function Remove the menuItem and its children from the container options menu.
+	*/
+	menu.remove = function(MenuItem)
+	{
+		if(!this.allowedTypeOf(MenuItem))
+			return false;
+	
+		var flag = false;
+		if (this.items.length) {
+			for (var key in this.items) {
+				if (this.items[key].id == MenuItem.id) {
+					flag = true;
+					break;
+				}
+			}
+		}
+		if(flag)
+		{
+			this.items.splice(key, 1);
+		}
+	}
+	
+	/*
+		Function 	:	menu.clear()
+		Argument	:	Void
+		Returns		:	Void
+		Description	:	Clears (deletes) all the menu items in the menupane.
+	*/
+	menu.clear = function()
+	{
+		try
+		{
+			this.items.splice(0, this.items.length);
+		}catch(e){}
+	}
+	
+	
+	/*
+		Function 	:	Menu.getMenuItemById(id)
+		Argument	:	Integer
+		Returns		:	MenuItem Object
+		Description	:	Function get the MenuItem Object with the reference of id
+	*/
+	menu.getMenuItemById = function(id)
+	{
+		var menuItemRef = menu.menuItemExhistsById(this, id, 0);
+		if(this.allowedTypeOf(menuItemRef))
+			return menuItemRef;
+		else
+			return undefined;
+	}
+	
+	
+	/*
+		Function 	:	Menu.getMenuItemByName(name)
+		Argument	:	String
+		Returns		:	MenuItem Object
+		Description	:	Function get the MenuItem Object with the reference of String name
+	*/
+	menu.getMenuItemByName = function(name)
+	{
+		var menuItemRef = menu.menuItemExhistsById(this, name, 1);
+	
+	//	if(menuItemRef !=null)
+		if(this.allowedTypeOf(menuItemRef))
+			return menuItemRef;
+		else
+			return undefined;
+	}
+	
+	/*
+		Function 	:	Menu.setRightSoftkeyLabel()
+		Argument	:	String, Function
+		Returns		:	Void
+		Description	:	Set the label of the right soft key to str. This enables the default text 
+						to be changed from exit and a new function assigned by setting a callbackfunction
+	*/
+
+	menu.setRightSoftkeyLabel = function(label, callback)
+	{
+		window.menu = this;
+		try
+		{
+			if(typeof label != '' && !label)
+				this.setExitToRsk();			
+
+			else if(typeof callback != 'function' && !callback)
+				this.setExitToRsk();			
+			
+			else if (_BRIDGE_REF.nokia.menu.setRsk(callback)) {
+				_BRIDGE_REF.parent.$("#RskLabel > a")[0].innerHTML = label;
+				_BRIDGE_REF.nokia.menu.rsk_label = label;
+				_BRIDGE_REF.nokia.menu.rsk_event = callback;
+				_BRIDGE_REF.nokia.menu.is_rsk_overridden = true;
+			}
+			else 
+				this.setExitToRsk();
+
+		}catch(e){ 
+			// alert(e);
+		 }
+	}
+
+
+	menu.setExitToRsk = function()
+	{
+		this.onRightSoftKeySelect = null;
+
+		_BRIDGE_REF.nokia.menu.is_rsk_overridden = false;
+		_BRIDGE_REF.nokia.menu.rsk_label = '';
+		_BRIDGE_REF.nokia.menu.rsk_event = null;
+		_BRIDGE_REF.parent.$("#RskLabel > a")[0].innerHTML = 'Exit';
+
+		_BRIDGE_REF.nokia.menu.setRsk(function(){
+			_BRIDGE_REF.nokia.menu.exit();
+		});
+	}
+	
+	/*
+		Function 	:	Menu.showSoftkeys()
+		Argument	:	Void
+		Returns		:	Void
+		Description	:	Makes the softkeys visible. By default the softkeys are not visible
+	
+	*/
+	menu.showSoftkeys = function()
+	{
+		/*
+		 *  Shows showSoftkeys
+		 */
+		_BRIDGE_REF.nokia.menu.softkeys_visibility = true;
+		_BRIDGE_REF.nokia.menu.showSoftKeys();
+	}
+	
+	/*
+		Function 	:	Menu.hideSoftkeys()
+		Argument	:	Void
+		Returns		:	Void
+		Description	:	Makes the softkeys invisible. By default the softkeys are not visible. 
+	
+	*/
+	menu.hideSoftkeys = function()
+	{
+		/*
+		 *  Hide showSoftkeys
+		 */
+		_BRIDGE_REF.nokia.menu.softkeys_visibility = false;
+		_BRIDGE_REF.nokia.menu.hideSoftKeys();
+	}
+	
+	
+	/*	
+	 *  
+	 * ----------------------------------------------------------------
+	 * Exta Functionalities which helps to make main functions to work
+	 * ----------------------------------------------------------------
+	 *  
+	*/
+	
+	menu.cancel = function()
+	{
+		_BRIDGE_REF.nokia.menu.cancel();
+	}
+	
+	menu.exit = function()
+	{
+		_BRIDGE_REF.nokia.menu.exit();
+	}
+	
+	
+	menu.triggeLSKEvent = function()
+	{
+		if(typeof(window.menu.onShow) == 'function')
+		{
+				window.menu.onShow();
+		}
+		_BRIDGE_REF.parent.$('#softKeysPane').show();
+		this.show();
+	}
+	
+	menu.triggerEvent = function(MenuItemId)
+	{
+		try{
+			var menuItemRef = this.menuItemExhistsById(this, MenuItemId, 0);
+			if(menuItemRef != null)
+			{
+				if(typeof menuItemRef.onSelect == 'function')
+					menuItemRef.onSelect(MenuItemId);
+		
+				if(_BRIDGE_REF.helper.getElementsLengthInObject(menuItemRef.items))
+					this.show(MenuItemId);
+				else
+					this.cancel();
+
+			}else
+			{
+				this.show();
+			}
+		}
+		catch(e)
+		{
+			alert('triggeEvent: '+MenuItemId+' >> '+e);
+		}
+	}
+	
+	menu.hasChild = function(parentId)
+	{
+		for(var i in this.items)
+		{
+			if(this.items[i].parentId == parentId)
+			{	
+				 return true;
+			}
+		}
+		return false;
+	}
+	
+	
+	menu.allowedTypeOf = function(MenuItem)
+	{
+		try
+		{
+			if( (typeof(MenuItem) == 'object') && (MenuItem.type == 'MenuItem'))
+				return true;			
+		}
+		catch(e)
+		{
+			return false;
+		}
+	}
+	
+	menu.show = function(parentId)
+	{
+		try
+		{
+			var menuItemsPane = _BRIDGE_REF.parent.$('#MenuItemsArea')
+			menuItemsPane = menuItemsPane[0];
+			
+			menuItemsPane.innerHTML = '';
+			
+			var ul = document.createElement('ul');
+			var ele = window.menu;
+
+			if(typeof parentId != 'undefined' && typeof parentId == 'object')
+			{
+				if (typeof window.menu.onShow != null && typeof window.menu.onShow == 'function') {
+					window.menu.onShow();
+				}
+			}
+
+			if(typeof parentId == 'number')
+			{
+				var tempRef = menu.menuItemExhistsById(ele, parentId, 0);
+	
+				if(typeof parentId != 'undefined' && typeof tempRef != 'undefined')
+					ele = tempRef;
+			}
+
+			if(_BRIDGE_REF.helper.getElementsLengthInObject(ele.items))
+			{
+				for(var key in ele.items)
+				{
+					if(!ele.items[key].isDimmed){
+						
+						try{
+							ul.appendChild(menu.create_menuElement(ele.items[key]));
+						}catch(e){  }
+					}
+				}
+				if(typeof parentId == 'number' && _BRIDGE_REF.helper.getElementsLengthInObject(ele.items))
+				{
+					if(ele.parent)
+						ul.appendChild(menu.create_normalMenuItem('Back', ele.parent.id));	
+					else
+						ul.appendChild(menu.create_normalMenuItem('Back', null));	
+				}
+				else
+				{
+					ul.appendChild(menu.create_exitMenuItem());	
+				}
+
+
+				if(_BRIDGE_REF.helper.getElementsLengthInObject(ele.items) > 5)
+					menuItemsPane.style.overflowY = 'scroll';
+				else
+					menuItemsPane.style.overflowY = 'hidden';
+
+			}
+			else
+			{
+				menuItemsPane.style.overflowY = 'hidden';
+				ul.appendChild(menu.create_exitMenuItem());	
+			}
+			menuItemsPane.innerHTML = '<ul>'+ul.innerHTML+'</ul>';
+			
+			_BRIDGE_REF.nokia.menu.show();
+		}
+		catch(e)
+		{
+			alert('menu.show: '+e);
+		}
+	}
+
+
+
+/*
+*
+*	HELPER FUNCTIONS
+*
+*/
+
+	menu.menuItemExhistsById = function(menuReference, value, argumentType)
+	{
+		var flag = null;
+		
+		for(var key in menuReference.items)
+		{
+			if(!argumentType)
+			{
+				if(menuReference.items[key].id == value)
+				{	
+					flag = true; 
+					break; 
+				}
+			}
+			else
+			{
+				if(menuReference.items[key].name == value)
+				{	
+					flag = true; 
+					break; 
+				}
+			}
+			
+			if(menuReference.items[key].items != undefined && menuReference.items[key].items.length)
+			{
+				var temp = this.menuItemExhistsById(menuReference.items[key], value, argumentType);
+				if(temp)
+					return temp;
+			}
+		}
+		if(flag)
+		{
+			// crate a package and send it
+			menuReference.items[key].index = key;
+			return menuReference.items[key];
+		}
+		else
+			return null;
+	}
+	
+	menu.create_menuElement = function(MenuItem) 
+	{
+		var listitem = document.createElement('li');
+		listitem.id = MenuItem.id;
+		listitem.setAttribute('onClick', 'javascript:NOKIA.emulator.child.menu.triggerEvent('+MenuItem.id+');');
+	
+	    var anchor = document.createElement('a');
+		anchor.id = 'subMenuItem_'+MenuItem.id;
+		anchor.innerHTML = MenuItem.name;
+		if(_BRIDGE_REF.helper.getElementsLengthInObject(MenuItem.items))
+	 	{  
+			anchor.className = 'subMenuItem';
+			anchor.setAttribute('href', 'javascript:NOKIA.emulator.child.menu.show('+MenuItem.id+');');
+		}
+	    listitem.appendChild(anchor);
+		return (listitem);
+	}
+	
+	menu.create_normalMenuItem = function(MenuTitle, index) 
+	{
+	    var listitem = document.createElement('li');
+	
+	    var anchor = document.createElement('a');
+		anchor.id = 'subMenuItem_BACK';
+		anchor.innerHTML = MenuTitle;
+	
+		if (MenuTitle == 'Back') {
+			listitem.className = 'exitOrBackBtn';
+			anchor.setAttribute('href', 'javascript:NOKIA.emulator.child.menu.triggerEvent(' + index + ');');
+		}
+		else 
+			anchor.setAttribute('href', 'javascript:NOKIA.emulator.child.menu.triggerEvent(' + index + ');');
+	    
+		listitem.appendChild(anchor);
+		return (listitem);
+	}
+	
+	menu.create_exitMenuItem = function() 
+	{
+	    var listitem = document.createElement('li');
+		listitem.className = 'exitOrBackBtn';
+	    var anchor = document.createElement('a');
+		anchor.id = 'subMenuItem_EXIT';
+		anchor.innerHTML = 'Exit';
+		anchor.setAttribute('href', 'javascript:NOKIA.emulator.child.menu.exit();');
+		listitem.setAttribute('onClick', 'javascript:NOKIA.emulator.child.menu.exit();');
+		
+	    listitem.appendChild(anchor);
+		return (listitem);
+	}
+	
+	menu.triggeRSK = function()
+	{
+		try {
+			if (window.menu) {
+				if (childToParent_Reference.$('softKeysPane').style.display != 'none') {
+					if (window.menu.onRightSoftKeySelect != null) {
+						window.menu.onRightSoftKeySelect();
+						window.menu.cancel();
+					}
+					else {
+						window.menu.cancel();
+					}
+				}
+			}
+		}catch(e)
+		{
+			alert(e);
+		}
+	}
+	
+	menu.triggeLSK = function()
+	{
+		if(window.menu)
+		{
+			window.menu.show();
+			if(typeof(window.menu.onShow) == 'function')
+			{
+				if(window.menu.onShow)
+				{
+					window.menu.onShow();
+				}
+			}
+		}
+	}
+
+
+	//	make TRUE menu.js script loaded
+	window.parent.NOKIA.scriptsLoaded.menu = true;
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/preview/script/lib/menuItem.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,93 @@
+/*
+	Function 	:	MenuItem()
+	Argument	:	Void
+	Returns		:	Void
+	Description	:	Constructor Function creates a Menu object to the WINDOW
+*/
+
+function MenuItem(name, id)
+{
+	this.id = id;
+	this.name = name;
+	this.isDimmed = false;
+	
+	this.items = [];
+	this.index = null;
+	this.parent = null;
+	this.type = 'MenuItem';
+	
+	
+	//	Event triggers
+	this.onSelect = null;
+}
+
+
+/*
+	Function 	:	MenuItem.append(MenuItem)
+	Argument	:	Menu Object
+	Returns		:	Void
+	Description	:	Function appends childMenuItem to a MenuItem
+*/
+MenuItem.prototype.append = function(childMenuItem)
+{
+	if( (childMenuItem != null) && (childMenuItem.type == 'MenuItem'))
+	{
+		childMenuItem.parent = this;
+		this.items[childMenuItem.id] = childMenuItem;
+	}
+}
+
+
+/*
+	Function 	:	MenuItem.remove()
+	Argument	:	Menu Object
+	Returns		:	Void
+	Description	:	Function Removes childMenuItem and its children from the parent menu item.
+*/
+MenuItem.prototype.remove = function(childMenuItem)
+{
+	if((childMenuItem != null) && (childMenuItem.type == 'MenuItem'))
+	{
+		var i = this.search(childMenuItem);
+		if(i > -1)
+			this.items.splice(i, 1);
+	}
+}
+
+/*
+	Function 	:	MenuItem.remove()
+	Argument	:	Menu Object
+	Returns		:	Void
+	Description	:	If flag is true the MenuItem is hidden and if flag is false the item is shown.
+*/
+MenuItem.prototype.setDimmed = function(flag)
+{
+	this.isDimmed = flag;
+}
+
+
+/*
+	Function 	:	MenuItem.search()
+	Argument	:	MenuItem Object
+	Returns		:	Integer
+	Description	:	Function Replace oldMenuItem with newMenuItem
+*/
+MenuItem.prototype.search = function(MenuItem)
+{
+		var flag = false;
+		for(var i in this.items)
+		{
+			if(this.items[i].id == MenuItem.id)
+			{	
+				flag = true; 
+				break; 
+			}
+		}
+		if(flag)
+			return i;
+		else
+			return -1;		
+}
+
+//	make TRUE menuItem.js script loaded
+window.parent.NOKIA.scriptsLoaded.menuItem = true;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/preview/script/lib/sapi/AppManager.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,223 @@
+/**
+ * AppManager.js
+ * 
+ * Nokia Web Runtime Service API emulation 
+ * WRT v1.1
+ * 
+ * Copyright 2009 Nokia Corporation. All rights reserved.
+*/
+
+ 
+(function(){
+	
+	var provider = 'Service.AppManager',
+		Interface = 'IAppManager';
+
+	/**
+	 * AppManager service
+	 */
+	var AppManagerService = function(){
+		this.GetList 	= __GetList;
+		this.LaunchApp	= __LaunchApp;
+		this.LaunchDoc	= __LaunchDoc;
+		this.Cancel 	= __Cancel;
+	}
+
+	device.implementation.extend(provider, Interface, new AppManagerService() );
+
+
+	/******************************************************/	
+	/******************************************************/	
+	/******************************************************/	
+
+	var	context = device.implementation.context,
+		_t = context._t,
+		method = '',
+		result = false,
+		DBase = null;
+	
+	/**
+	 * AppManager: GetList
+	 * @param {Object} criteria
+	 */
+	function __GetList(criteria){
+		if ((result = validator.apply('GetList', arguments)) !== false)
+			return result; 
+
+		if (typeof criteria.Type == 'undefined') 
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.missingType);
+
+		if (!/^(Application|UserInstalledPackage)$/i.test(criteria.Type)) 
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE);
+		
+		// check if a callback was provided
+		if (arguments.length > 1)
+			return error(device.implementation.ERR_SERVICE_NOT_SUPPORTED, msg.badAsync);
+		
+		var returnValue,
+			filter = criteria.Filter || null;
+ 
+		DBase = context.getData(provider);
+
+		if (criteria.Filter)
+			context.notify(_t('%s:: GetList : filter not implemented in preview').arg(provider));
+
+		// Type = UserInstalledPackage
+		if (!/UserInstalledPackage/i.test(criteria.Type)){
+
+			returnValue = context.Iterator( DBase[criteria.Type] || [] );
+
+		} else {
+		// Type = Application
+			// @todo: apply filter criteria
+			
+			returnValue = context.Iterator( DBase[criteria.Type] || [] );
+		}
+
+		return context.Result(returnValue);
+	}
+			
+	/**
+	 * AppManager: LaunchApp
+	 * @param {Object} criteria
+	 * @param {function} callback function for async call (optional)
+	 */
+	function __LaunchApp(criteria, callback){
+
+		if ((result = validator.apply('LaunchApp', arguments)) !== false)
+			return result; 
+		
+		if (typeof criteria.ApplicationID == 'undefined')
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.missingAppID);
+
+		// app id must be in the form "s60uid://<appid>" where <appid> is 
+		// what is returned by GetList.
+		var appId = criteria.ApplicationID;
+		
+		if (!/^s60uid:\/\/0x/i.test(appId))
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE);
+	
+		if (criteria.CmdLind)
+			context.notify(_t('%s:: LaunchApp : CmdLine not implemented in preview').arg(provider));
+
+		if (criteria.Options)
+			context.notify(_t('%s:: LaunchApp : Options not implemented in preview').arg(provider));
+
+
+		if (typeof callback == 'function') {
+			return context.callAsync(this, arguments.callee, criteria, callback);
+		}
+
+		appId = appId.replace(/^s60uid:\/\//i, '');	
+		DBase = context.getData(provider);
+
+		for(var type in DBase){
+			for(var i in DBase[type]) {
+				var item = DBase[type][i];
+				if (item.Uid == appId) {
+					// found!
+					context.notify(_t('%s:: LaunchApp : application found & launched : id=%s').arg(provider, appId));
+					return context.ErrorResult(device.implementation.ERR_SUCCESS);
+				}
+			}
+		}
+		// if not found
+		return error(device.implementation.ERR_BAD_ARGUMENT_TYPE);
+	}
+			
+	/**
+	 * AppManager: LaunchDoc
+	 * @param {Object} criteria
+	 * @param {function} callback function for async call (optional)
+	 */
+	function __LaunchDoc(criteria, callback){
+
+		if ((result = validator.apply('LaunchDoc', arguments)) !== false)
+			return result; 
+
+		if (typeof criteria.Document == 'undefined' && typeof criteria.MimeType == 'undefined')
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.missingDoc);
+
+		if (typeof criteria.Document != 'undefined' && !criteria.Document.DocumentPath)
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE);
+
+		if (criteria.Options)
+			context.notify(_t('%s:: LaunchDoc : Options not implemented in preview').arg(provider));
+
+		if (typeof callback == 'function') {
+			return context.callAsync(this, arguments.callee, criteria, callback);
+		}
+
+		// nothing to launch in emulation, just notify user
+		context.notify(_t('%s:: LaunchDoc : document launched').arg(provider));
+		
+		if (criteria.Document)
+			// return success
+			return context.ErrorResult(device.implementation.ERR_SUCCESS);
+		else
+			// for mimetype, return value name of document
+			return context.Result('', device.implementation.ERR_SUCCESS);
+	}
+
+	
+
+	/**
+	 * AppManager: Cancel
+	 * @param {Object} criteria
+	 */
+	function __Cancel(criteria){
+		method = 'Cancel';
+		if (!criteria || !criteria.TransactionID)
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.missingTID);
+		
+		clearTimeout(criteria.TransactionID);
+		return context.ErrorResult(device.implementation.ERR_SUCCESS);
+	}
+
+
+	
+	/*******************************
+	 * helper functions
+	 *******************************/
+	
+	function error(code, msg /*, args...*/){
+
+		var args = ['AppManager',method].concat([].slice.call(arguments,2));
+		msg = msg ? _t().arg.apply(msg,args) : undefined;
+		return context.ErrorResult(code, msg);
+	}
+
+	/**
+	 * validate common input arguments
+	 * 'this' is string (object) name of calling function
+	 * 
+	 * @param {arguments} arguments of calling function
+	 * @return {Result} Result object if error, false if no error.
+	 */
+	function validator() {
+		method = ''+this;
+		var	failed = false,
+			criteria = arguments[0] || false;
+			
+		if (!criteria || typeof criteria != 'object')
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.missingType);
+
+		return failed;
+	}
+
+	/** 
+	 * error messages
+	 * order of %s args: Service name, method name, parameter name 
+	 */
+	var msg = {
+		missingType		: '%s:%s:Content Type Missing',
+		badAsync		: 'AppManger:GetList:Asynchronous version of API is not supported',	// typo on device!
+		missingAppID	: '%s:%s:Application ID  Missing',	// double space between ID & missing!!
+		missingDoc		: '%s:%s:Document/MimeType Missing/value more than expected length ',
+		missingTID		: '%s:Incorrect TransactionID',
+		is_invalid		: '%s:%s:%s is invalid'
+	};
+		
+
+}) ()
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/preview/script/lib/sapi/Calendar.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,410 @@
+/**
+ * Calendar.js
+ * 
+ * Nokia Web Runtime Service API emulation 
+ * WRT v1.1
+ * 
+ * Copyright 2009 Nokia Corporation. All rights reserved.
+*/
+
+ 
+(function(){
+	
+	var provider = 'Service.Calendar' ,
+		Interface = 'IDataSource';
+
+	/**
+	 * Calendar service
+	 */
+	var CalendarService = function(){
+		this.GetList 	= __GetList;
+		this.Add 		= __Add;
+		this.Delete 	= __Delete;
+		this.Import 	= __Import;
+		this.Export 	= __Export;
+		this.Cancel 	= __Cancel;
+		this.RequestNotification = __RequestNotification;
+	}
+
+	device.implementation.extend(provider, Interface, new CalendarService() );
+
+
+	/******************************************************/	
+	/******************************************************/	
+	/******************************************************/	
+
+	var	context = device.implementation.context,
+		_t = context._t,
+		method = '',
+		result = false,
+		DBase = null,
+		default_calendar = 'C:Calendar';
+	
+	/**
+	 * Calendar: GetList
+	 * @param {Object} criteria
+	 */
+	function __GetList(criteria){
+		if ((result = validator.apply('GetList', arguments)) !== false)
+			return result; 
+
+		var returnValue = [], 
+			match = null,
+			filter = criteria.Filter || null;
+ 
+		DBase = context.getData(provider);
+
+		// Type = Calendar
+		if (!/CalendarEntry/i.test(criteria.Type)){
+			var cals = [default_calendar];
+			if (filter && filter.DefaultCalendar === false)
+				cals = context.keys(DBase)
+
+			returnValue = cals;
+
+		} else {
+		// Type = CalendarEntry
+			var cal = default_calendar;
+			if (filter && filter.CalendarName)
+				cal = filter.CalendarName;
+			
+			if (!(cal in DBase))
+				return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.badCalendar);
+
+			// filter by id or LocalId
+			if (filter && (filter.id || filter.LocalId)) {
+				var which = filter.id ? 'id' : 'LocalId', 
+					id = filter[which];
+					
+				for (var i in DBase[cal]) {
+					if (id == DBase[cal][i][which]) {
+						returnValue.push(DBase[cal][i]);
+					}
+				}
+			}
+			// filter by type 
+			else if (filter && filter.Type && !/IncludeAll/i.test(filter.Type)) {
+				for (var i in DBase[cal]) {
+					// match on type is case insensitive
+					if (filter.Type.toLowerCase() == DBase[cal][i].Type.toLowerCase()) {
+						returnValue.push(DBase[cal][i]);
+					}
+				}
+			}
+			// unsupported filters 
+			else if (filter 
+				&& (match = context.keys(filter).join().match(/StartRange|EndRange|SearchText/ig)) ) {
+				context.notify(_t('%s:: GetList : filter %s not implemented in preview').arg(provider, match.join()));
+			}
+			// return everything 
+			else {
+				returnValue = DBase[cal];
+			}
+		}
+
+		return context.Result(context.Iterator(returnValue));
+	}
+			
+	/**
+	 * Calendar: Add
+	 * @param {Object} criteria
+	 */
+	function __Add(criteria){
+		if ((result = validator.apply('Add', arguments)) !== false)
+			return result; 
+		
+		var Item = criteria.Item || false; 
+		
+		DBase = context.getData(provider);
+
+		// Type = Calendar
+		if (!/CalendarEntry/i.test(criteria.Type)){
+
+			if (!Item || !Item.CalendarName)
+				return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.missingCalendar);
+				
+			var cal = Item.CalendarName;
+			if (cal in DBase) {
+				return error(device.implementation.ERR_ENTRY_EXISTS);
+			}
+
+			// @todo: validate calendar name <drive>:<name>
+			// return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.badCalendar);
+			
+			// create new calendar
+			device.implementation.loadData(provider, cal, []);
+			return error(device.implementation.ERR_SUCCESS);
+
+		} else {
+		// Type = CalendarEntry
+
+			if (!Item)
+				return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.is_missing, 'Item');
+				
+			var cal = Item.CalendarName || default_calendar;
+
+			// if calendar doesn't exist and it's the default, create it
+			if (!(cal in DBase) && cal == default_calendar)
+				device.implementation.loadData(provider, cal, []);
+			
+			if (!(cal in DBase))
+				return error(device.implementation.ERR_NOT_FOUND);
+
+			// update existing item?
+			if ('LocalId' in Item) {
+				
+				if (!Item.LocalId && Item.LocalId !== 0)
+					return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.is_invalid, 'LocalId');
+				
+				if ('InstanceStartTime' in Item)
+					context.notify(_t('%s:: Add : InstanceStartTime not implemented in preview.').arg(provider));
+
+				// can't update id
+				delete Item.id;
+				
+				//  search for and update item
+				var found = false;
+				for (var i in DBase[cal]) {
+					var entry = DBase[cal][i];
+					if (entry.LocalId == Item.LocalId) {
+						context.extend(entry, Item);
+						Item.id = entry.id;
+						found = true;
+						break;
+					}
+				}
+				if (!found)
+					return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.is_invalid, 'LocalId');
+
+			} else {
+			// add new item
+				// generate new id and localId 
+				// -- in calendar id's are string!
+				Item.id = String(context.getUniqueID());
+				Item.LocalId = String(context.getUniqueID());
+				DBase[cal].push(Item);
+			} 
+		} 
+		// return success
+		return context.Result(Item.id, device.implementation.ERR_SUCCESS);
+	}
+			
+
+	/**
+	 * Calendar: Delete
+	 * @param {Object} criteria
+	 * @param {function} callback function for async call (optional - valid only for CalendarEntry)
+	 */
+	function __Delete(criteria, callback){
+		
+		if ((result = validator.apply('Delete', arguments)) !== false)
+			return result; 
+
+		var Data = criteria.Data || false; 
+		if (!Data || typeof Data != 'object')
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.is_invalid, 'Data');
+		
+		// only sync call supported for Calendar
+		if (!/CalendarEntry/i.test(criteria.Type) && typeof callback == 'function')
+			return error(device.implementation.ERR_SERVICE_NOT_SUPPORTED, msg.noAsync);
+
+		DBase = context.getData(provider);
+		var cal = Data.CalendarName || default_calendar;			
+		if (!(cal in DBase))
+			return error(device.implementation.ERR_NOT_FOUND);
+		
+		// Type = Calendar
+		if (!/CalendarEntry/i.test(criteria.Type)) {
+			// CalendarName is mandatory
+			if (!Data.CalendarName)
+				return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.is_missing, 'CalendarName');
+						
+			DBase[cal] = null;
+			delete DBase[cal];
+		}
+		else {
+		// Type = CalendarEntry
+
+			if (!context.keys(Data).join().match(/IdList|LocalIdList|DeleteAll|StartRange|EndRange/ig))
+				return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.is_missing, 'Data');
+
+			if (typeof callback == 'function') {
+				return context.callAsync(this, arguments.callee, criteria, callback);
+			}
+
+			var which = Data.IdList ? 'IdList' : 'LocalIdList',
+				idList = Data[which] || false;
+				
+			if (idList) {
+				//  search for and delete items
+				for (var id in idList) {
+					id = idList[id];
+					for (var i in DBase[cal]) {
+						if (id == DBase[cal][i][which]) {
+							DBase[cal].splice(i, 1);
+						}
+					}
+				}
+			}
+			else if (Data.DeleteAll && Data.DeleteAll === true){
+				delete DBase[cal];
+				DBase[cal] = [];
+			}
+
+			if (Data.StartRange || Data.EndRange) {
+				context.notify(_t('%s:: Delete : StartRange / EndRange not implemented in preview.').arg(provider));
+			}
+		}
+		// return success
+		return context.ErrorResult(device.implementation.ERR_SUCCESS);				
+	}
+			
+
+	/**
+	 * Calendar: Import
+	 * @param {Object} criteria
+	 * @param {function} callback function for async call (optional)
+	 */
+	function __Import(criteria, callback){
+
+		if ((result = validator.apply('Import', arguments)) !== false)
+			return result; 
+
+		var Data = criteria.Data || false; 
+		if (!Data)
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.is_invalid, 'Data');
+		
+		if (!Data.FileName)
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.is_invalid, 'FileName');
+
+		if (!Data.Format)
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.is_invalid, 'Format');
+
+		if (typeof callback == 'function') {
+			return context.callAsync(this, arguments.callee, criteria, callback);
+		}
+
+		context.notify(_t('%s:: Import : not implemented in preview.').arg(provider));
+		var returnValue = context.Iterator([]);
+		return context.Result(returnValue, device.implementation.ERR_SUCCESS);		
+	}
+			
+
+	/**
+	 * Calendar: Export
+	 * @param {Object} criteria
+	 * @param {function} callback function for async call (optional)
+	 */
+	function __Export(criteria, callback){
+
+		if ((result = validator.apply('Export', arguments)) !== false)
+			return result; 
+
+		var Data = criteria.Data || false; 
+		if (!Data)
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.is_invalid, 'Data');
+
+		if (!Data.Format)
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.is_invalid, 'Format');
+
+		if (typeof callback == 'function') {
+			return context.callAsync(this, arguments.callee, criteria, callback);
+		}
+		context.notify(_t('%s:: Export : not implemented in preview.').arg(provider));
+		var returnValue = '';
+		return context.Result(returnValue, device.implementation.ERR_SUCCESS);		
+	}
+			
+
+	/**
+	 * Calendar: RequestNotification
+	 * @param {Object} criteria
+	 * @param {function} callback function for async call 
+	 */
+	function __RequestNotification(criteria, callback){
+
+		if ((result = validator.apply('RequestNotification', arguments)) !== false)
+			return result; 
+
+		if (typeof callback != 'function')
+			return error(device.implementation.ERR_SERVICE_NOT_SUPPORTED, msg.badAsync);
+
+		context.notify(_t('%s:: RequestNotification : not implemented in preview.').arg(provider));
+		var result = context.ErrorResult(device.implementation.ERR_SUCCESS);
+		result.TransactionID = 0;
+		return result;		
+	}
+			
+
+	/**
+	 * Calendar: Cancel
+	 * @param {Object} criteria
+	 */
+	function __Cancel(criteria){
+		method = 'Cancel';
+		if (!criteria || !criteria.TransactionID)
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.missingTID);
+		
+		clearTimeout(criteria.TransactionID);
+		return context.ErrorResult(device.implementation.ERR_SUCCESS);
+	}
+
+
+	
+	/*******************************
+	 * helper functions
+	 *******************************/
+	
+	function error(code, msg /*, args...*/){
+
+		var args = ['Calendar',method].concat([].slice.call(arguments,2));
+		msg = msg ? _t().arg.apply(msg,args) : undefined;
+		return context.ErrorResult(code, msg);
+	}
+
+	/**
+	 * validate common input arguments
+	 * 'this' is string (object) name of calling function
+	 * 
+	 * @param {arguments} arguments of calling function
+	 * @return {Result} Result object if error, false if no error.
+	 */
+	function validator() {
+		method = ''+this;
+		var	failed = false,
+			criteria = arguments[0] || false;
+			
+		if (!criteria)
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.badType);
+			
+		if (typeof criteria != 'object' || typeof criteria.Type == 'undefined')
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.badType);
+		
+		var TypeRE = /Import|Export|RequestNotification/i.test(method)
+			? /^CalendarEntry$/i
+			: /^(Calendar|CalendarEntry)$/i;
+		 
+		if (!TypeRE.test(criteria.Type)) 
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.badType);
+		
+		return failed;
+	}
+
+	/** 
+	 * error messages
+	 * order of %s args: Service name, method name, parameter name 
+	 */
+	var msg = {
+		badType			: '%s : %s : Type is invalid',
+		badCalendar		: '%s : %s : CalendarName is invalid',
+		missingCalendar	: '%s : %s : CalendarName is missing',
+		missingTID 		: '%s : %s : TransactionID is missing',
+		badAsync		: '%s : %s : Invalid async parameters',
+		noAsync			: '%s : %s : Async not supported',
+		is_missing		: '%s : %s : %s is missing',
+		is_invalid		: '%s : %s : %s is invalid'
+	};
+		
+
+}) ();
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/preview/script/lib/sapi/Contact.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,407 @@
+/**
+ * Contact.js
+ * 
+ * Nokia Web Runtime Service API emulation 
+ * WRT v1.1
+ * 
+ * Copyright 2009 Nokia Corporation. All rights reserved.
+*/
+
+ 
+(function(){
+	
+	var provider = 'Service.Contact' ,
+		Interface = 'IDataSource';
+
+	/**
+	 * Contact service
+	 */
+	var ContactService = function(){
+		this.GetList 	= __GetList;
+		this.Add 		= __Add;
+		this.Delete 	= __Delete;
+		this.Import 	= __Import;
+		this.Export 	= __Export;
+		this.Organise	= __Organise;
+		this.Cancel 	= __Cancel;
+	}
+
+	device.implementation.extend(provider, Interface, new ContactService() );
+
+
+	/******************************************************/	
+	/******************************************************/	
+	/******************************************************/	
+
+	var	context = device.implementation.context,
+		_t = context._t,
+		method = '',
+		result = false,
+		DBase = null;
+	
+	/**
+	 * Contact: GetList
+	 * @param {Object} criteria
+	 * @param {Function} [callback] function for async call (optional)
+	 */
+	function __GetList(criteria, callback){
+
+		if ((result = validator.apply('GetList', arguments)) !== false)
+			return result; 
+	
+		if (!/^(Contact|Group|Database)$/i.test(criteria.Type))
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.badType);
+	
+		if (typeof callback == 'function') {
+			return context.callAsync(this, arguments.callee, criteria, callback);
+		}
+
+		var returnValue = [], 
+			match = null,
+			filter = criteria.Filter || null;
+ 
+		DBase = context.getData(provider);
+
+		// Type = Database
+		if (/Database/i.test(criteria.Type)){
+			returnValue = DBase.Database;
+		} 
+		// Type = Group
+		else if (/Group/i.test(criteria.Type)){
+			// filter by id
+			if (filter && filter.id) {
+				returnValue = findById(DBase.Group, filter.id);
+				if (returnValue.length == 0)
+					return error(device.implementation.ERR_NOT_FOUND);
+			}
+			// return all groups 
+			else {
+				returnValue = DBase.Group;
+			}
+		}				
+		// Type = Contact
+		else if (/Contact/i.test(criteria.Type)){
+
+			// filter by id
+			if (filter && filter.id) {
+				returnValue = findById(DBase.Contact, filter.id); 
+				if (returnValue.length == 0)
+					return error(device.implementation.ERR_NOT_FOUND);
+			}
+			// return all contacts 
+			else {
+				returnValue = DBase.Contact;
+			}
+
+			// unsupported filters 
+			if (filter 
+				&& (match = context.keys(filter).join().match(/SearchVal|DBUri/ig)) ) {
+				context.notify(_t('%s:: GetList : filter %s not implemented in preview').arg(provider, match.join()));
+			}
+			// unsupported sort			
+			if (criteria.Sort) { 
+				context.notify(_t('%s:: GetList : sort not implemented in preview').arg(provider));
+			}
+		}
+		return context.Result(context.Iterator(returnValue));
+	}
+			
+	/**
+	 * Contact: Add
+	 * @param {Object} criteria
+	 * @param {Function} [callback] function for async call (optional)
+	 */
+	function __Add(criteria, callback){
+
+		if ((result = validator.apply('Add', arguments)) !== false)
+			return result; 
+		
+		if (!/^(Contact|Group)$/i.test(criteria.Type))
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.badType2);
+
+		if (typeof callback == 'function') {
+			return context.callAsync(this, arguments.callee, criteria, callback);
+		}
+
+		DBase = context.getData(provider);
+		var Data = criteria.Data,
+			item;
+
+		// unsupported!			
+		if (Data.DBUri) {
+			context.notify(_t('%s:: Add : Data.DBUri not implemented in preview').arg(provider));
+		}
+
+		// Type = Group
+		if (/Group/i.test(criteria.Type)){
+
+			if (!Data.GroupLabel)
+				return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.missingGroupLabel);
+
+			// update
+			if (Data.id) {
+				returnValue = findById(DBase.Group, Data.id); 
+				if (returnValue.length == 0)
+					return error(device.implementation.ERR_BAD_ARGUMENT_TYPE);
+				
+				returnValue[0].GroupLabel = Data.GroupLabel;
+				//@todo: group contents!?
+			}
+			// new
+			else {
+				item = context.extend({}, Data); 
+				item.id = String(context.getUniqueID());
+				DBase.Group.push(item);
+			}
+		} 
+		// Type = Contact
+		else {
+			// update
+			if (Data.id) {
+				returnValue = findById(DBase.Contact, Data.id); 
+				if (returnValue.length == 0)
+					return error(device.implementation.ERR_BAD_ARGUMENT_TYPE);
+				
+				context.extend(returnValue[0], Data); 
+			}
+			// new
+			else {
+				item = context.extend({}, Data); 
+				item.id = String(context.getUniqueID());
+				DBase.Contact.push(item);
+			}
+		} 
+		// return success
+		return error(device.implementation.ERR_SUCCESS);
+	}
+			
+
+	/**
+	 * Contact: Delete
+	 * @param {Object} criteria
+	 * @param {Function} [callback] function for async call (optional)
+	 */
+	function __Delete(criteria, callback){
+		
+		if ((result = validator.apply('Delete', arguments)) !== false)
+			return result; 
+
+		if (!/^(Contact|Group)$/i.test(criteria.Type))
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.badType2);
+
+		var Data = criteria.Data;
+		if (!Data.IdList)
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.missingIdList);
+		if (typeof Data.IdList != 'object')
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.badIdList);
+		
+		DBase = context.getData(provider);
+		var type = criteria.Type;
+
+		// unsupported!			
+		if (Data.DBUri) {
+			context.notify(_t('%s:: Delete : Data.DBUri not implemented in preview').arg(provider));
+		}
+
+		if (typeof callback == 'function') {
+			return context.callAsync(this, arguments.callee, criteria, callback);
+		}
+
+		// for both Group & Contact:
+		var i,j,id,item;
+		for (j in Data.IdList) {
+			id = Data.IdList[j];
+			for (i in DBase[type]) {
+				item = DBase[type][i];
+				if (id == item.id) {
+					DBase[type].splice(i, 1);
+				}
+			}
+		}
+		// return success
+		return error(device.implementation.ERR_SUCCESS);				
+	}
+			
+
+	/**
+	 * Contact: Import
+	 * @param {Object} criteria
+	 * @param {Function} [callback] function for async call (optional)
+	 */
+	function __Import(criteria, callback){
+
+		if ((result = validator.apply('Import', arguments)) !== false)
+			return result; 
+
+		if (!/^(Contact)$/i.test(criteria.Type))
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.badType3);
+
+		var Data = criteria.Data;
+		if (!Data.SourceFile)
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.missingSourceFile);
+
+		if (typeof callback == 'function') {
+			return context.callAsync(this, arguments.callee, criteria, callback);
+		}
+
+		context.notify(_t('%s:: Import : not implemented in preview.').arg(provider));
+		return error(device.implementation.ERR_SUCCESS);		
+	}
+			
+
+	/**
+	 * Contact: Export
+	 * @param {Object} criteria
+	 * @param {Function} [callback] function for async call (optional)
+	 */
+	function __Export(criteria, callback){
+
+		if ((result = validator.apply('Export', arguments)) !== false)
+			return result; 
+
+		if (!/^(Contact)$/i.test(criteria.Type))
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.badType4);
+
+		var Data = criteria.Data;
+		if (!Data.DestinationFile)
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.missingDestinationFile);
+
+		if (!Data.id)
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.missingId);
+
+		if (typeof callback == 'function') {
+			return context.callAsync(this, arguments.callee, criteria, callback);
+		}
+
+		context.notify(_t('%s:: Export : not implemented in preview.').arg(provider));
+		return error(device.implementation.ERR_SUCCESS);		
+	}
+			
+
+	/**
+	 * Contact: Organise
+	 * @param {Object} criteria
+	 * @param {Function} [callback] function for async call (optional)
+	 */
+	function __Organise(criteria, callback){
+
+		if ((result = validator.apply('Organise', arguments)) !== false)
+			return result; 
+
+		if (!/^(Group)$/i.test(criteria.Type))
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.badType5);
+
+		var Data = criteria.Data;
+		if (!Data.id)
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.missingId2);
+
+		if (!Data.IdList)
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.missingIdList);
+
+		if (typeof Data.IdList != 'object')
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.badIdList);
+
+		if (!/^(Associate|Disassociate)$/i.test(criteria.OperationType))
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.badOperationType);
+
+		if (typeof callback == 'function') {
+			return context.callAsync(this, arguments.callee, criteria, callback);
+		}
+
+		context.notify(_t('%s:: Organise : not implemented in preview.').arg(provider));
+		return error(device.implementation.ERR_SUCCESS);		
+	}
+			
+
+	/**
+	 * Contact: Cancel
+	 * @param {Object} criteria
+	 */
+	function __Cancel(criteria){
+		method = 'Cancel';
+		if (!criteria || !criteria.TransactionID)
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.missingTID);
+		
+		clearTimeout(criteria.TransactionID);
+		return context.ErrorResult(device.implementation.ERR_SUCCESS);
+	}
+
+	
+	/*******************************
+	 * helper functions
+	 *******************************/
+	
+	function error(code, msg /*, args...*/){
+
+		var args = ['Contacts',method].concat([].slice.call(arguments,2));
+		msg = msg ? _t().arg.apply(msg,args) : undefined;
+		return context.ErrorResult(code, msg);
+	}
+
+	/**
+	 * validate common input arguments
+	 * 'this' is string (object) name of calling function
+	 * 
+	 * @param {arguments} arguments of calling function
+	 * @return {Result} Result object if error, false if no error.
+	 */
+	function validator() {
+		method = ''+this;
+		var	failed = false,
+			criteria = arguments[0] || false;
+			
+		if (!criteria || typeof criteria != 'object' || typeof criteria.Type == 'undefined')
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.missingType, method);
+
+		if (method == 'GetList') return failed;
+
+		var Data = criteria.Data || false; 
+		if (!Data)
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.missingData, method);
+		if (typeof Data != 'object')
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.badData);
+		 
+		return failed;
+	}
+
+
+	function findById(dbase, id){
+		var result = [];
+		for (var i in dbase) {
+			if (id == dbase[i]['id']) {
+				result.push(dbase[i]);
+			}
+		}
+		return result;
+	}
+
+	/** 
+	 * error messages
+	 * order of %s args: Service name, method name, parameter name 
+	 */
+	var msg = {
+		missingType		: '%s : %s : Type is Missing',
+		badType			: '%s: %s : Invalid value for Type, Must be Contact/Group/Database',
+		badType2		: '%s : %s : Invalid Type, must be Contact/Group',
+		badType3		: '%s : %s : Invalid Type,it must be Contact',
+		badType4		: '%s : %s : Invalid Type, it must be Contact',
+		badType5		: '%s : %s : Invalid Content Type, It must be Group',
+		badOperationType: '%s : %s : Invalid Operation Type',
+		missingGroupLabel: '%s : %s : Group Label is Missing',
+		missingTID 		: 'Contact : Cancel : TransactionID is missing',	// not 'Contacts'!!
+		badAsync		: '%s : %s : Invalid async parameters',
+		missingData		: '%s : %s : %s data Missing',
+		badData			: '%s : %s : Invalid Type of Data , Map is required',
+		missingIdList	: '%s : %s : List of Ids is missing',
+		badIdList		: '%s : %s : Type of IdList is wrong, List is required',
+		missingSourceFile: '%s : %s : Import Source Filename is Missing',
+		missingDestinationFile: '%s : %s : Export Destination Filename is Missing',
+		missingId		: '%s : %s : Contact Id to be exported is missing',
+		missingId2		: '%s : %s : GroupId is missing',
+		is_missing		: '%s : %s : %s is missing',
+		is_invalid		: '%s : %s : %s is invalid'
+	};
+		
+
+}) ()
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/preview/script/lib/sapi/Landmarks.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,556 @@
+/**
+ * Landmarks.js
+ * 
+ * Nokia Web Runtime Service API emulation 
+ * WRT v1.1
+ * 
+ * Copyright 2009 Nokia Corporation. All rights reserved.
+*/
+
+ 
+(function(){
+	
+	var provider = 'Service.Landmarks',
+		Interface = 'IDataSource';
+
+	/**
+	 * Landmark service
+	 */
+	var LandmarkService = function(){
+		this.New 		= __New;
+		this.GetList 	= __GetList;
+		this.Add		= __Add;
+		this.Delete		= __Delete;		
+		this.Import 	= __Import;
+		this.Export		= __Export;
+		this.Organise	= __Organise;
+		this.Cancel		= __Cancel;				
+	}
+
+	device.implementation.extend(provider, Interface, new LandmarkService() );
+
+
+	/******************************************************/	
+	/******************************************************/	
+	/******************************************************/	
+
+	var	context = device.implementation.context,
+		_t = context._t,
+		method = '',
+		result = false,
+		DBase = null;
+
+	/**
+	 * Landmarks: New
+	 * @param {Object} criteria
+	 */
+	function __New(criteria){
+		if ((result = validator.apply('New', arguments)) !== false)
+			return result; 
+
+		if (typeof criteria.Type == 'undefined') 
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.missingType);
+
+		if (!/^(Landmark|Category)$/i.test(criteria.Type)) 
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.badType);		
+		
+		var returnValue;
+		
+		if(criteria.Type == 'Landmark')
+		{
+			returnValue = {
+				'LandmarkName'		: '',
+				'id' 				: '',
+				'CategoryInfo'		: '',
+				'LandmarkDesc'		: '',
+				'LandmarkPosition'	: {
+										'Latitude'	: '',
+										'Longitude' : '',
+										'Altitude' 	: '',
+										'HAccuracy' : '',
+										'VAccuracy' : '',
+										'VAccuracy' : ''
+									  },
+				'CoverageRadius'	: '',
+				'IconFile'			: '',
+				'IconIndex'			: '',
+				'IconMaskIndex'		: '',
+				'LandmarkFields'	: {
+										'Street'		: '',
+										'BuildingName'	: '',
+										'District'		: '',
+										'City'			: '',
+										'AreaCode'		: '',
+										'Telephone'		: '',
+										'Country'		: ''
+									  }
+			};
+		}
+		else //Category
+		{
+			returnValue = {
+				'CategoryName'	: '',
+				'id' 			: '',
+				'GlobalId'		: '',
+				'IconFile'		: '',
+				'IconIndex'		: '',
+				'IconMaskIndex'	: ''
+			};
+		}
+
+		return context.Result(returnValue);
+	}
+	
+	/**
+	 * Landmarks: GetList
+	 * @param {Object} criteria
+	 * @param {Function} [callback] function for async call (optional)
+	 */
+	function __GetList(criteria, callback){
+		
+		if ((result = validator.apply('GetList', arguments)) !== false)
+			return result; 
+
+		if (typeof criteria.Type == 'undefined') 
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.missingType);
+
+		if (!/^(Landmark|Category|Database)$/i.test(criteria.Type)) 
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.badType);
+
+		if (criteria.Filter)
+			context.notify(_t('%s:: GetList : filter not implemented in preview').arg(provider));
+
+ 		if(criteria.Sort)
+			context.notify(_t('%s:: GetList : Sort is not implemented in preview').arg(provider));
+
+		if (typeof callback == 'function') {
+			return context.callAsync(this, arguments.callee, criteria, callback);
+		}
+		
+		var returnValue = [], 
+			match = null,
+			filter = criteria.Filter || null;
+ 
+		DBase = context.getData(provider);
+
+
+		if (/Database/i.test(criteria.Type)) {				// Type = Database
+			
+			returnValue = context.Iterator( DBase.Database || [] );
+			
+		} else if (/Landmark/i.test(criteria.Type)){ 		// Type = Landmark
+			
+			returnValue = context.Iterator( DBase[criteria.Type] || [] );
+			
+		} else {											// Type = Category
+		
+			// @todo: apply filter criteria
+			returnValue = context.Iterator( DBase[criteria.Type] || [] );
+		}
+		return context.Result(returnValue);
+	}
+
+	/**
+	 * Landmarks: Add
+	 * @param {Object} criteria
+	 */
+	function __Add(criteria){
+		
+		if ((result = validator.apply('Add', arguments)) !== false)
+			return result; 
+
+		if (!/^(Landmark|Category)$/i.test(criteria.Type))
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.badType);
+
+
+		var Data = criteria.Data || false; 
+		if(!Data){
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.missingData);
+		}
+
+		DBase = context.getData(provider);
+		
+		// unsupported!			
+		if (Data.DatabaseURI) {
+			context.notify(_t('%s:: Add : Data.DatabaseURI not implemented in preview').arg(provider));
+		}
+		
+		var item;
+		
+		// Type = Landmark
+		if (/Landmark/i.test(criteria.Type)){
+
+			 if (!Data.LandmarkName)
+				Data.LandmarkName="";
+			
+			var landmarkPos = Data.LandmarkPosition;
+			if (typeof landmarkPos != 'undefined') {
+				if ((typeof landmarkPos.Latitude == 'undefined' || typeof landmarkPos.Latitude != 'number') &&
+					(typeof landmarkPos.Longitude == 'undefined' || typeof landmarkPos.Longitude != 'number') &&
+					(typeof landmarkPos.Altitude == 'undefined' || typeof landmarkPos.Altitude != 'number') &&
+					(typeof landmarkPos.HAccuracy == 'undefined' || typeof landmarkPos.HAccuracy != 'number') &&
+					(typeof landmarkPos.VAccuracy == 'undefined' || typeof landmarkPos.VAccuracy != 'number')) {
+						
+						return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.badType);
+				}
+			}
+			// update
+			if (typeof Data.id != 'undefined') {
+				if(typeof Data.id != 'string')
+						return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.invalidId);
+				
+				var retIndex = findById(DBase.Landmark, Data.id); 
+				if (retIndex == -1)
+					return error(device.implementation.ERR_NOT_FOUND);
+				DBase.Landmark[retIndex] = Data;
+				item = Data;
+			}
+			// new
+			else {
+				item = context.extend({}, Data); 
+				item.id = String(context.getUniqueID());
+				DBase.Landmark.push(item);
+			}
+		} else { // Type = Category
+//			alert(typeof Data.CategoryName);
+
+			//alert("Data.id : "+Data.id);
+			// update
+			if (typeof Data.id != 'undefined') {
+				if(typeof Data.id != 'string')
+						return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.invalidId);
+	
+				var retIndex = findById(DBase.Category, Data.id); 
+				if (retIndex == -1)
+					return error(device.implementation.ERR_NOT_FOUND);
+
+				DBase.Category[retIndex] = Data;					
+				item = Data;
+			}
+			// new
+			else {
+				if (typeof Data.CategoryName == 'undefined')
+					return error(device.implementation.ERR_MISSING_ARGUMENT, msg.missingCategoryName);	
+	
+				if(typeof Data.CategoryName != 'string' || Data.CategoryName.length <= 0)
+					return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.badType);
+
+				var retIndex = findByName(DBase.Category, Data.CategoryName); 
+				if (retIndex !=  -1)
+					return error(device.implementation.ERR_ENTRY_EXISTS);
+					
+				item = context.extend({}, Data); 
+				item.id = String(context.getUniqueID());
+				DBase.Category.push(item);
+			}
+		} 
+		// return success
+		return context.Result(item.id, device.implementation.ERR_SUCCESS);
+	}
+			
+	/**
+	 * Landmarks: Delete
+	 * @param {Object} criteria
+	 */
+	function __Delete(criteria){
+
+		if ((result = validator.apply('Delete', arguments)) !== false)
+			return result; 
+
+		if (!/^(Landmark|Category)$/i.test(criteria.Type))
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.badType);
+
+		var Data = criteria.Data || false; 
+		if(!Data){
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.missingData);
+		}
+
+		if (typeof Data.id == 'undefined') {
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.missingId);
+			}
+
+		if (typeof Data.id != 'undefined' && typeof Data.id != 'string') {
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.invalidId);
+		}
+		if(Data.id.length <= 0 )
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.invalidId);
+			
+		DBase = context.getData(provider);
+		
+		var type = criteria.Type;
+
+		// unsupported!			
+		if (Data.DBUri) {
+			context.notify(_t('%s:: Delete : Data.DBUri not implemented in preview').arg(provider));
+		}
+
+		// for both Landmark & Category:
+		var i,item;
+
+		for (i in DBase[type]) {
+			item = DBase[type][i];
+			if (Data.id == item.id) {
+				DBase[type].splice(i, 1);
+			}
+		}
+
+		// return success
+		return error(device.implementation.ERR_SUCCESS);				
+	}
+		
+	/**
+	 * Landmarks: Import
+	 * @param {Object} criteria
+	 */
+	function __Import(criteria){
+		
+		if ((result = validator.apply('Import', arguments)) !== false)
+			return result; 
+
+		if (!/^(Landmark)$/i.test(criteria.Type))
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.badType);
+
+		context.notify(_t('%s:: Import : not implemented in preview.').arg(provider));
+
+		var Data = criteria.Data || false; 
+		if(!Data)
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.missingData);
+
+		if (!Data.SourceFile)
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.missingSourceFile);
+
+		if (!Data.MimeType)
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.missingMimeType);
+
+		if (!/^(application\/vnd.nokia.landmarkcollection\+xml|application\/vnd.nokia.landmark\+wbxml)$/i.test(Data.MimeType))
+			return error(device.implementation.ERR_SERVICE_NOT_SUPPORTED, msg.invalidMime);
+
+		return error(device.implementation.ERR_SUCCESS);		
+	}
+			
+
+	/**
+	 * Landmarks: Export
+	 * @param {Object} criteria
+	 */
+	function __Export(criteria){
+
+		if ((result = validator.apply('Export', arguments)) !== false)
+			return result; 
+
+		context.notify(_t('%s:: Export : not implemented in preview.').arg(provider));
+		if (!/^(Landmark)$/i.test(criteria.Type))
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.badType);
+
+		var Data = criteria.Data || false; 
+		if(!Data){
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.missingData);
+		}
+
+		if (!Data.DestinationFile)
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.missingDestFile);
+			
+		if (!Data.MimeType)
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.missingMimeType);
+
+		if (!Data.IdList)
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.missingIdList);
+
+		return error(device.implementation.ERR_SUCCESS);		
+	}
+			
+
+	/**
+	 * Landmarks: Organise
+	 * @param {Object} criteria
+	 */
+	function __Organise(criteria){
+
+		if ((result = validator.apply('Organise', arguments)) !== false)
+			return result; 
+
+		if (!/^(Landmark)$/i.test(criteria.Type))
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.badType);
+
+		var Data = criteria.Data || false; 
+		if(!Data){
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.missingData);
+		}
+
+		if (!Data.id || Data.id == "")
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.invalidId);
+		
+		DBase = context.getData(provider);
+		var categories = DBase['Category'];
+		var landmarks  = DBase['Landmark'];
+		var found = false;
+		
+		
+		for(var i=0;i<categories.length;i++)
+		{
+			var category = categories[i];
+			if (category.id == Data.id) {
+				found = true;
+				break;
+			}
+		}
+		if(!found)
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.invalidId);
+
+		try{
+			if(!Data.IdList || Data.IdList.length <=0)
+			{
+				return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.invalidId);
+			}
+		}catch(e){
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.invalidId);
+		}
+		
+		if (!/^(Associate|Disassociate)$/i.test(criteria.OperationType))
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.invalidOpType);
+		
+		context.notify(_t('%s:: Organise : not implemented in preview.').arg(provider));
+		if(/^Associate$/i.test(criteria.OperationType))
+		{
+			for(var i=0;i<landmarks.length;i++)
+			{
+				for(var j=0;j<Data.IdList.length;j++)
+				{
+					if(landmarks[i] == Data.IdList[j])
+					{
+						if(!landmarks[i].CategoryInfo)
+						{
+							landmarks[i].CategoryInfo = new Array();
+							landmarks[i].CategoryInfo.push(Data.id);					
+						}
+						else{
+							var landmark = landmarks[i];
+							var found = false;
+							for(var k=0;k<landmark.CategoryInfo.length;k++)
+							{
+								if(landmark.CategoryInfo[k] == Data.id)
+									found = true;
+							}
+							if(!found)
+								landmark.CategoryInfo.push(Data.id);
+						}
+						
+					}
+				}
+			}
+		}
+		else
+		{
+			for(var i=0;i<landmarks.length;i++)
+			{
+				for(var j=0;j<Data.IdList.length;j++)
+				{
+					if(landmarks[i] == Data.IdList[j] && landmarks[i].CategoryInfo != undefined)
+					{
+						var landmark = landmarks[i];
+						for(var k=0;k<landmark.CategoryInfo.length;k++)
+						{
+							if(landmark.CategoryInfo[k] == Data.id)
+								landmark.CategoryInfo.splice(k,1);
+						}
+					}
+				}
+			}
+		}
+		
+		return error(device.implementation.ERR_SUCCESS);		
+	}
+		
+
+	/**
+	 * Landmarks: Cancel
+	 * @param {Object} criteria
+	 */
+	function __Cancel(criteria){
+		method = 'Cancel';
+		
+		if ((result = validator.apply('Cancel', arguments)) !== false)
+			return result;		
+			
+		if (!criteria.TransactionID)
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.missingTID);
+		
+		clearTimeout(criteria.TransactionID);
+		return context.ErrorResult(device.implementation.ERR_SUCCESS);
+	}
+
+
+	
+	/*******************************
+	 * helper functions
+	 *******************************/
+	function error(code, msg /*, args...*/){
+
+		var args = ['Landmarks',method].concat([].slice.call(arguments,2));
+		msg = msg ? _t().arg.apply(msg,args) : undefined;
+		return context.ErrorResult(code, msg);
+	}
+
+	/**
+	 * validate common input arguments
+	 * 'this' is string (object) name of calling function
+	 * 
+	 * @param {arguments} arguments of calling function
+	 * @return {Result} Result object if error, false if no error.
+	 */
+	function validator() {
+		method = ''+this;
+		var	failed = false,
+			criteria = arguments[0] || false;
+			
+		if (!criteria || typeof criteria != 'object')
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.missingType);
+
+		return failed;
+	}
+	
+	function findById(dbase, id){
+		for (var i in dbase) {
+			if (id == dbase[i]['id']) {
+				return i;
+			}
+		}
+		return -1;
+	}	
+
+	function findByName(dbase, name){
+		for (var i in dbase) {
+			if (name == dbase[i]['CategoryName']) {
+				return i;
+			}
+		}
+		return -1;
+	}	
+
+
+	/** 
+	 * error messages
+	 * order of %s args: Service name, method name, parameter name 
+	 */
+	var msg = {
+		missingType			: '%s%s : Type is missing',
+		badType				: '%s%s : Type is invalid',		
+		missingData			: '%s%s : Type or Data is missing',
+		missingId			: '%s%s : Id is missing',
+		invalidId			: '%s%s : id is invalid',
+		missingLandmarkName	: '%s%s : Landmrak name Missing',
+		missingCategoryName	: '%s%s : CategoryName is missing',
+		missingSourceFile	: '%s%s : Import Source Filename is Missing',
+		missingMimeType		: '%s%s : MIME type for source file is Missing',
+		missingDestFile		: '%s%s : DestinationFile is missing',
+		invalidOpType		: '%s%s : OperationType is invalid',
+		missingIdList		: '%s%s : Id list is Missing',
+		missingTID 			: '%s%s : TransactionID is missing',
+		invalidMime			: '%s%s : MimeType is missing',
+		msgNoMsg			: '',
+		
+	};
+		
+
+}) ()
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/preview/script/lib/sapi/Location.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,523 @@
+/**
+ * Location.js
+ * 
+ * Nokia Web Runtime Service API emulation 
+ * WRT v1.1
+ * 
+ * Copyright 2009 Nokia Corporation. All rights reserved.
+*/
+
+ 
+(function(){
+	
+	var provider = 'Service.Location',
+		Interface = 'ILocation';
+
+	/**
+	 * Landmark service
+	 */
+	var LocationService = function(){
+		this.GetLocation 			= __GetLocation;
+		this.Trace 					= __Trace;
+		this.Calculate				= __Calculate;
+		this.CancelNotification		= __CancelNotification;		
+	}
+
+	device.implementation.extend(provider, Interface, new LocationService() );
+
+
+	/******************************************************/	
+	/******************************************************/	
+	/******************************************************/	
+
+	var	context = device.implementation.context,
+		_t = context._t,
+		method = '',
+		result = false,
+		DBase = null;
+
+
+	var transactionIds = new Array();
+	var tTransactionId = -1;
+	var isTraceInProgress = false;
+	var criteriaTrace;
+	var callbackTrace;
+
+	/**
+	 * Landmarks: GetLocation
+	 * @param {Object} criteria
+	 */
+	function __GetLocation(criteria, callback, flag){	
+		method = "GetLocation";
+		//	Async call
+		flag = flag || false;
+
+		if (!criteria) {
+			criteria = new Object();
+		}	
+		
+		if(typeof criteria.LocationInformationClass == "undefined")
+			criteria.LocationInformationClass = "BasicLocationInformation"; // Default value of LocationInformationClass is "BasicLocationInformation" if not provided
+
+		var result = validateArgument('GetLocation',criteria);
+		if(result.ErrorCode != 0)
+			return result;
+		
+		if (typeof callback == 'function') {
+			
+			var retVal = context.callAsync(this, arguments.callee, criteria, callback,true);
+			transactionIds.push(retVal.TransactionID);  // all transaction ids are pushed on this variable, because CancelNotification function of SAPI doesn't take TransactioID as input
+			return retVal;
+		}
+		
+		if(flag)
+		{
+			transactionIds.shift();  // Remove oldest TransactionID(FIFO) (Async call)
+		}
+		
+		DBase = context.getData(provider);
+		var returnValue = DBase[criteria.LocationInformationClass];
+		locationNotify(criteria.Updateoptions);
+		return context.Result(returnValue);
+	}
+	
+	/**
+	 * Location: Trace
+	 * @param {Object} criteria
+	 * @param {Function} callback function for async call
+	 */
+	function __Trace(criteria, callback){
+		method = "Trace";
+
+		if (!criteria) {
+			criteria = new Object();
+		}	
+		
+		if(typeof criteria.LocationInformationClass == "undefined")
+			criteria.LocationInformationClass = "BasicLocationInformation"; // Default value of LocationInformationClass is "BasicLocationInformation" if not provided
+
+		if (typeof callback != 'function') { // callback should be valid function
+			return error(device.implementation.ERR_SERVICE_NOT_SUPPORTED,msg.msgCommandNotFound); 
+		}
+		
+		var result = validateArgument('Trace',criteria);
+		if(result.ErrorCode != 0)
+			return result;
+		
+		criteriaTrace = criteria;
+		callbackTrace = callback;
+		isTraceInProgress = true;
+		locationNotify(criteria.Updateoptions);
+
+		return traceCall(criteria,callback);
+	}
+
+	/**
+	 * Location: Calculate
+	 * @param {Object} criteria
+	 */
+	function __Calculate(criteria){
+		method = "Calculate";
+		if(!criteria || !criteria.MathRequest)
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE,msg.msgCalcMissingMathReq);
+			
+		if(typeof criteria.MathRequest != "string" || (criteria.MathRequest != "FindDistance" && criteria.MathRequest != "FindBearingTo" && criteria.MathRequest != "MoveCoordinates")) // Error check for wrong MathRequest criteria
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE,msg.msgCalcWrongTypeMathReq);
+			
+		if(typeof criteria.DistanceParamSource != "object" || (typeof criteria.DistanceParamSource.Latitude != "number" || typeof criteria.DistanceParamSource.Longitude != "number" || typeof criteria.DistanceParamSource.Altitude != "number"))
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE,msg.msgCalcMissingArgLocCord);
+
+		if(criteria.MathRequest == "FindDistance" || criteria.MathRequest == "FindBearingTo")
+		{
+			if(typeof criteria.DistanceParamSource != "object" || (typeof criteria.DistanceParamDestination.Latitude != "number" || typeof criteria.DistanceParamDestination.Longitude != "number" || typeof criteria.DistanceParamDestination.Altitude != "number"))
+				return error(device.implementation.ERR_BAD_ARGUMENT_TYPE,msg.msgCalcMissingArgLocCord);
+			if (criteria.MathRequest == "FindDistance") {
+				var dist = LatLon.distHaversine(criteria.DistanceParamDestination.Latitude, criteria.DistanceParamDestination.Longitude, criteria.DistanceParamSource.Latitude, criteria.DistanceParamSource.Longitude)*1000;
+				if (typeof criteria.DistanceParamDestination.Altitude == "number" && typeof criteria.DistanceParamSource.Altitude == "number") {
+					var delta = criteria.DistanceParamDestination.Altitude - criteria.DistanceParamSource.Altitude
+					dist = Math.sqrt(dist * dist + delta * delta);
+				}
+				return context.Result(dist);
+			}
+			else if (criteria.MathRequest == "FindBearingTo"){
+				var bearing = LatLon.bearing( criteria.DistanceParamSource.Latitude, criteria.DistanceParamSource.Longitude,criteria.DistanceParamDestination.Latitude, criteria.DistanceParamDestination.Longitude);
+				return context.Result(bearing);				
+			}
+		}
+		else if(criteria.MathRequest == "MoveCoordinates"){
+
+			if(typeof criteria.MoveByThisDistance == "undefined")
+				return error(device.implementation.ERR_BAD_ARGUMENT_TYPE,msg.msgCalcMissingArgMoveDist);
+			
+			if(typeof criteria.MoveByThisBearing == "undefined")
+				return error(device.implementation.ERR_BAD_ARGUMENT_TYPE,msg.msgCalcMissingArgMoveBear);
+			
+
+			if(typeof criteria.MoveByThisDistance != "number")
+				return error(device.implementation.ERR_BAD_ARGUMENT_TYPE,msg.msgCalcWrongTypeMoveDist);
+			
+			if(typeof criteria.MoveByThisBearing != "number")
+				return error(device.implementation.ERR_BAD_ARGUMENT_TYPE,msg.msgCalcWrongTypeMoveBear);
+			
+			var latLon = new LatLon(criteria.DistanceParamSource.Latitude, criteria.DistanceParamSource.Longitude);
+			var dlatLon = latLon.destPoint(criteria.MoveByThisBearing, criteria.MoveByThisDistance/1000);
+			var retVal = new Object();
+			retVal.Longitude = dlatLon.lon;
+			retVal.Latitude = dlatLon.lat;
+			retVal.Altitude = criteria.DistanceParamSource.Altitude;
+			return context.Result(retVal);
+		}
+	}
+			
+	/**
+	 * Location: CancelNotification
+	 * @param {Object} criteria
+	 */
+	function __CancelNotification(criteria){
+		method = "Cancel";
+		if(!criteria)
+				return error(device.implementation.ERR_MISSING_ARGUMENT,msg.msgCancelMissingType);
+		
+		var arr = new Array();
+		var i = 0;
+		var key
+		for(key in criteria);
+			arr[i++] = key;
+
+		if(!criteria.CancelRequestType && arr.length)
+				return error(device.implementation.ERR_NOT_FOUND,msg.msgCancelMissingType);
+		
+		if(criteria.CancelRequestType != "GetLocCancel" && criteria.CancelRequestType != "TraceCancel")
+				return error(device.implementation.ERR_BAD_ARGUMENT_TYPE,msg.msgCancelWrongType);
+		
+		if (criteria.CancelRequestType == "GetLocCancel") {
+			for (var i = 0; i < transactionIds.length; i++) {
+				clearTimeout(transactionIds[i])
+			}
+		}
+		
+		if (criteria.CancelRequestType == "TraceCancel")
+		{
+			isTraceInProgress = false;
+			tTransactionId = -1;
+		}
+		return context.ErrorResult(device.implementation.ERR_SUCCESS);
+	}
+		
+
+
+	
+	/*******************************
+	 * helper functions
+	 *******************************/
+
+	/**
+	 * Location: traceCall
+	 * @param {} 
+	 * This function emulates repetitive trace calls,It calls specified callback function after every UpdateInterval untill 
+	 * CancelNotification is called
+	 */
+	function traceCall(){
+		var tid = setTimeout(function(){
+		if(!isTraceInProgress)
+			return;
+			
+		DBase = context.getData(provider);
+		var returnValue = DBase[criteriaTrace.LocationInformationClass];
+		var result,
+			eventCode = {completed:2, error:4, progress:9},
+		code = eventCode.completed;
+
+		callbackTrace(tTransactionId,code,context.Result(returnValue,0));
+		traceCall();
+		}, criteriaTrace.Updateoptions.UpdateInterval/1000);
+		if(tTransactionId == -1)
+			tTransactionId = tid;
+		return context.AsyncResult(tTransactionId);
+	}
+
+	/**
+	 * Location: validateArgument
+	 * @param {string,object} callingMethod and criteria
+	 * Validates arguments
+	 */
+	function validateArgument(fun,criteria)
+	{
+		method = fun;
+		if(typeof criteria.Updateoptions != "undefined")
+		{
+			if(typeof criteria.Updateoptions != "object") // Checking for error in UpdateOptions criteria
+				return error(device.implementation.ERR_BAD_ARGUMENT_TYPE,msg.msgGetLocationBadArg);
+			
+			if(typeof criteria.Updateoptions.UpdateInterval != "undefined" && typeof criteria.Updateoptions.UpdateInterval != "number")
+				return error(device.implementation.ERR_BAD_ARGUMENT_TYPE,msg.msgGetLocationWrongType);
+			
+			if(typeof criteria.Updateoptions.UpdateTimeOut != "undefined" && typeof criteria.Updateoptions.UpdateTimeOut != "number")	
+				return error(device.implementation.ERR_BAD_ARGUMENT_TYPE,msg.msgGetLocationWrongType);
+
+			if(typeof criteria.Updateoptions.UpdateMaxAge != "undefined" && typeof criteria.Updateoptions.UpdateMaxAge != "number")	
+				return error(device.implementation.ERR_BAD_ARGUMENT_TYPE,msg.msgGetLocationWrongType);
+
+			if(typeof criteria.Updateoptions.PartialUpdates != "undefined" && typeof criteria.Updateoptions.PartialUpdates != "boolean")	
+				return error(device.implementation.ERR_BAD_ARGUMENT_TYPE,msg.msgGetLocationWrongType);
+
+			if((typeof criteria.Updateoptions.UpdateInterval != "undefined" && criteria.Updateoptions.UpdateInterval  < 0) || 
+					(typeof criteria.Updateoptions.UpdateTimeOut != "undefined" && criteria.Updateoptions.UpdateTimeOut  < 0) ||
+					(typeof criteria.Updateoptions.UpdateMaxAge != "undefined" && criteria.Updateoptions.UpdateMaxAge  < 0))
+				return error(device.implementation.ERR_BAD_ARGUMENT_TYPE,msg.msgGetLocationNegInt);
+
+			if(typeof criteria.Updateoptions.UpdateTimeOut != "undefined" && typeof criteria.Updateoptions.UpdateInterval != "undefined" && criteria.Updateoptions.UpdateInterval > criteria.Updateoptions.UpdateTimeOut)
+			{
+				return error(device.implementation.ERR_BAD_ARGUMENT_TYPE,msg.msgNone);
+			}
+
+			/*if((typeof criteria.Updateoptions.UpdateTimeOut != "undefined" && criteria.Updateoptions.UpdateTimeOut <= 1000000))// || (typeof criteria.Updateoptions.UpdateInterval != "undefined" && criteria.Updateoptions.UpdateInterval <= 1000000))
+			{
+				return error(device.implementation.ERR_BAD_ARGUMENT_TYPE,msg.msgNone);
+			}*/				
+		}
+
+		if(typeof criteria.LocationInformationClass != "undefined" && criteria.LocationInformationClass != "BasicLocationInformation" && criteria.LocationInformationClass != "GenericLocationInfo") // checking for errors in LocationInformationClass criteria
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE,msg.msgGetLocationWrongCat);
+		
+		if (/^Trace$/i.test(fun)&&(!criteria.Updateoptions || typeof criteria.Updateoptions.UpdateInterval == "undefined")) {
+			if(!criteria.Updateoptions)
+			{
+				criteria.Updateoptions = new Object();
+			}
+			criteria.Updateoptions.UpdateInterval = 1000000;  // Emulation only!! for convenience UpdateInterval is set to 1 second is not specified or if it less than 1 second
+			context.notify("Using default UpdateInterval(1000000 micro seconds)"); 
+		}
+		
+		return context.ErrorResult(device.implementation.ERR_SUCCESS, "");
+		
+	}
+
+	/**
+	 * Location: error
+	 * @param {number,string} ErrorCode and ErrorString
+	 * Replaces Error String with method name
+	 */
+	function error(code, msg /*, args...*/){
+
+		var args = ['location',method].concat([].slice.call(arguments,2));
+		msg = msg ? _t().arg.apply(msg,args) : undefined;
+		return context.ErrorResult(code, msg);
+	}
+	
+	function locationNotify(updateoptions) {
+		if(!updateoptions)
+			return;
+		if(typeof updateoptions.UpdateTimeOut != "undefined")
+			context.notify(_t("%s:: %s : Updateoptions.UpdateTimeOut not implemented in preview").arg(provider, method));
+
+		if(typeof updateoptions.UpdateMaxAge != "undefined")
+			context.notify(_t("%s:: %s : Updateoptions.UpdateMaxAge not implemented in preview").arg(provider, method));
+
+		if(typeof updateoptions.PartialUpdates != "undefined")
+			context.notify(_t("%s:: %s : Updateoptions.PartialUpdates not implemented in preview").arg(provider, method));
+	}
+
+	/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  */
+	/*  Latitude/longitude spherical geodesy formulae & scripts (c) Chris Veness 2002-2009            */
+	/*	http://www.movable-type.co.uk/scripts/latlong.html											  */  
+	/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  */
+	
+	/*
+	 * Use Haversine formula to Calculate distance (in km) between two points specified by 
+	 * latitude/longitude (in numeric degrees)
+	 *
+	 * example usage from form:
+	 *   result.value = LatLon.distHaversine(lat1.value.parseDeg(), long1.value.parseDeg(), 
+	 *                                       lat2.value.parseDeg(), long2.value.parseDeg());
+	 * where lat1, long1, lat2, long2, and result are form fields
+	 */
+	
+	
+	LatLon.distHaversine = function(lat1, lon1, lat2, lon2) {
+	  var R = 6371; // earth's mean radius in km
+	  var dLat = toRad(lat2-lat1);
+	  var dLon = toRad(lon2-lon1);
+	  lat1 = toRad(lat1), lat2 = toRad(lat2);
+	
+	  var a = Math.sin(dLat/2) * Math.sin(dLat/2) +
+	          Math.cos(lat1) * Math.cos(lat2) * 
+	          Math.sin(dLon/2) * Math.sin(dLon/2);
+	  var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));
+	  var d = R * c;
+	  return d;
+	}
+	
+	
+	/*
+	 * ditto using Law of Cosines
+	 */
+	LatLon.distCosineLaw = function(lat1, lon1, lat2, lon2) {
+	  var R = 6371; // earth's mean radius in km
+	  var d = Math.acos(Math.sin(toRad(lat1))*Math.sin(toRad(lat2)) +
+	                    Math.cos(toRad(lat1))*Math.cos(toRad(lat2))*Math.cos(toRad(lon2-lon1))) * R;
+	  return d;
+	}
+	
+	
+	/*
+	 * calculate (initial) bearing between two points
+	 *   see http://williams.best.vwh.net/avform.htm#Crs
+	 */
+	LatLon.bearing = function(lat1, lon1, lat2, lon2) {
+	  lat1 = toRad(lat1); lat2 = toRad(lat2);
+	  var dLon = toRad(lon2-lon1);
+
+	  var y = Math.sin(dLon) * Math.cos(lat2);
+	  var x = Math.cos(lat1)*Math.sin(lat2) -
+	          Math.sin(lat1)*Math.cos(lat2)*Math.cos(dLon);
+	  return toBrng(Math.atan2(y, x));
+	}
+	
+	
+	/*
+	 * calculate destination point given start point, initial bearing (deg) and distance (km)
+	 *   see http://williams.best.vwh.net/avform.htm#LL
+	 */
+	LatLon.prototype.destPoint = function(brng, d) {
+	  var R = 6371; // earth's mean radius in km
+	  var lat1 = toRad(this.lat), lon1 = toRad(this.lon);
+	  brng = toRad(brng);
+	
+	  var lat2 = Math.asin( Math.sin(lat1)*Math.cos(d/R) + 
+	                        Math.cos(lat1)*Math.sin(d/R)*Math.cos(brng) );
+	  var lon2 = lon1 + Math.atan2(Math.sin(brng)*Math.sin(d/R)*Math.cos(lat1), 
+	                               Math.cos(d/R)-Math.sin(lat1)*Math.sin(lat2));
+	  lon2 = (lon2+Math.PI)%(2*Math.PI) - Math.PI;  // normalise to -180...+180
+	
+	  if (isNaN(lat2) || isNaN(lon2)) return null;
+	  return new LatLon(toDeg(lat2), toDeg(lon2));
+	}
+	
+	
+	/*
+	 * construct a LatLon object: arguments in numeric degrees
+	 *
+	 * note all LatLong methods expect & return numeric degrees (for lat/long & for bearings)
+	 */
+	function LatLon(lat, lon) {
+	  this.lat = lat;
+	  this.lon = lon;
+	}
+	
+	
+	/*
+	 * represent point {lat, lon} in standard representation
+	 */
+	LatLon.prototype.toString = function() {
+	  return this.lat.toLat() + ', ' + this.lon.toLon();
+	}
+	
+	/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  */
+	
+	// extend String object with method for parsing degrees or lat/long values to numeric degrees
+	//
+	// this is very flexible on formats, allowing signed decimal degrees, or deg-min-sec suffixed by 
+	// compass direction (NSEW). A variety of separators are accepted (eg 3º 37' 09"W) or fixed-width 
+	// format without separators (eg 0033709W). Seconds and minutes may be omitted. (Minimal validation 
+	// is done).
+	
+	function parseDeg (str) {
+	  if (!isNaN(str)) return Number(str);                 // signed decimal degrees without NSEW
+	
+	  var degLL = str.replace(/^-/,'').replace(/[NSEW]/i,'');  // strip off any sign or compass dir'n
+	  var dms = degLL.split(/[^0-9.]+/);                     // split out separate d/m/s
+	  for (var i in dms) if (dms[i]=='') dms.splice(i,1);    // remove empty elements (see note below)
+	  switch (dms.length) {                                  // convert to decimal degrees...
+	    case 3:                                              // interpret 3-part result as d/m/s
+	      var deg = dms[0]/1 + dms[1]/60 + dms[2]/3600; break;
+	    case 2:                                              // interpret 2-part result as d/m
+	      var deg = dms[0]/1 + dms[1]/60; break;
+	    case 1:                                              // decimal or non-separated dddmmss
+	      if (/[NS]/i.test(str)) degLL = '0' + degLL;       // - normalise N/S to 3-digit degrees
+	      var deg = dms[0].slice(0,3)/1 + dms[0].slice(3,5)/60 + dms[0].slice(5)/3600; break;
+	    default: return NaN;
+	  }
+	  if (/^-/.test(str) || /[WS]/i.test(str)) deg = -deg; // take '-', west and south as -ve
+	  return deg;
+	}
+	// note: whitespace at start/end will split() into empty elements (except in IE)
+	
+	
+	/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  */
+	
+	// extend Number object with methods for converting degrees/radians
+	
+	function toRad (deg) {  // convert degrees to radians
+	  return deg * Math.PI / 180;
+	}
+	
+	function toDeg (rad) {  // convert radians to degrees (signed)
+	  return rad * 180 / Math.PI;
+	}
+	
+	function toBrng (rad) {  // convert radians to degrees (as bearing: 0...360)
+	  return (toDeg(rad)+360) % 360;
+	}
+	
+	
+	/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  */
+	
+	// extend Number object with methods for presenting bearings & lat/longs
+	
+	function toDMS (num) {  // convert numeric degrees to deg/min/sec
+	  var d = Math.abs(num);  // (unsigned result ready for appending compass dir'n)
+	  d += 1/7200;  // add ½ second for rounding
+	  var deg = Math.floor(d);
+	  var min = Math.floor((d-deg)*60);
+	  var sec = Math.floor((d-deg-min/60)*3600);
+	  // add leading zeros if required
+	  if (deg<100) deg = '0' + deg; if (deg<10) deg = '0' + deg;
+	  if (min<10) min = '0' + min;
+	  if (sec<10) sec = '0' + sec;
+	  return deg + '\u00B0' + min + '\u2032' + sec + '\u2033';
+	}
+	
+	function toLat (deg) {  // convert numeric degrees to deg/min/sec latitude
+	  return toDMS(deg).slice(1) + (deg<0 ? 'S' : 'N');  // knock off initial '0' for lat!
+	}
+	
+	function toLon (deg) {  // convert numeric degrees to deg/min/sec longitude
+	  return toDMS(deg) + (deg>0 ? 'E' : 'W');
+	}
+	
+	function toPrecision (num,fig) {  // override toPrecision method with one which displays 
+	  if (num == 0) return 0;                      // trailing zeros in place of exponential notation
+	  var scale = Math.ceil(Math.log(num)*Math.LOG10E);
+	  var mult = Math.pow(10, fig-scale);
+	  return Math.round(num*mult)/mult;
+	}
+
+
+	/** 
+	 * error messages
+	 * order of %s args: Service name, method name, parameter name 
+	 */
+	var msg = {
+		msgCommandNotFound			: '%s : Command Not found',
+		msgGetLocationWrongCat		: '%s : %s : wrong category info should be BasicLocationInformation/GenericLocationInfo ',
+		msgGetLocationBadArg		: '%s : %s : BadArgument - Updateoptions',
+		msgGetLocationNegInt		: '%s : %s : Negative Time Interval',
+		msgGetLocationWrongType 	: '%s : %s : UpdateOptions Type mismatch',
+		msgTraceWrongCat			: '%s : %s : Invalid LocationInformationClass',
+		msgCalcMissingMathReq 		: '%s : %s : Missing argument - MathRequest',
+		msgCalcWrongTypeMathReq 	: '%s : %s : Wrong argument - MathRequest',
+		msgCalcMissingArgLocCord 	: '%s : %s : Missing argument - locationcoordinate',
+		msgCalcMissingArgMoveDist 	: '%s : %s : Missing argument - MoveByThisDistance',
+		msgCalcMissingArgMoveBear 	: '%s : %s : Missing argument - MoveByThisBearing',
+		msgCalcWrongTypeMoveDist  	: '%s : %s : TypeMismatch - MoveByThisDistance',
+		msgCalcWrongTypeMoveBear 	: '%s : %s : TypeMismatch - MoveByThisBearing',
+		msgCancelBadArg 			: '%s : %s : BadArgument – cancel type',
+		msgCancelMissingType 		: '%s : %s : Missing cancel type',
+		msgCancelWrongType 			: '%s : %s : Wrong cancel type'	,
+		msgNone						: ''	
+	};
+		
+
+}) ()
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/preview/script/lib/sapi/Logging.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,535 @@
+/**
+ * Logging.js
+ * 
+ * Nokia Web Runtime Service API emulation 
+ * WRT v1.1
+ * 
+ * Copyright 2009 Nokia Corporation. All rights reserved.
+*/
+
+ 
+(function(){
+	
+	var provider = 'Service.Logging',
+		Interface = 'IDataSource';
+
+	/**
+	 * Landmark service
+	 */
+	var LoggingService = function(){
+		this.Add 					= __Add;
+		this.GetList 				= __GetList;
+		this.Delete					= __Delete;
+		this.RequestNotification	= __RequestNotification;		
+		this.Cancel					= __Cancel;		
+
+	}
+
+	device.implementation.extend(provider, Interface, new LoggingService() );
+
+
+	/******************************************************/	
+	/******************************************************/	
+	/******************************************************/	
+
+	var	context = device.implementation.context,
+		_t = context._t,
+		method = '',
+		result = false,
+		DBase = null;
+
+	var transactionIds = new Array();
+	var tTransactionId = -1;
+	var isTraceInProgress = false;
+	var criteriaReq;
+	var callbackReq;
+
+	/**
+	 * Logging: Add
+	 * @param {Object} criteria
+	 * @param (function) callback
+	 */
+	function __Add(criteria, callback, flag){
+		method = "Add";
+		//	Async call
+		flag = flag || false;
+
+		if (!flag) {
+			var result = ValidateAdd(criteria, callback);
+			if (result.ErrorCode != 0) 
+				return result;
+		}			
+		
+		
+		if(typeof callback == 'function')
+		{
+			return context.callAsync(this, arguments.callee, criteria, callback);
+		}
+		DBase = context.getData(provider);
+		var returnValue = DBase[criteria.Type];
+		criteria.Item.id = 	GenerateRandomNumber()+'';
+		criteria.Item["EventTime"] = GetCurrDate();
+		returnValue.push(criteria.Item);
+		return context.Result(criteria.Item.id,0);
+	}
+
+	/**
+	 * Logging: GetList
+	 * @param {Object} criteria
+	 * @param (function) callback
+	 */
+	function __GetList(criteria, callback, flag){	
+		method = "GetList";
+		//	Async call
+		flag = flag || false;
+
+		if (!flag) {
+			var result = ValidateGetList(criteria, callback);
+			if (result.ErrorCode != 0) 
+				return result;
+		}			
+		
+		
+		if(typeof callback == 'function')
+		{
+			return context.callAsync(this, arguments.callee, criteria, callback);
+		}
+		if(criteria.Filter){
+			context.notify(_t('%s:: GetList : filter not implemented in preview').arg(provider));
+		}
+				
+		DBase = context.getData(provider);
+		var returnValue;
+		// @todo: apply filter criteria
+		returnValue = context.Iterator( DBase[criteria.Type] || [] );
+		
+		return context.Result(returnValue,0);
+	}
+
+	/**
+	 * Logging: Delete
+	 * @param {Object} criteria
+	 * @param (function) callback
+	 */
+	function __Delete(criteria, callback, flag){
+		method = "Delete";
+		//	Async call
+		flag = flag || false;		
+		if (!flag) {
+			if (!criteria || !criteria.Type) 
+				return error(device.implementation.ERR_MISSING_ARGUMENT, msg.msgTypeMissing);
+
+			if (typeof criteria.Type != 'string') 
+				return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.msgTypeInvalid);
+			
+			if (criteria.Type != 'Log') 
+				return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.msgTypeInvalid);
+			
+			if (!criteria.Data) 
+				return error(device.implementation.ERR_MISSING_ARGUMENT, msg.msgDataMissing);
+			
+			if(typeof criteria.Data != 'object')
+				return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.msgDataInvalid);
+
+			if(typeof criteria.Data.id == 'undefined')
+				return error(device.implementation.ERR_MISSING_ARGUMENT, msg.msgid);
+			
+			if (typeof criteria.Data.id != "string") 
+				return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.msgidInvalid);
+				
+			if(criteria.Data.id == '')
+				return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.msgidInvalid);
+		}
+		DBase = context.getData(provider);
+		var returnValue,found = false;
+		returnValue = DBase[criteria.Type];
+		for(var i=0; i<returnValue.length; i++){
+			if(returnValue[i].id == criteria.Data.id)
+			{
+				found = true;
+				returnValue.splice(i,1);
+			}			
+		}
+		if(!found)
+			return error(device.implementation.ERR_NOT_FOUND, msg.msgidInvalid);
+		
+		return context.Result(undefined,0);
+	}
+
+	/**
+	 * Logging: RequestNotification
+	 * @param {Object} criteria
+	 * @param (function) callback
+	 */
+	function __RequestNotification(criteria, callback, flag){
+		method = "RequestNotification";
+		
+		//	Async call
+		flag = flag || false;		
+		if (!flag) {
+			if (!criteria || !criteria.Type) 
+				return error(device.implementation.ERR_MISSING_ARGUMENT, msg.msgTypeMissing);
+
+			if (typeof criteria.Type != 'string') 
+				return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.msgTypeInvalid);
+			
+			if (criteria.Type != 'Log') 
+				return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.msgTypeInvalid);
+			
+			if (!criteria.Filter)
+				return error(device.implementation.ERR_MISSING_ARGUMENT, msg.msgFilterMissing);
+
+			if(typeof criteria.Filter != 'object') 
+				return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.msgFilterInvalid);
+			
+			if(typeof criteria.Filter.DelayTime == 'undefined') 
+				return error(device.implementation.ERR_MISSING_ARGUMENT, msg.msgDelayTimeMissing);
+			
+			if(typeof criteria.Filter.DelayTime != 'number')
+				return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.msgDelayTimeInvalid);
+			if(criteria.Filter.DelayTime <= 0)
+				return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.msgDelayTimeInvalid);
+			
+			if(criteria.Filter.DelayTime < 1000000 )
+			{
+				criteria.Filter.DelayTime = 1000000;
+				context.notify(_t('%s:: RequestNotification : Using DelayTime = 1000000').arg(provider));
+			}
+		}
+		if(typeof callback != 'function')
+				return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.msgMissingCallback);
+
+		criteriaReq = criteria;
+		callbackReq = callback;
+		isTraceInProgress = true;
+
+		return notificationCall(criteria,callback);
+	}
+
+	/**
+	 * Logging: Cancel
+	 * @param {Object} criteria
+	 * @param (function) callback
+	 */
+	function __Cancel(criteria){
+			method = "Cancel";
+			if (!criteria || typeof criteria.TransactionID == 'undefined') 
+				return error(device.implementation.ERR_MISSING_ARGUMENT, msg.msgTransactionIdMissing);
+			
+			if (typeof criteria.TransactionID != 'number') 
+				return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.msgTransactionIdInvalid);
+			
+			clearTimeout(criteria.TransactionID);
+			if (criteria.TransactionID == tTransactionId) {
+				isTraceInProgress = false;
+				tTransactionId = -1;
+			}
+		return context.ErrorResult(device.implementation.ERR_SUCCESS);
+
+	}
+	
+
+	/**
+	 * Location: error
+	 * @param {number,string} ErrorCode and ErrorString
+	 * Replaces Error String with method name
+	 */
+	function error(code, msg /*, args...*/){
+
+		var args = ['Logging',method].concat([].slice.call(arguments,2));
+		msg = msg ? _t().arg.apply(msg,args) : undefined;
+		return context.ErrorResult(code, msg);
+	}
+	
+	/**
+	 * Logging: notificationCall
+	 * @param {} 
+	 * This function Calls callback function after given delay
+	 */
+	function notificationCall(){
+		var tid = setTimeout(function(){
+		if(!isTraceInProgress)
+			return;
+			
+		DBase = context.getData(provider);
+		var returnValue;
+		returnValue = context.Iterator( DBase[criteriaReq.Type] || [] );
+
+		var result,
+			eventCode = {completed:2, error:4, progress:9},
+		code = eventCode.completed;
+
+		callbackReq(tTransactionId,code,context.Result(returnValue,0));
+		//notificationCall();
+		}, criteriaReq.Filter.DelayTime/1000);
+		if(tTransactionId == -1)
+			tTransactionId = tid;
+		return context.AsyncResult(tTransactionId);
+	}
+	
+	/**
+	 * Helper functions
+	 */
+
+	/**
+	 * GenerateRandomNumber
+	 * @param {}array of log data for getting unique ID 
+	 * 
+	 */
+	function GenerateRandomNumber(arr)
+	{
+		var randomnumber = Math.floor(Math.random() * 10001);
+		randomnumber +=200;
+		return randomnumber;
+	}
+
+	/**
+	 * GetCurrDate
+	 * @param {}Gets date in internet format
+	 * 
+	 */
+	function GetCurrDate()
+	{
+		var d_names = new Array("Sunday", "Monday", "Tuesday",
+		"Wednesday", "Thursday", "Friday", "Saturday");
+		
+		var m_names = new Array("January", "February", "March", 
+		"April", "May", "June", "July", "August", "September", 
+		"October", "November", "December");
+		
+		var ampm = "am";
+		
+		var d = new Date();
+		var curr_day = d.getDay();
+		var curr_date = d.getDate();
+		if(curr_date <10)
+			curr_date = "0"+curr_date;
+		var curr_month = d.getMonth();
+		var curr_year = d.getFullYear();
+		var curr_hour = d.getHours();
+		if(curr_hour > 11)
+		{
+			ampm = "pm";
+		}
+		else if(curr_hour <10)
+		{
+			curr_hour = "0"+curr_hour;
+		}	
+		var curr_min = d.getMinutes();
+		if(curr_min <10)
+			curr_min = "0"+curr_min;
+	
+		var curr_sec = d.getSeconds();
+		if(curr_sec <10)
+			curr_sec = "0"+curr_sec;
+		
+		var strDate = d_names[curr_day]+', '+curr_date+' '+m_names[curr_month]+', '+curr_year+' '+curr_hour+':'+curr_min+':'+curr_sec+' '+ampm;
+		return strDate;
+	}	
+
+	/**
+	 * ValidateAdd
+	 * @param {object,function}
+	 * Validates ADD arguments
+	 */	
+	function ValidateAdd(criteria,callback)
+	{
+		var type;
+		if(!criteria || !criteria.Type)
+			return error(device.implementation.ERR_MISSING_ARGUMENT,msg.msgTypeMissing);
+
+		if (typeof criteria.Type != 'string') 
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.msgTypeInvalid);
+		
+		if(criteria.Type != 'Log')
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT,msg.msgTypeInvalid);
+		
+		if (!criteria.Item)
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.msgItemMissing);
+
+		if(typeof criteria.Item != 'object') 
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.msgItemInvalid);
+		
+		
+		if(typeof criteria.Item.EventType == "undefined")
+			return error(device.implementation.ERR_MISSING_ARGUMENT,msg.msgEventTypeMissing);
+
+		if(typeof criteria.Item.EventType != "number" )
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE,msg.msgEventTypeInvalid);
+		
+		if(typeof criteria.Item.EventType == "number" && !(criteria.Item.EventType >=0 && criteria.Item.EventType <=4))
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT,msg.msgEventTypeInvalid);
+		
+		type = typeof criteria.Item.RemoteParty;
+		if(type != 'undefined' &&  type != "string")
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE,msg.msgRemotePartyInvalid);
+		
+		type = typeof criteria.Item.Direction;
+		if (type != 'undefined') {
+			if (type != "number") 
+				return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.msgDirectionInvalid);
+			
+			if (type == "number" && (criteria.Item.Direction < 0 || criteria.Item.Direction > 6)) 
+				return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.msgDirectionInvalid);
+		}
+
+		type = typeof criteria.Item.EventDuration;
+		if(type != 'undefined' &&  type != "number")
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE,msg.msgEventDurationInvalid);
+			
+		type = typeof criteria.Item.DeliveryStatus;
+		if (type != 'undefined') {
+			if (type != "number") 
+				return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.msgDeliveryStatusInvalid);
+			
+			if (type == "number" && (criteria.Item.DeliveryStatus < 0 || criteria.Item.DeliveryStatus > 6)) 
+				return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.msgDeliveryStatusInvalid);
+		}
+		
+		type = typeof criteria.Item.Subject;
+		if(type != 'undefined' &&  type != "string")
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE,msg.msgSubjectInvalid);
+
+		type = typeof criteria.Item.PhoneNumber;
+		if(type != 'undefined' &&  type != "string")
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE,msg.msgPhoneNumberInvalid);
+
+		type = typeof criteria.Item.Link;
+		if(type != 'undefined' &&  type != "number")
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE,msg.msgLinkInvalid);
+
+		type = typeof criteria.Item.LogFlags;
+		if(type != 'undefined' && (type != "number" || (criteria.Item.LogFlags != 1 && criteria.Item.LogFlags != 0)))
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE,msg.msgLogFlagsInvalid);
+
+		return context.ErrorResult(device.implementation.ERR_SUCCESS, "");
+	}	
+
+	/**
+	 * ValidateGetList
+	 * @param {object,function}
+	 * Validates GetList function
+	 */	
+	function ValidateGetList(criteria,callback)
+	{
+		var type;
+		if(!criteria || !criteria.Type)
+			return error(device.implementation.ERR_MISSING_ARGUMENT,msg.msgTypeMissing);
+
+		if (typeof criteria.Type != 'string') 
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.msgTypeInvalid);
+		
+		if(criteria.Type != 'Log')
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT,msg.msgTypeInvalid);
+
+		type = typeof criteria.Filter;
+		if(type != 'undefined' &&  type != "object")
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE,msg.msgFilterInvalid);
+		
+		if(type == 'undefined')
+			return context.ErrorResult(device.implementation.ERR_SUCCESS, "");		
+		
+		type = typeof criteria.Filter.id;
+		if(type != 'undefined' &&  type != "string")
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE,msg.msgid);
+		
+		if(type != 'undefined')
+			return context.ErrorResult(device.implementation.ERR_SUCCESS, "");  // if id is given all other filters will be ignored
+
+		type = typeof criteria.Filter.EventType;
+		if (type != 'undefined') {
+			if (type != "number") 
+				return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.msgEventTypeInvalid);
+		
+			if (type != "number" || !(criteria.Filter.EventType >= 0 && criteria.Filter.EventType <= 4)) 
+				return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.msgEventTypeInvalid);
+		}		
+		type = typeof criteria.Filter.RecentList;
+		if (type != 'undefined') {
+			if (type != "number") 
+				return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.msgRecentListInvalid);
+			if (type == "number" && (criteria.Filter.RecentList < -1 || criteria.Filter.RecentList > 3)) 
+				return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.msgRecentListInvalid);
+		}
+		
+		type = typeof criteria.Filter.RemoteParty;
+		if(type != 'undefined' &&  type != "string")
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE,msg.msgRemotePartyInvalid);
+		
+		type = typeof criteria.Filter.Direction;
+		if (type != 'undefined') {
+			if (type != "number") 
+				return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.msgDirectionInvalid);
+			if (type == "number" && (criteria.Filter.Direction < 0 || criteria.Filter.Direction > 6)) 
+				return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.msgDirectionInvalid);
+		}
+		
+		type = typeof criteria.Filter.DeliveryStatus;
+		if (type != 'undefined') {
+			if (type != "number") 
+				return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.msgDeliveryStatusInvalid);
+			if (type == "number" && (criteria.Filter.DeliveryStatus < 0 || criteria.Filter.DeliveryStatus > 6)) 
+				return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.msgDeliveryStatusInvalid);
+		}
+
+		type = typeof criteria.Filter.EndTime;
+		if(type != 'undefined' && (type != "object" ||  typeof criteria.Filter.EndTime.getTime != "function"))
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE,msg.msgEndTimeInvalid);
+
+		type = typeof criteria.Filter.PhoneNumber;
+		if(type != 'undefined' &&  type != "string")
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE,msg.msgPhoneNumberInvalid);
+
+
+		type = typeof criteria.Filter.LogFlags;
+		if (type != 'undefined') {
+			if (type != "number") 
+				return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.msgLogFlagsInvalid);
+			if (type == "number" && (criteria.Filter.LogFlags != 1 && criteria.Filter.LogFlags != 0)) 
+				return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.msgLogFlagsInvalid);
+		}
+		return context.ErrorResult(device.implementation.ERR_SUCCESS, "");
+	}	
+
+
+	/** 
+	 * error messages
+	 * order of %s args: Service name, method name, parameter name 
+	 */
+	var msg = {
+		msgTypeInvalid 				: '%s:%s:TypeInvalid',
+		msgTypeMissing				: '%s:%s:Type Missing',
+		msgFilterInvalid			: '%s:%s:FilterInvalid',
+		msgidInvalid				: '%s:%s:idInvalid',
+		msgRecentListInvalid		: '%s:%s:RecentListInvalid',
+		msgPhoneNumberInvalid		: '%s:%s:PhoneNumberInvalid',
+		msgDirectionInvalid			: '%s:%s:DirectionInvalid',
+		msgDeliveryStatusInvalid	: '%s:%s:DeliveryStatusInvalid',
+		msgLogFlagsInvalid			: '%s:%s:LogFlagsInvalid',
+		msgEndTimeInvalid			: '%s:%s:EndTimeInvalid',
+		msgRemotePartyInvalid		: '%s:%s:RemotePartyInvalid',
+		msgEventTypeInvalid			: '%s:%s:EventTypeInvalid',
+		msgItemInvalid				: '%s:%s:ItemInvalid',
+		msgItemMissing				: '%s:%s:ItemMissing',
+		msgEventTypeInvalid			: '%s:%s:EventTypeInvalid',
+		msgEventTypeMissing			: '%s:%s:EventType Missing',
+		msgEventDurationInvalid		: '%s:%s:EventDurationInvalid',
+		msgSubjectInvalid			: '%s:%s:SubjectInvalid',
+		msgEventDataInvalid			: '%s:%s:EventDataInvalid',
+		msgLinkInvalid				: '%s:%s:LinkInvalid',
+		msgDataInvalid				: '%s:%s:DataInvalid',
+		msgDataMissing				: '%s:%s:Data Missing',
+		msgid						: '%s:%s:id',
+		msgFilterInvalid			: '%s:%s:FilterInvalid',
+		msgFilterMissing			: '%s:%s:Filter Missing',
+		msgDelayTimeInvalid			: '%s:%s:DelayTimeInvalid',
+		msgDelayTimerMissing		: '%s:%s:DelayTimerMissing',
+		msgTransactionIdInvalid		: '%s:%s:TransactionIdInvalid',
+		msgTransactionIdMissing		: '%s:%s:TransactionID Missing',
+		msgMissingCallback			: '%s:%s:Missing Callback',
+		msgNoMsg					: '%s:%s:'
+	};
+		
+
+}) ()
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/preview/script/lib/sapi/MediaManagement.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,157 @@
+/**
+ * MediaManagement.js
+ * 
+ * Nokia Web Runtime Service API emulation 
+ * WRT v1.1
+ * 
+ * Copyright 2009 Nokia Corporation. All rights reserved.
+*/
+
+ 
+(function(){
+	
+	var provider = 'Service.MediaManagement' ,
+		Interface = 'IDataSource';
+
+	/**
+	 * MediaManagement service
+	 */
+	var MediaManagementService = function(){
+		this.GetList 	= __GetList;
+		this.Cancel 	= __Cancel;
+	}
+
+	device.implementation.extend(provider, Interface, new MediaManagementService() );
+
+
+	/******************************************************/	
+	/******************************************************/	
+	/******************************************************/	
+
+	var	context = device.implementation.context,
+		_t = context._t,
+		method = '',
+		result = false,
+		DBase = null;
+	
+	/**
+	 * MediaManagement: GetList
+	 * @param {Object} criteria
+	 * @param {Function} callback function for async call (mandatory)
+	 */
+	function __GetList(criteria, callback, _flag){
+
+		if ((result = validator.apply('GetList', arguments)) !== false)
+			return result; 
+
+		// _flag=true indicates re-called state
+		_flag = _flag || false;
+		if (!_flag) {
+
+			// callback is mandatory
+			if (typeof callback != 'function')
+				return error(device.implementation.ERR_MISSING_ARGUMENT, msg.badAsync);
+			
+			// continue validation after callback check		
+			if (!criteria.Filter) 
+				return error(device.implementation.ERR_MISSING_ARGUMENT, msg.is_missing, 'Filter');
+			
+			if (!criteria.Filter.FileType) 
+				return error(device.implementation.ERR_MISSING_ARGUMENT, msg.is_missing, 'FileType');
+			
+			if (!/^(Music|Sound|Image|Video|StreamingURL)$/i.test(criteria.Filter.FileType)) 
+				return error(device.implementation.ERR_BAD_ARGUMENT_TYPE);
+			
+			// process callback
+			_flag = true;
+			return context.callAsync(this, arguments.callee, criteria, callback, _flag);
+		}
+		
+		var returnValue = [], 
+			match = null,
+			fileType = criteria.Filter.FileType,
+			filter = criteria.Filter;
+ 
+ 		// normalize filetype
+		fileType = fileType[0].toUpperCase() + fileType.substr(1).toLowerCase();
+		fileType = fileType.replace(/url/i, 'URL');
+		
+		DBase = context.getData(provider);
+
+		// unsupported filters 
+		if (filter 
+			&& (match = context.keys(filter).join().match(/Key|StartRange|EndRange/ig)) ) {
+			context.notify(_t('%s:: GetList : filter %s not implemented in preview').arg(provider, match.join()));
+		}
+		// unsupported sort			
+		if (criteria.Sort) { 
+			context.notify(_t('%s:: GetList : sort not implemented in preview').arg(provider));
+		}
+
+		returnValue = DBase[fileType];
+		return context.Result(context.Iterator(returnValue));
+	}
+			
+			
+	/**
+	 * MediaManagement: Cancel
+	 * @param {Object} criteria
+	 */
+	function __Cancel(criteria){
+		method = 'Cancel';
+		if (!criteria || !criteria.TransactionID)
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.missingTID);
+		
+		clearTimeout(criteria.TransactionID);
+		return context.ErrorResult(device.implementation.ERR_SUCCESS);
+	}
+
+
+	
+	/*******************************
+	 * helper functions
+	 *******************************/
+	
+	function error(code, msg /*, args...*/){
+
+		var args = ['MediaMgmt',method].concat([].slice.call(arguments,2));
+		msg = msg ? _t().arg.apply(msg,args) : undefined;
+		return context.ErrorResult(code, msg);
+	}
+
+	/**
+	 * validate common input arguments
+	 * 'this' is string (object) name of calling function
+	 * 
+	 * @param {arguments} arguments of calling function
+	 * @return {Result} Result object if error, false if no error.
+	 */
+	function validator() {
+		method = ''+this;
+		var	failed = false,
+			criteria = arguments[0] || false;
+			
+		if (!criteria || typeof criteria != 'object' || typeof criteria.Type == 'undefined')
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.is_missing, 'Type');
+		
+		if (!/^FileInfo$/i.test(criteria.Type)) 
+			return error(device.implementation.ERR_SERVICE_NOT_SUPPORTED, msg.badType);
+
+		return failed;
+	}
+
+	/** 
+	 * error messages
+	 * order of %s args: Service name, method name, parameter name 
+	 */
+	var msg = {
+		badType			: '%s : %s : Type not supported',
+		missingTID 		: '%s : %s : TransactionID is missing',
+		badAsync		: '%s : %s : Insufficient arguments for async request',
+		is_missing		: '%s : %s : %s is missing',
+		is_invalid		: '%s : %s : %s is invalid'
+	};
+		
+
+}) ()
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/preview/script/lib/sapi/Messaging.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,366 @@
+/**
+ * Messaging.js
+ * 
+ * Nokia Web Runtime Service API emulation 
+ * WRT v1.1
+ * 
+ * Copyright 2009 Nokia Corporation. All rights reserved.
+*/
+  
+(function(){
+	
+	var provider = 'Service.Messaging' ,
+		Interface = 'IMessaging';
+		
+	/**
+	 * Messaging service
+	 */
+	var MessagingService = function(){
+		this.GetList			 	= __GetList;
+		this.Send 					= __Send;
+		this.RegisterNotification	= __RegisterNotification;
+		this.CancelNotification 	= __CancelNotification;
+		this.ChangeStatus 			= __ChangeStatus;
+		this.Delete					= __Delete;
+		this.Cancel 				= __Cancel;
+	}
+
+	device.implementation.extend(provider, Interface, new MessagingService() );
+
+
+	/******************************************************/	
+	/******************************************************/	
+	/******************************************************/	
+
+	var	context = device.implementation.context,
+		_t = context._t,
+		method = '',
+		result = false,
+		DBase = null;
+	
+	/**
+	 * Messaging: GetList
+	 * @param {Object} criteria
+	 */
+	function __GetList(criteria){
+
+		if ((result = validator.apply('GetList', arguments)) !== false)
+			return result; 
+	
+		if (!criteria.Type)
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.missingType);
+
+		if (!/^Inbox$/i.test(criteria.Type))
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.badType);
+	
+		var returnValue = [], 
+			match = null,
+			filter = criteria.Filter || null;
+ 
+		DBase = context.getData(provider);
+
+		// filter by MessageId
+		if (filter && filter.MessageId) {
+			returnValue = findByKey(DBase.Inbox, filter.MessageId, 'MessageId'); 
+			if (returnValue.length == 0)
+				return error(device.implementation.ERR_NOT_FOUND);
+		}
+		// return all messages
+		else {
+			returnValue = DBase.Inbox;
+		}
+
+		// unsupported filters 
+		if (filter 
+			&& (match = context.keys(filter).join().match(/MessageTypeList|SenderList|Subject|StartDate|EndDate/ig)) ) {
+			context.notify(_t('%s:: GetList : filter %s not implemented in preview').arg(provider, match.join()));
+		}
+		// unsupported sort			
+		if (criteria.Sort) { 
+			context.notify(_t('%s:: GetList : sort not implemented in preview').arg(provider));
+		}
+		return context.Result(context.Iterator(returnValue));
+	}
+			
+	/**
+	 * Messaging: Send
+	 * @param {Object} criteria
+	 * @param {Function} [callback] function for async call (optional)
+	 */
+	function __Send(criteria, callback){
+
+		if ((result = validator.apply('Send', arguments)) !== false)
+			return result; 
+
+		if (!criteria.MessageType)
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.missingMessageType);
+			
+		if (!/^(SMS|MMS)$/i.test(criteria.MessageType))
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.badMessageType);
+
+		if (!criteria.To)
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.missingTo);
+		
+		// async call?
+		if (typeof callback == 'function') {
+			return context.callAsync(this, arguments.callee, criteria, callback);
+		}
+
+		context.notify(_t('%s:: Send : message sent!').arg(provider));
+
+		// return success
+		return error(device.implementation.ERR_SUCCESS);
+	}
+			
+
+	/**
+	 * Messaging: RegisterNotification
+	 * @param {Object} criteria
+	 * @param {function} callback function for async call (mandatory)
+	 */
+	function __RegisterNotification(criteria, callback){
+
+		if ((result = validator.apply('RegisterNotification', arguments)) !== false)
+			return result; 
+
+		// callback is mandatory
+		if (typeof callback != 'function')
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.badAsync);
+		
+		// continue validation after callback check		
+		if (typeof criteria.Type == 'undefined') 
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.missingType);
+		
+		if (!/^NewMessage$/i.test(criteria.Type)) 
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.badType);
+
+		var eventType =  'NewMessage';
+
+		// check for multiple registration
+		if (context.hasListener(provider, eventType))
+			return error(device.implementation.ERR_ENTRY_EXISTS);
+				
+		// process notify
+		return context.addListener(provider, eventType, criteria, callback, notifyHandler);
+	}
+			
+	function notifyHandler(transactionID, criteria, callback, data){
+		
+		var result,
+			eventCode = {completed:2, error:4, progress:9},
+			code = eventCode.progress;
+		try{
+			DBase = context.getData(provider);
+			
+			// make new message
+			var now = new Date();
+			var message = {
+			 	"MessageType": "SMS",
+				"Sender": "0435445454",
+				"Subject": "new message",
+				"Time": _t("%s, %s").arg(now.toString().substr(0,3), now.toLocaleString()),
+				"Priority": "Medium",
+				"Attachment": false,
+				"Unread": true,
+				"MessageId": context.getUniqueID(),
+				"BodyText": "My hovercraft is full of eels!"
+			};
+			
+			// extend with optional data
+			data = typeof data=='object' && !(data instanceof Array) ? data : {};
+			var returnValue = context.extend(message, data);
+
+			result = context.Result(returnValue);
+			
+			/// add to top of inbox
+			DBase.Inbox.unshift(message);
+		} 
+		catch(e){
+			code = eventCode.error;
+		}
+		callback(transactionID, code, result);
+	}
+	
+	/**
+	 * Messaging: CancelNotification
+	 * @param {Object} criteria
+	 */
+	function __CancelNotification(criteria){
+
+		if ((result = validator.apply('CancelNotification', arguments)) !== false)
+			return result; 
+
+		if (typeof criteria.Type == 'undefined') 
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.missingType);
+
+		if (!/^NewMessage$/i.test(criteria.Type)) 
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.badType);
+
+		var eventType = 'NewMessage';
+		context.removeListener(provider, eventType);
+		return context.ErrorResult(device.implementation.ERR_SUCCESS);
+	}
+			
+			
+	/**
+	 * Messaging: ChangeStatus
+	 * @param {Object} criteria
+	 */
+	function __ChangeStatus(criteria){
+
+		if ((result = validator.apply('ChangeStatus', arguments)) !== false)
+			return result; 
+
+		if (!criteria.MessageId)
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.is_missing ,'MessageId');
+			
+		if (typeof criteria.MessageId != 'number')
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.badMessageIdType);
+			
+		if (!criteria.Status)
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.is_missing ,'Status');
+
+		if (!/^(Read|Unread|Replied|Forwarded)$/i.test(criteria.Status))
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.badStatus);
+	
+		// check if a callback was provided
+		if (arguments.length > 1)
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.badAsync2);
+			
+		DBase = context.getData(provider);
+
+		var i,item, found = false;
+		for (i in DBase.Inbox) {
+			item = DBase.Inbox[i];
+			if (criteria.MessageId == item.MessageId) {
+				item.Unread = /Unread/i.test(criteria.Status);
+				found = true;
+			}
+		}
+		if (!found)
+			return error(device.implementation.ERR_NOT_FOUND);
+
+		// return success
+		return error(device.implementation.ERR_SUCCESS);				
+	}
+						
+	/**
+	 * Messaging: Delete
+	 * @param {Object} criteria
+	 */
+	function __Delete(criteria){
+		
+		if ((result = validator.apply('Delete', arguments)) !== false)
+			return result; 
+
+		if (typeof criteria.MessageId == 'undefined')
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.missingMessageId);
+
+		if (typeof criteria.MessageId != 'number')
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.badMessageIdType);
+					
+		if (criteria.MessageId < 0)
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.badMessageId);
+			
+		DBase = context.getData(provider);
+
+		var i,item, found = false;
+		for (i in DBase.Inbox) {
+			item = DBase.Inbox[i];
+			if (criteria.MessageId == item.MessageId) {
+				DBase.Inbox.splice(i, 1);
+				found = true;
+			}
+		}
+		if (!found)
+			return error(device.implementation.ERR_NOT_FOUND);
+			
+		// return success
+		return error(device.implementation.ERR_SUCCESS);				
+	}
+			
+
+	/**
+	 * Messaging: Cancel
+	 * @param {Object} criteria
+	 */
+	function __Cancel(criteria){
+		method = 'Cancel';
+		if (!criteria || !criteria.TransactionID)
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.is_missing, 'TransactionID');
+		
+		clearTimeout(criteria.TransactionID);
+		return context.ErrorResult(device.implementation.ERR_SUCCESS);
+	}
+
+	
+	/*******************************
+	 * helper functions
+	 *******************************/
+	
+	function error(code, msg /*, args...*/){
+
+		var args = ['Messaging',method].concat([].slice.call(arguments,2));
+		msg = msg ? _t().arg.apply(msg,args) : undefined;
+		return context.ErrorResult(code, msg);
+	}
+
+	/**
+	 * validate common input arguments
+	 * 'this' is string (object) name of calling function
+	 * 
+	 * @param {arguments} arguments of calling function
+	 * @return {Result} Result object if error, false if no error.
+	 */
+	function validator() {
+		method = ''+this;
+		var	failed = false,
+			criteria = arguments[0] || false;
+
+		if (!criteria || typeof criteria != 'object')
+			return error(device.implementation.ERR_MISSING_ARGUMENT, 
+				method == 'Send' 
+				? msg.missingMessageType 
+				: (/ChangeStatus|Delete/.test(method) 
+					? msg.missingMessageId 
+					: msg.missingType) );
+			
+		return failed;
+	}
+
+
+	function findByKey(dbase, value, key){
+		var result = [];
+		for (var i in dbase) {
+			if (value == dbase[i][key]) {
+				result.push(dbase[i]);
+			}
+		}
+		return result;
+	}
+
+	/** 
+	 * error messages
+	 * order of %s args: Service name, method name, parameter name 
+	 */
+	var msg = {
+		missingType		: '%s:%s:Type Missing',
+		badType			: '%s:%s:Type Value Incorrect',
+		missingTo		: '%s:%s:To Missing',
+		badTo			: '%s:%s:To Value Incorrect',
+		missingMessageType	: '%s:%s:MessageType Missing',
+		badMessageType	: '%s:%s:MessageType Value Incorrect',
+		badAsync		: '%s:%s:Synchronous Operation not supported',
+		badAsync2		: '%s:%s:Asynchronous Operation not supported',
+		missingMessageId	: '%s:%s:MessageId Missing',
+		badMessageIdType: '%s:%s:MessageId Type Invalid',
+		badMessageId	: '%s:%s:MessageId Value Incorrect',
+		badStatus		: '%s:%s:Status Value Incorrect',
+
+		is_missing		: '%s:%s:%s Missing',
+		is_invalid		: '%s:%s:%s Value Incorrect'
+	};
+		
+
+}) ()
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/preview/script/lib/sapi/Sensor.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,250 @@
+/**
+ * Sensor.js
+ * 
+ * Nokia Web Runtime Service API emulation 
+ * WRT v1.1
+ * 
+ * Copyright 2009 Nokia Corporation. All rights reserved.
+*/
+
+(function(){
+
+	var provider = 'Service.Sensor',
+		Interface = 'ISensor';
+	var transID = new Array();
+	/**
+	 * Sensor service
+	 */
+	var SensorService = function(){
+		this.FindSensorChannel 			= __FindSensorChannel;
+		this.RegisterForNotification	= __RegisterForNotification;
+		this.Cancel						= __Cancel;
+		this.GetChannelProperty			= __GetChannelProperty;		
+	}
+
+	device.implementation.extend(provider, Interface, new SensorService() );
+
+	/******************************************************/	
+	/******************************************************/	
+	/******************************************************/	
+
+	var	context = device.implementation.context,
+		_t = context._t,
+		method = '',
+		result = false,
+		DBase = null;
+
+
+	/**
+	 * Sensor: FindSensorChannel
+	 * @param {Object} criteria
+	 */
+	function __FindSensorChannel(criteria){
+		method = 'FindSensorChannel';
+		if(!criteria)
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.msgCriteriaMissing);
+			
+		if(typeof criteria != 'object')
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.msgCriteriaMissing);
+						
+		if(typeof criteria.SearchCriterion == 'undefined')
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.msgDataMissing);
+
+		if(typeof criteria.SearchCriterion != 'string')
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.msgidInvalid);
+
+		if(!(criteria.SearchCriterion== "All" || criteria.SearchCriterion== "AccelerometerAxis" || criteria.SearchCriterion=="AccelerometerDoubleTapping" || criteria.SearchCriterion=="Orientation" || criteria.SearchCriterion=="Rotation"))
+		 	return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.msgSearchParamInvalid);
+
+		if(arguments.length > 1)
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.msgCriteriaMissing);			
+
+		DBase = context.getData(provider);
+		var returnValue;
+		returnValue = DBase[criteria.SearchCriterion] || [] ;
+		
+		return context.Result(returnValue,0);			
+	}
+
+
+
+	/**
+	 * Sensor: RegisterForNotification
+	 * @param {Object} criteria, callback
+	 */
+	function __RegisterForNotification(criteria, callback, flag){
+		flag = flag || false;
+		method = 'RegisterForNotification';
+		context.notify(_t('%s:: RegisterForNotification not implemented in preview').arg(provider));
+		
+		if(arguments.length >2 && (typeof flag != "undefined" && typeof flag != "boolean"))
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.msgCriteriaMissing);
+
+		if(typeof callback != 'function')
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.msgInsufficentArgument);
+		
+		
+		if(!criteria)
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.msgIncompleteInput);
+			
+		if(typeof criteria != 'object')
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.msgIncompleteInput);
+						
+		if(typeof criteria.ListeningType == 'undefined' || typeof criteria.ChannelInfoMap == 'undefined')
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.msgIncompleteInput);
+
+		if(typeof criteria.ListeningType != 'string')
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.msgListenTypeInvalid);
+			
+		if(typeof criteria.ChannelInfoMap != 'object')
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.msgChannelInfoMapInvalid);
+		
+		if(!(criteria.ListeningType== "ChannelData" ))
+		 	return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.msgOutofRange);
+
+		if(typeof callback == 'function')
+		{
+			var result = context.callAsync(this, arguments.callee, criteria, callback);
+			transID.push(result.TransactionID);
+			return result;
+		}
+		if(flag)
+			transID.shift();
+				
+		return context.ErrorResult();
+	}
+
+
+	/**
+	 * Sensor: Cancel
+	 * @param {Object} criteria
+	 */
+	function __Cancel(criteria){
+		method = 'Cancel';
+
+		if(arguments.length > 1 && typeof criteria != "object" && typeof criteria.TransactionID != "number" && arguments[1])
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.msgCriteriaMissing);
+
+		if (!criteria || typeof criteria.TransactionID == 'undefined') 
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.msgTransIDMissing);
+
+		if (criteria.TransactionID == Infinity || criteria.TransactionID == -Infinity) 
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.msgTransIDMissing);
+		
+		if (typeof criteria.TransactionID != 'number') 
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.msgIncorrectTransID);		
+
+		for (var i=0; i<transID.length; i++) {
+			if (criteria.TransactionID == transID[i]){
+				clearTimeout(criteria.TransactionID);
+				return context.ErrorResult();
+			}
+		};
+		
+		return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.msgInvalidTransID);
+
+	}
+
+
+	/**
+	 * Sensor: GetChannelProperty
+	 * @param {Object} criteria
+	 */
+	function __GetChannelProperty(criteria){
+		method = 'GetChannelProperty';
+
+		if(!criteria)
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.msgIncompleteInput);
+			
+		if(typeof criteria != 'object')
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.msgIncompleteInput);
+
+		if(typeof criteria.ChannelInfoMap == 'undefined' || typeof criteria.PropertyId == 'undefined')
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.msgIncompleteInput);
+		
+		if(typeof criteria.ChannelInfoMap != 'object')
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.msgChannelInfoMapInvalid);
+		
+		if(typeof criteria.PropertyId != 'string')
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.msgInvalidPropertyID);
+		
+		if(criteria.PropertyId != 'Availability' && criteria.PropertyId != "ChannelAccuracy" && criteria.PropertyId != "ChannelDataFormat" && criteria.PropertyId != "ChannelScale" && criteria.PropertyId != "ChannelUnit" && criteria.PropertyId != "ConnectionType" && criteria.PropertyId != "DataRate" && criteria.PropertyId != "Description" && criteria.PropertyId != "MeasureRange" && criteria.PropertyId != "ScaledRange" && criteria.PropertyId != "SensorModel")
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.msgInvalidPropertyID);
+
+		if(arguments.length > 1)
+			return error(device.implementation.ERR_INVALID_SERVICE_ARGUMENT, msg.msgCriteriaMissing);			
+
+		DBase = context.getData(provider);
+		var property = DBase['SensorProperty'];
+		if(typeof criteria.ChannelInfoMap['ChannelId'] == 'undefined' || typeof criteria.ChannelInfoMap['ChannelId'] != 'number')
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.msgChannelInfoMapInvalid);
+
+		var channel = null;
+		if(criteria.ChannelInfoMap['ChannelId'] == 7)
+		{
+			channel = 'AccelerometerAxis';
+		}
+		else if(criteria.ChannelInfoMap['ChannelId'] == 8)
+		{
+			channel = 'AccelerometerDoubleTapping';
+		}
+		else if(criteria.ChannelInfoMap['ChannelId'] == 10)
+		{
+			channel = 'Orientation';
+		}
+		else if(criteria.ChannelInfoMap['ChannelId'] == 11)
+		{
+			channel = 'Rotation';
+		}
+	
+		if(channel == null)
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.msgChannelInfoMapInvalid);
+		
+		var returnValue = property[channel][criteria.PropertyId];
+		if(typeof returnValue == 'undefined')
+			return context.ErrorResult(device.implementation.ERR_NOT_FOUND);
+		return context.Result(returnValue,0)
+	}
+
+	/**
+	 * Sensor: error
+	 * @param {number,string} ErrorCode and ErrorString
+	 * Replaces Error String with method name
+	 */
+	function error(code, msg /*, args...*/){
+
+		var args = ['Sensors',method].concat([].slice.call(arguments,2));
+		msg = msg ? _t().arg.apply(msg,args) : undefined;
+		return context.ErrorResult(code, msg);
+	}
+
+
+	/** 
+	 * error messages
+	 * order of %s args: Service name, method name, parameter name 
+	 */
+	var msg = {	
+		msgInterfaceNotSupported 	: '%s:Requested interface not supported by the provider',
+		msgInterfaceMissing 		: '%s:Interface name missing',
+		msgInsufficentArgument 		: '%s:%s:Insufficent argument for asynchronous request',
+		msgListenTypeMissing 		: '%s:%s:Listening type missing',
+		msgListenTypeInvalid		: '%s:%s:Listening type is invalid',
+		msgChannelInfoMissing		: '%s:%s:ChannelInfoMap missing',
+		msgIncompleteInput			: '%s:%s:Incomplete input param list',
+		msgOutofRange				: '%s:%s:Listening type is out of allowed range',
+		msgCallbackMissing			: '%s:%s:Callback missing',
+		msgAlreadyRegistered		: '%s:%s:Notification is already registered on this channel',
+		msgCriteriaMissing			: '%s:%s:Search criterion is missing',
+		msgInvalidSearchCriteria	: '%s:%s:Invalid Search Criterion',
+		msgChannelSearchInvalid		: '%s:%s:Channel search param type invalid',
+		msgSearchParamInvalid		: '%s:%s:Invalid channel search param',
+		msgTransIDMissing			: '%s:%s:Transaction id is missing',
+		msgIncorrectTransID			: '%s:%s:Incorrect TransactionID',
+		msgInvalidTransID			: '%s:%s:Invalid TransactionID',
+		msgPropertyIDMissing		: '%s:%s:Property id missing',
+		msgInvalidPropertyID		: '%s:%s:Property id is invalid',
+		msgChannelNotSupported		: '%s:%s:Channel property not supported',
+		msgChannelInfoMapInvalid	: '%s:%s:ChannelInfoMap Type Invalid'
+	};
+
+}) ()
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/preview/script/lib/sapi/SysInfo.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,398 @@
+/**
+ * SysInfo.js
+ * 
+ * Nokia Web Runtime Service API emulation 
+ * WRT v1.1
+ * 
+ * Copyright 2009 Nokia Corporation. All rights reserved.
+*/
+
+ 
+(function(){
+	
+	var provider = 'Service.SysInfo' ,
+		Interface = 'ISysInfo';
+
+	var supportedEntitiesAndKeys = {
+		"battery":{
+			"batterystrength":{"GetInfo":true,"SetInfo":false,"GetNotification":true,"GetInfoModeSync":false},
+			"chargingstatus":{"GetInfo":true,"SetInfo":false,"GetNotification":true,"GetInfoModeSync":true}
+		},
+		"connectivity":{
+			"bluetooth":{"GetInfo":true,"SetInfo":false,"GetNotification":true,"GetInfoModeSync":true},
+			"infrared":{"GetInfo":true,"SetInfo":false,"GetNotification":true,"GetInfoModeSync":true},
+			"activeconnections":{"GetInfo":true,"SetInfo":false,"GetNotification":false,"GetInfoModeSync":false},
+			"connectionstatus":{"GetInfo":false,"SetInfo":false,"GetNotification":true,"GetInfoModeSync":false},
+			"wlanmacaddress":{"GetInfo":true,"SetInfo":false,"GetNotification":false,"GetInfoModeSync":true}
+		},
+      	"device":{
+			"firmwareversion":{"GetInfo":true,"SetInfo":false,"GetNotification":false,"GetInfoModeSync":true},
+			"platformversion":{"GetInfo":true,"SetInfo":false,"GetNotification":false,"GetInfoModeSync":true},
+			"producttype":{"GetInfo":true,"SetInfo":false,"GetNotification":false,"GetInfoModeSync":true},
+			"manufacturer":{"GetInfo":true,"SetInfo":false,"GetNotification":false,"GetInfoModeSync":true},
+			"machineid":{"GetInfo":true,"SetInfo":false,"GetNotification":false,"GetInfoModeSync":true},
+			"phonemodel":{"GetInfo":true,"SetInfo":false,"GetNotification":false,"GetInfoModeSync":true},
+			"imei":{"GetInfo":true,"SetInfo":false,"GetNotification":false,"GetInfoModeSync":true}
+		},
+      	"display":{
+			"brightness":{"GetInfo":true,"SetInfo":false,"GetNotification":false,"GetInfoModeSync":true},
+			"screensavertimeout":{"GetInfo":true,"SetInfo":false,"GetNotification":false,"GetInfoModeSync":true},
+			"userinactivity":{"GetInfo":false,"SetInfo":false,"GetNotification":true,"GetInfoModeSync":false},
+			"keyguardtime":{"GetInfo":true,"SetInfo":false,"GetNotification":false,"GetInfoModeSync":true},
+			"autolocktime":{"GetInfo":true,"SetInfo":false,"GetNotification":false,"GetInfoModeSync":true},
+			"autolockstatus":{"GetInfo":true,"SetInfo":false,"GetNotification":true,"GetInfoModeSync":true},
+			"wallpaper":{"GetInfo":false,"SetInfo":true,"GetNotification":false,"GetInfoModeSync":false,"InputDataType":"string"},
+			"lighttimeout":{"GetInfo":true,"SetInfo":false,"GetNotification":false,"GetInfoModeSync":true},
+			"displayresolution":{"GetInfo":true,"SetInfo":false,"GetNotification":false,"GetInfoModeSync":true},
+			"displayorientation":{"GetInfo":true,"SetInfo":false,"GetNotification":false,"GetInfoModeSync":true}
+		},
+      	"features":{
+			"bluetooth":{"GetInfo":true,"SetInfo":false,"GetNotification":false,"GetInfoModeSync":true},
+			"infrared":{"GetInfo":true,"SetInfo":false,"GetNotification":false,"GetInfoModeSync":true},
+			"camera":{"GetInfo":true,"SetInfo":false,"GetNotification":false,"GetInfoModeSync":true},
+			"memorycard":{"GetInfo":true,"SetInfo":false,"GetNotification":false,"GetInfoModeSync":true},
+			"fmradio":{"GetInfo":true,"SetInfo":false,"GetNotification":false,"GetInfoModeSync":true},
+			"qwerty":{"GetInfo":true,"SetInfo":false,"GetNotification":false,"GetInfoModeSync":true},
+			"wlan":{"GetInfo":true,"SetInfo":false,"GetNotification":false,"GetInfoModeSync":true},
+			"usb":{"GetInfo":true,"SetInfo":false,"GetNotification":false,"GetInfoModeSync":true},
+			"pen":{"GetInfo":true,"SetInfo":false,"GetNotification":false,"GetInfoModeSync":true},
+			"led":{"GetInfo":true,"SetInfo":false,"GetNotification":false,"GetInfoModeSync":true},
+			"coverui":{"GetInfo":true,"SetInfo":false,"GetNotification":false,"GetInfoModeSync":true},
+			"sidevolumekeys":{"GetInfo":true,"SetInfo":false,"GetNotification":false,"GetInfoModeSync":true},
+			"vibra":{"GetInfo":true,"SetInfo":false,"GetNotification":false,"GetInfoModeSync":true}
+		},
+      	"general":{
+			"accessorystatus":{"GetInfo":false,"SetInfo":false,"GetNotification":true,"GetInfoModeSync":false},
+			"connectedaccessories":{"GetInfo":true,"SetInfo":false,"GetNotification":false,"GetInfoModeSync":true},
+			"inputlanguage":{"GetInfo":true,"SetInfo":true,"GetNotification":true,"GetInfoModeSync":true},
+			"supportedlanguages":{"GetInfo":true,"SetInfo":false,"GetNotification":false,"GetInfoModeSync":true},
+			"predictivetext":{"GetInfo":true,"SetInfo":true,"GetNotification":true,"GetInfoModeSync":true},
+			"vibraactive":{"GetInfo":true,"SetInfo":true,"GetNotification":true,"GetInfoModeSync":true},
+			"availableusbmodes":{"GetInfo":true,"SetInfo":false,"GetNotification":false,"GetInfoModeSync":true},
+			"activeusbmode":{"GetInfo":true,"SetInfo":false,"GetNotification":false,"GetInfoModeSync":true},
+			"flipstatus":{"GetInfo":true,"SetInfo":false,"GetNotification":true,"GetInfoModeSync":true},
+			"gripstatus":{"GetInfo":true,"SetInfo":false,"GetNotification":true,"GetInfoModeSync":true},
+			
+		},
+      	"memory":{
+			"driveinfo":{"GetInfo":true,"SetInfo":false,"GetNotification":false,"GetInfoModeSync":true},
+			"listdrives":{"GetInfo":true,"SetInfo":false,"GetNotification":false,"GetInfoModeSync":true},
+			"criticalmemory":{"GetInfo":false,"SetInfo":false,"GetNotification":true,"GetInfoModeSync":false},
+			"memorycard":{"GetInfo":true,"SetInfo":false,"GetNotification":true,"GetInfoModeSync":true}
+		},
+      	"network":{
+			"signalstrength":{"GetInfo":true,"SetInfo":false,"GetNotification":true,"GetInfoModeSync":false},
+			"registrationstatus":{"GetInfo":true,"SetInfo":false,"GetNotification":true,"GetInfoModeSync":true},
+			"networkmode":{"GetInfo":true,"SetInfo":false,"GetNotification":true,"GetInfoModeSync":true},
+			"currentnetwork":{"GetInfo":true,"SetInfo":false,"GetNotification":true,"GetInfoModeSync":false},
+			"locationarea":{"GetInfo":false,"SetInfo":false,"GetNotification":true,"GetInfoModeSync":false},
+			"cellid":{"GetInfo":false,"SetInfo":false,"GetNotification":true,"GetInfoModeSync":false}
+		}
+	  };
+	  
+	/**
+	 * SysInfo service
+	 */
+	var SysInfoService = function(){
+		this.GetInfo 			= __GetInfo;
+		this.SetInfo 			= __SetInfo;
+		this.GetNotification 	= __GetNotification;
+		this.Cancel 			= __Cancel;
+	}
+
+	device.implementation.extend(provider, Interface, new SysInfoService() );
+
+	var	context = device.implementation.context,
+		_t = context._t,
+		method = '',
+		result = false,
+		DBase = null,
+		default_device = 'default';
+		
+	/**
+	 * SysInfo: GetInfo
+	 * @param {Object} criteria
+	 * @param {function} callback function for async call (optional)
+	 */
+	function __GetInfo(criteria, callback){
+		var retVal = ValidateArguments("GetInfo",criteria,callback);
+		if(retVal.ErrorCode != 0)
+		{
+			return retVal;
+		}
+		//	Async call
+		if (typeof callback == 'function') {
+			return context.callAsync(this, arguments.callee, criteria, callback);
+		}
+
+		DBase = context.getData(provider);
+		var returnValue = DBase;
+		returnValue = returnValue[criteria.Entity.toLowerCase()][criteria.Key.toLowerCase()];
+		returnValue.Key = criteria.Key;
+		returnValue.Entity = criteria.Entity;
+
+		if(/^Connectivity$/i.test(criteria.Entity)&& /^ActiveConnections$/i.test(criteria.Key))
+		{
+			var temp = returnValue.ConnectionList;
+			returnValue.ConnectionList = context.Iterator(temp);
+		}
+		else if(/^General$/i.test(criteria.Entity)&& /^ConnectedAccessories$/i.test(criteria.Key))
+		{
+			var temp = returnValue.AccessoryList;
+			returnValue.AccessoryList = context.Iterator(temp);			
+		}
+		else if(/^Memory$/i.test(criteria.Entity)&& /^DriveInfo$/i.test(criteria.Key))
+		{
+			try {
+				var temp = criteria.SystemData.Drive;
+				if(temp.length > 3)
+				{
+					temp = temp.substring(0,3);
+				}
+				temp= returnValue.Drive[temp.toUpperCase()];
+				if (!temp) {
+					return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.no_msg);
+				}
+				var driveInfo = new Object();
+				driveInfo.Key = returnValue.Key;
+				driveInfo.Entity = returnValue.Entity;
+				driveInfo.DriveInfo = temp;
+				return context.Result(driveInfo);
+			}
+			catch(err)
+			{
+				return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.no_msg);
+			}
+			
+		}
+		return context.Result(returnValue);
+	}
+			
+
+	/**
+	 * SysInfo: SetInfo
+	 * @param {Object} criteria
+	 * @param {function} callback function for async call (optional)
+	 */
+	function __SetInfo(criteria, callback){
+		var retVal = ValidateArguments("SetInfo",criteria,callback);
+		if(retVal.ErrorCode != 0)
+		{
+			return retVal;
+		}
+
+		//	Current implementation support only for 'General' -> 'InputLanguage' || 'PredictiveText'
+		if (/^General$/i.test(criteria.Entity) && ( /^InputLanguage$/i.test(criteria.Key) || /^PredictiveText/i.test(criteria.Key) || /^VibraActive/i.test(criteria.Key))) {
+			//	get the DBase data
+			DBase = context.getData(provider);
+			var returnValue = DBase;
+			
+			//	Check the 'SupportedLanguages' entries for Setting the new Status
+			if (/^InputLanguage$/i.test(criteria.Key)) {
+				var found = false;
+				var languageList = returnValue['general']['supportedlanguages']['LanguageList'];
+				for (var key in languageList) {
+					if (languageList[key] == criteria.SystemData.Status) {
+						found = true;
+					}
+				}
+				//	Update the 'InputLanguage' if the value value found in the ['SupportedLanguages']
+				if (found) 
+					returnValue[criteria.Entity.toLowerCase()][criteria.Key.toLowerCase()]['Status'] = criteria.SystemData.Status;
+				else 
+					return error(device.implementation.ERR_SERVICE_NOT_SUPPORTED, msg.not_supported);
+			}
+			else if (/^PredictiveText$/i.test(criteria.Key)) {
+				if (criteria.SystemData.Status == 0 || criteria.SystemData.Status == 1) 
+					returnValue[criteria.Entity.toLowerCase()][criteria.Key.toLowerCase()]['Status'] = criteria.SystemData.Status;
+				else 
+					return error(device.implementation.ERR_NOT_FOUND, msg.badType);
+			}
+			else if (/^VibraActive$/i.test(criteria.Key)) {
+				if (criteria.SystemData.Status == 0 || criteria.SystemData.Status == 1) 
+					returnValue[criteria.Entity.toLowerCase()][criteria.Key.toLowerCase()]['Status'] = criteria.SystemData.Status;
+			}
+			else {
+				return error(device.implementation.ERR_SERVICE_NOT_SUPPORTED, msg.not_supported);
+			}
+		}
+		else if(/^Display/i.test(criteria.Entity) && /^Wallpaper/i.test(criteria.Key)) {
+			if(typeof criteria.SystemData.StringData == 'undefined')
+				return error(device.implementation.ERR_MISSING_ARGUMENT, msg.missingArgs);
+			returnValue[criteria.Entity.toLowerCase()][criteria.Key.toLowerCase()]['StringData'] = criteria.SystemData.StringData;
+			return context.ErrorResult(device.implementation.ERR_SUCCESS);
+		}
+		return context.Result(result);
+	}
+			
+
+	/**
+	 * SysInfo: GetNotification
+	 * @param {Object} criteria
+	 * @param {function} callback function for async call
+	 */
+	function __GetNotification(criteria, callback){
+		var retVal = ValidateArguments("GetNotification",criteria,callback);
+		if(retVal.ErrorCode != 0)
+		{
+			return retVal;
+		}
+		
+		// unsupported
+		if (!/^(Battery|Memory)$/i.test(criteria.Entity) ||
+			!/^(BatteryStrength|ChargingStatus|MemoryCard)$/i.test(criteria.Key)) {
+			context.notify(_t('%s:: GetNotification : entity %s, key %s not implemented in preview.').arg(provider, criteria.Entity, criteria.Key));
+			// register callback anyway so Cancel works. 
+		}
+
+		// evenType = 'entity.key'
+		var eventType = criteria.Entity+'.'+criteria.Key;
+						
+		// process notify
+		return context.addListener(provider, eventType, criteria, callback, notifyHandler);
+	}
+			
+	function notifyHandler(transactionID, criteria, callback, data){
+		
+		var result,
+			eventCode = {completed:2, error:4, progress:9},
+			code = eventCode.progress;
+		try{
+			DBase = context.getData(provider);
+			var entity = criteria.Entity.toLowerCase(),
+				key = criteria.Key.toLowerCase();
+						
+			// make a copy of return value
+			var returnValue = context.extend({},DBase[entity][key]);
+			
+			// augment with data
+			context.extend(returnValue, data);
+
+			result = context.Result(returnValue);
+		} 
+		catch(e){
+			code = eventCode.error;
+		}
+		callback(transactionID, code, result);
+	}
+		
+			
+
+	/**
+	 * SysInfo: Cancel
+	 * @param {Object} criteria
+	 */
+	function __Cancel(criteria){
+		method = 'Cancel';
+
+		if (!criteria || !criteria.TransactionID)
+			return error(device.implementation.ERR_MISSING_ARGUMENT, msg.missingTID);
+
+		var found = context.removeListener(provider, null, criteria.TransactionID);
+		if (!found)
+			return error(device.implementation.ERR_NOT_FOUND);
+		else
+			return context.ErrorResult(device.implementation.ERR_SUCCESS);
+	}
+
+
+	
+	/*******************************
+	 * helper functions
+	 *******************************/
+	
+	function error(code, msg /*, args...*/){
+
+		var args = ['SysInfo',method].concat([].slice.call(arguments,2));
+		msg = msg ? _t().arg.apply(msg,args) : undefined;
+		return context.ErrorResult(code, msg);
+	}
+
+	function cancelRegisteredNotify(result)
+	{
+		__Cancel({'TransactionID':result.TransactionID});
+		method = 'GetNotification';
+	}
+
+	/** 
+	 * error messages
+	 * order of %s args: Service name, method name, parameter name 
+	 */
+	var msg = {
+		badType				: '%s: %s: Type is invalid',
+		badSysInfo			: '%s: %s: SysInfoName is invalid',
+		missingSysInfo		: '%s: %s: SysInfoName is missing',
+		missingTID 			: '%s: %s: Transaction ID missing',
+		not_supported 		: '%s: %s: Not Supported',
+		is_invalid			: '%s: %s: Is invalid',
+		missingArgs			: '%s: %s: SystemData Argument Missing',
+		inSufficientArgs	: '%s: %s: Insufficient Arguments to process',
+		missingInputParam	: '%s: %s: Input Parameter Missing',
+		not_supportedSyncVer: '%s: %s: Sync Version Not Supported',
+		noEntity			: '%s: %s: Entity: Input Parameter Missing',
+		noKey				: '%s: %s: Key: Input Parameter Missing',
+		IncorrectSytemData	: '%s: %s: Incorrect SystemData Type, SystemData Must be a Map',
+		callbackNotFound	: '%s: %s: Callback object not found',
+		commandNotFound		: '%s: %s: Command Not Supported',
+		unsupInterface		: 'SysInfo:Requested interface not supported by the provider',
+		no_msg				: '%s: %s: '
+	};
+
+	/**
+	 * Common validator for all functions
+	 * 	 
+	 *  
+	 * @param {arguments} function name and arguments of calling function
+	 * @return {Result} Error object
+	 */		
+	  function ValidateArguments(funName,criteria,callback)
+	  {
+	  	method = funName;
+
+		try {
+			if (/^GetNotification$/i.test(funName) && typeof callback != "function") {
+				return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.not_supportedSyncVer);
+			}
+			
+			if (typeof criteria == "undefined" || typeof criteria.Entity == "undefined" || typeof criteria.Key == "undefined") {
+				return error(device.implementation.ERR_MISSING_ARGUMENT, msg.inSufficientArgs);
+			}
+			
+			if (criteria.Entity == "") {
+				return error(device.implementation.ERR_MISSING_ARGUMENT, msg.noEntity);
+			}
+			
+			if (criteria.Key == "") {
+				return error(device.implementation.ERR_MISSING_ARGUMENT, msg.noKey);
+			}
+			
+			if (/^SetInfo$/i.test(funName)) {
+				if (typeof criteria.SystemData == "undefined" || criteria.SystemData == '') {
+					return error(device.implementation.ERR_MISSING_ARGUMENT, msg.missingArgs);
+				}
+				if (typeof criteria.SystemData.StringData == "undefined" && typeof criteria.SystemData.Status == "undefined") {
+					return error(device.implementation.ERR_MISSING_ARGUMENT, msg.missingArgs);
+				}
+			}
+			
+			if (typeof supportedEntitiesAndKeys[criteria.Entity.toLowerCase()] == 'undefined' || typeof supportedEntitiesAndKeys[criteria.Entity.toLowerCase()][criteria.Key.toLowerCase()] == 'undefined') {
+				return error(device.implementation.ERR_NOT_FOUND, msg.no_msg);
+			}
+			
+			if (!supportedEntitiesAndKeys[criteria.Entity.toLowerCase()][criteria.Key.toLowerCase()][funName]) {
+				return error(device.implementation.ERR_NOT_FOUND, msg.no_msg);
+			}
+			
+			if (funName == "GetInfo" && !supportedEntitiesAndKeys[criteria.Entity.toLowerCase()][criteria.Key.toLowerCase()]["GetInfoModeSync"] && typeof callback != "function") {
+				return error(device.implementation.ERR_MISSING_ARGUMENT, msg.not_supportedSyncVer);
+			}
+			
+			return context.ErrorResult(device.implementation.ERR_SUCCESS, "");
+		}
+		catch(err){
+			return error(device.implementation.ERR_BAD_ARGUMENT_TYPE, msg.badType);
+		}
+		
+	  }
+
+}) ()
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/preview/script/lib/systeminfo.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,107 @@
+/**
+	This API is used to provide system related data.
+	It takes the sysObject as an argument that is the embeded API in the main HTML file.
+	While using this API outside mobile environment, User or developer need not to take any extara action in oprder to support SYSAPI.
+*/
+
+function systemAPI(sysObject)
+{
+	/*
+	 * 	System Language information services
+	 */
+	sysObject.language = 'EN';
+
+
+
+
+	/*
+	 * 	Power information services
+	 */
+	
+	//	Properties
+	sysObject.chargelevel = 5;
+	sysObject.chargerconnected = 0;
+
+	//	Event triggers
+	sysObject.onchargelevel = null;
+	sysObject.onchargerconnected = null;
+
+
+
+	/*
+	 * 	Beep tone control services
+	 */	
+	sysObject.beep = function(frequency, duration){	}
+
+
+
+	/*
+	 * 	Network Information services
+	 */
+	
+	//	value range between: {0-7}
+	sysObject.signalbars = 7;
+
+	sysObject.networkname = 'No network';
+
+	//	value range between: {0-7}
+	sysObject.networkregistrationstatus = 0;
+	
+
+
+	/*
+	 * 	Display and keypad illumination information and control services
+	 */
+
+	//	Properties
+	sysObject.lightminintensity = 1;
+	sysObject.lightmaxintensity = 100;
+	sysObject.lightdefaultintensity = 0;
+	
+	sysObject.lightinfiniteduration = 0;
+	sysObject.lightmaxduration = 1;
+	sysObject.lightdefaultcycletime = 0;
+
+	sysObject.lighttargetprimarydisplayandkeyboard = 0x3;
+	sysObject.lighttargetsystem = 1;
+
+	//	functions
+	sysObject.lighton	= function(lighttarget, duration, intensity, fadein){ 	}
+	sysObject.lightblink	= function(lighttarget, duration, onduration, offduration, intensity){ 	}
+	sysObject.lightoff	= function(lighttarget, duration, fadeout){ 	}
+
+
+
+	/*
+	 * 	Vibration information and control services
+	 */
+	sysObject.vibraminintensity = 1;
+	sysObject.vibramaxintensity = 10;
+	sysObject.vibramaxduration = 100;
+	
+	//	Vibration setting in the user profile is off.
+	sysObject.vibrasettings = 2; 
+
+	sysObject.startvibra	= function(duration, intensity){	}
+
+	sysObject.stopvibra	= function(){	}
+
+
+
+
+	/*
+	 * 	Memory and file system information services
+	 */
+	sysObject.totalram = 32;	
+	sysObject.freeram = 10;	
+	sysObject.drivelist = 'C';	
+
+	sysObject.drivesize	= function(drive){	return 64;	}
+	
+	sysObject.drivefree	= function(drive){	return 32;	}
+
+}
+
+
+//	make TRUE systeminfo.js script loaded
+window.parent.NOKIA.scriptsLoaded.systeminfo = true;
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/preview/script/lib/widget.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,286 @@
+/**
+ * widget object constructor
+ * @param {void}
+ *     widget()
+ * @return {void}
+ */ 
+
+if (typeof window.widget == "undefined" || !window.widget) {
+	window.widget = {
+		author : 'Nokia WRT Emulation Library',
+		//	widget identifier, dummy value
+		identifier: 14021981,
+		isrotationsupported: true,
+		
+		//	widget event triggers
+		onshow: null,
+		onhide: null,
+		
+		sysInfo: [],
+		onload: null,
+		opacity: 50,
+		interval: 20,
+		isFront: false,
+		preferenceArray: [],
+		preferenceKey: 0
+	};
+	
+	
+	/**
+	 * Launches the browser with the specified url
+	 * @param {String} url
+	 *     openURL()
+	 * @return {Void}
+	 */
+	widget.openURL = function(url){
+		if (url) {
+			window.open(url, "New Widget Window", 'height=200 width=250');
+		}
+	}
+	
+	
+	/**
+	 * Returns previously stored preference associated with the specified key
+	 * @param {String} Key preference value to be fetch
+	 *     preferenceForKey()
+	 * @return {String} Value
+	 */
+	widget.preferenceForKey = function(name){
+		return _BRIDGE_REF.nokia.helper.readCookie(name);
+	}
+	
+	
+	/**
+	 * Stores the key associated with the specified preference
+	 * @param {String} Preference value to be stored
+	 * @param {String} Key Preference value associated to
+	 *     setPreferenceForKey()
+	 * @return {Void}
+	 */
+	widget.setPreferenceForKey = function(preference, key){
+		_BRIDGE_REF.nokia.helper.createCookie(key, preference);
+	}
+	
+	
+	
+	/**
+	 * Toggle between Tabbed navigation mode or Cursor mode
+	 * @param {Boolean} Value
+	 *     setNavigationEnabled()
+	 * @return {Void}
+	 */
+	widget.setNavigationEnabled = function(bool){
+		//This function can not be used on preview browser
+	}
+	
+	
+	
+	/**
+	 * Open S0-Application identified by UID along with the specified params
+	 * @param {Integer} Uid hexadecimal value to a specified application
+	 * @param {String} Value
+	 *     openApplication()
+	 * @return {Void}
+	 */
+	widget.openApplication = function(Uid, param){
+		alert("openApplication function won't be simulated in this application");
+	}
+	
+	
+	
+	/**
+	 * Prepares the Widget.to do transition to specified transitionState
+	 * @param {String} Value Transition state
+	 *     prepareForTransition()
+	 * @return {Void}
+	 */
+	widget.prepareForTransition = function(transitionState){
+		this.isFront = ("" + transitionState).toLowerCase() != "toback";
+		window.document.getElementsByTagName("body")[0].style.opacity = "0.3";
+	}
+	
+	
+	
+	
+	/**
+	 * Does the animation to make the transition between the specified transitionState
+	 * @param {Void}
+	 *     performTransition()
+	 * @return {Void}
+	 */
+	widget.performTransition = function(){
+		var _self = this;
+		this.opacity = 0;
+		this.interval = window.setInterval(function(){
+			_self.opacity += 0.2;
+			if (_self.opacity > 1) {
+				_self.opacity = 1;
+			}
+			window.document.getElementsByTagName("body")[0].style.opacity = _self.opacity + "";
+			if (_self.opacity >= 1) {
+				window.clearInterval(_self.interval);
+				window.document.getElementsByTagName("body")[0].style.opacity = "1";
+			}
+			//do nothing
+		}, 50);
+		//do nothing
+	}
+	
+	
+	
+	
+	
+	/**
+	 * Set the preferred screen orientation to landscape.
+	 * The display will flip if the phone display orientation
+	 * is portrait and the phone supports landscape mode.
+	 * @param {Void}
+	 *     setDisplayLandscape()
+	 * @return {Void}
+	 */
+	widget.setDisplayLandscape = function(){
+		try {
+			if (this.isrotationsupported && _BRIDGE_REF.nokia.emulator.orientationSupports()) {
+				_BRIDGE_REF.nokia.emulator.setMode('landscape');
+			}
+		} 
+		catch (e) {
+		}
+	}
+	
+	
+	
+	
+	/**
+	 * Set the preferred screen orientation to portrait.
+	 * The display will flip if the phone display orientation
+	 * is landscape and the phone supports portrait mode.
+	 * @param {Void}
+	 *     setDisplayPortrait()
+	 * @return {Void}
+	 */
+	widget.setDisplayPortrait = function(){
+		try {
+			if (this.isrotationsupported && _BRIDGE_REF.nokia.emulator.orientationSupports()) {
+				_BRIDGE_REF.nokia.emulator.setMode('portrait');
+			}
+		} 
+		catch (e) {
+		}
+	}
+	
+	/**
+	 * Allows the definition of a function to be called
+	 * when a Widget.is displayed
+	 * @param {Void}
+	 *     onshow()
+	 * @return {Void}
+	 */
+	widget.onshow = function(){
+		// to be implemented
+	}
+	
+	
+	
+	
+	/**
+	 * Allows the definition of a function to be called
+	 * when a Widget.sent into the background (hidden)
+	 * @param {Void}
+	 *     onhide()
+	 * @return {Void}
+	 */
+	widget.onhide = function(){
+		// to be implemented
+	}
+	
+	
+	
+	/**
+	 * This function returns the System API if sysinfo is included in document embed
+	 */
+	widget.enableSystemApi = function(){
+	
+		//	Identify, and Attach System-Info-Object properties
+		try {
+			var parentIframeRef = window.parent.frames[0];
+			if (typeof parentIframeRef == 'object') {
+				if (parentIframeRef.document.embeds.length > 0) {
+					for (var i = 0; i < parentIframeRef.document.embeds.length; i++) {
+						//match the system Info API embed tag
+						if (parentIframeRef.document.embeds[i].type == 'application/x-systeminfo-widget') {
+							new systemAPI(parentIframeRef.document.embeds[i]);
+//							widget.sysInfo = parentIframeRef.document.embeds[i];
+							
+							// hide the <embed> object
+							parentIframeRef.document.embeds[i].style.display='none';
+							
+							// push the reference object into widget
+							widget.sysInfo.push(parentIframeRef.document.embeds[i]);
+						}
+					}
+				}
+			}
+		} 
+		catch (e) {
+			alert('Error in attachSysInfo: ' + e);
+		}
+	}
+	
+	/**
+	 * 
+	 */
+	
+	widget.triggerListener = function(provider, eventType, data){
+		if(widget.sysInfo.length){
+			for(var i=0; i<widget.sysInfo.length; i++){
+				if(provider == "power"){
+					switch(eventType){
+						case "chargerconnected" : 
+												  widget.sysInfo[i].chargerconnected = data;
+												  if(widget.sysInfo[i].onchargerconnected != null){
+													setTimeout(widget.sysInfo[i].onchargerconnected, 0);
+												  }else{
+														console.info("System API-1.0 Notice -- no listeners defined for eventType:"+eventType);
+												  }
+												  break;
+
+						case "chargelevel" 		:
+												  widget.sysInfo[i].chargelevel = data;
+												  if(widget.sysInfo[i].onchargelevel != null){
+													setTimeout(widget.sysInfo[i].onchargelevel, 0);
+												  }else{
+														console.info("System API-1.0 Notice -- no listeners defined for eventType:"+eventType);
+												  }
+												 break;
+					}
+				}
+			}
+		}else{
+			console.info("System API-1.0 Notice -- no listeners defined for eventType:"+eventType);
+		}
+	}
+	
+	//	make TRUE widget.js script loaded
+	window.parent.NOKIA.scriptsLoaded.widget = true;
+}
+
+(function(){
+
+	//	attach the System-Info api specific functionality
+	_BRIDGE_REF.helper.addEvent(window, 'load', function(){
+		widget.enableSystemApi();
+		
+	});
+
+	if (_BRIDGE_REF.nokia) {
+		_BRIDGE_REF.nokia.menu.lsk_event = function(){
+			_BRIDGE_REF.nokia.emulator.child.menu.show();
+		};
+		
+		//	Add THIS window Reference on FRAME WINDOW
+		//	NOKIA.emulator.child object reference
+		_BRIDGE_REF.nokia.emulator.child = window;
+		_BRIDGE_REF.nokia.menu.init();
+	}	
+})()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/preview/script/nokia.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,1495 @@
+/*
+	@chinnapp
+*/
+
+if(typeof NOKIA == "undefined" || !NOKIA) 
+{
+	var NOKIA = {
+		version : 'WRT 1.1',
+		currentDevice : '240x320',
+		mode : 'portrait',
+		resolution : ['240x320', '320x240', '360x640', '800x352'],
+		scriptsLoaded : {
+			loader : false,
+			widget : false,
+			systeminfo : false,
+			menu   : false,
+			menuItem : false,
+			console : false
+		}
+	};
+	NOKIA.namespace = function(name)
+	{
+		var parts = name.split('.');
+		var current = NOKIA;
+		for(var key in parts){
+			if(!current[parts[key]]){
+				current[parts[key]] = {};
+			}
+			current = current[parts[key]];
+		}  
+	};
+	
+	NOKIA.init = function()
+	{
+		// Not-Supported Browser check
+		NOKIA.emulator.is_browserReady = (/MSIE/i.test(navigator.userAgent));
+		if(NOKIA.emulator.is_browserReady)
+		{
+			var notSupportedBrowser = NOKIA.helper.readCookie('NOKIA_NOT_SUPPORTED_BROWSER');
+			if (notSupportedBrowser != 1) {
+				$("#NotificationDiv")[0].className = 'show';
+				$("#NotificationDiv").dialog({
+					width: 550,
+					minWidth: 550,
+					minHeight: 350,
+					height: 150,
+					autoOpen: true,
+					position: top,
+					title: 'Notification window',
+					buttons: {
+						Cancel: function(){
+							$("#NotificationDiv").dialog('close');
+						},
+						Continue: function(){
+							$("#NotificationDiv").dialog('close');
+							NOKIA.helper.createCookie('NOKIA_NOT_SUPPORTED_BROWSER', 1);
+							NOKIA.init();
+						}
+					}
+				});
+				return false;
+			}else{
+				$("#BrowserNotificationBar").css({display:'block'});
+				$("#BrowserNotificationBar > p > a").click(function(){ $("#BrowserNotificationBar").hide(); });
+			}
+		}
+	
+		$('iframe')[0].src = "wrt_preview_main.html";
+
+		NOKIA.data.load(deviceResolutionList);
+		
+		var url = window.location.toString();			
+		url = url.split('/');
+		
+		var pointer = 3;
+		if(url[0] == 'http:')
+			pointer = 2;
+
+		var t = ''; 
+		for(var i=pointer; i<url.length-1; i++){ 	t = t + url[i] + '/'; 	}
+		if(url[0] == 'file:')
+			NOKIA.emulator.url = 'file:///' + t;
+		else
+			NOKIA.emulator.url = 'http://' + t;
+
+		//	Common Error/Notification Dialog
+		NOKIA.helper.errorDailog = $("#Dialog").dialog({
+			bgiframe: true, minHeight: 150, width: 450, modal: true, autoOpen: false,
+			buttons: {	
+					Cancel: function(){ $(this).dialog('close');	},			
+					Reload: function(){ 
+						$(this).dialog('close');
+						$("#loaderDiv").html("Widget is reloading. Please wait...");
+						$("#loaderDiv")[0].className = 'green';
+						$("#loaderDiv").show();
+						window.setTimeout(function(){
+							document.location = document.location;
+						}, 3000);
+					}			
+				}
+		});
+
+		//	validating Info.plist
+		this.helper.getInfo('Info.plist', NOKIA.helper.getInfoCallback);	
+
+		//	For getting Icon.png
+		this.helper.getInfo('Icon.png', NOKIA.helper.getIconCallback);	
+	};
+
+	/*
+	 * NOKIA.data
+	 */
+	NOKIA.namespace('data.load');
+
+	NOKIA.data.load = function(data){
+		NOKIA.deviceList = data;
+	}
+
+
+
+	/*
+	 * NOKIA.emulator
+	 */
+	NOKIA.namespace('menu');
+	NOKIA.menu = {
+		is_menu_visible : false,		// true/false
+		is_softkeys_visible : false,	// true : only when MenuItem's are displayed
+		softkeys_visibility : true,		// true/false : for hide/show SFK's
+		is_dimmed : false,
+		is_rsk_overridden : false,
+		log_counter : 1,
+		enable_log : false,
+		rsk_label : '',
+		rsk_event : false,
+		highlighted_item : null,
+		
+		hide : function()
+		{
+			$("#MenuItemsArea").fadeIn("slow");
+
+			//	Hide the SFK's If user hidden them from his code
+			if(NOKIA.menu.softkeys_visibility)
+				$("#SoftKeysArea").fadeIn("slow");
+			
+			NOKIA.menu.is_softkeys_visible = false;
+		},
+
+		log : function(str)
+		{
+			if(!this.enable_log)
+				return false;
+			NOKIA.layout.log("log", NOKIA.menu.log_counter + ' ' +str);
+			NOKIA.layout.log("log", 'is_rsk_overridden: '+NOKIA.menu.is_rsk_overridden);
+			NOKIA.layout.log("log", 'rsk_label: '+NOKIA.menu.rsk_label);
+			NOKIA.layout.log("log", 'rsk_event: '+NOKIA.menu.rsk_event);
+			
+			NOKIA.menu.log_counter++;
+		},
+
+		show : function()
+		{
+			if(NOKIA.menu.is_dimmed)
+				return false;
+				
+			NOKIA.menu.showSoftKeys();
+			
+			NOKIA.menu.is_menu_visible = true;
+			$("#MenuItemsArea").show();
+			
+			NOKIA.menu.highlighted_item = $("#MenuItemsArea > ul > li")[0];
+			NOKIA.menu.highlighted_item.className = 'active';
+
+
+			$("#MenuItemsArea > ul > li").mouseover(function(){
+				if(NOKIA.menu.highlighted_item != null)
+				{
+					NOKIA.menu.highlighted_item.className = '';
+					NOKIA.menu.highlighted_item = null;
+				}
+
+				NOKIA.menu.highlighted_item = this;
+				NOKIA.menu.highlighted_item.className = 'active';
+			});
+
+			$("#SoftKeysArea").mouseout(function(){
+				if (!NOKIA.menu.is_menu_visible) {
+					return false;
+				}
+				
+				if (NOKIA.helper.intervalId) {
+					clearInterval(NOKIA.helper.intervalId);
+				}
+				NOKIA.helper.intervalId = setTimeout(function(){
+					NOKIA.menu.cancel()
+				}, 500);
+			});
+
+
+			//	Change the label "Options" to "Select" to LSK
+			$("#LskLabel > a")[0].innerHTML = "Select";
+			NOKIA.menu.setLsk(NOKIA.menu.selectMenu);
+			
+			//	Change the label "Exit" to "Cancel" to RSK
+			$("#RskLabel > a")[0].innerHTML = 'Cancel';
+			NOKIA.menu.setRsk(NOKIA.menu.cancel);
+			
+
+			NOKIA.emulator.setMenuItemsStyle();
+			
+		},
+		
+		selectMenu : function(){
+			try {
+				if(typeof NOKIA.menu.highlighted_item.onclick != 'undefined'){
+					eval(NOKIA.menu.highlighted_item.onclick)();
+				}
+			} catch (e) {
+				
+			}
+//			NOKIA.menu.cancel();
+		},
+
+		
+		cancel : function()
+		{
+			if(NOKIA.menu.is_dimmed)
+				return false;
+				
+			NOKIA.menu.hideSoftKeys();
+
+			NOKIA.menu.is_menu_visible = false;
+			$("#MenuItemsArea").hide();
+
+			//	Reset the "OPTION" label to LSK
+			$("#LskLabel > a")[0].innerHTML = 'Options';
+			NOKIA.menu.setLsk(NOKIA.emulator.child.menu.show);
+
+			//	Change the label "CANCEL" to "EXIT" to RSK
+			if(!NOKIA.menu.is_rsk_overridden)
+			{
+				$("#RskLabel > a")[0].innerHTML = 'Exit';
+				NOKIA.menu.setRsk(NOKIA.menu.exit);	
+			}
+			else
+			{
+				$("#RskLabel > a")[0].innerHTML = NOKIA.menu.rsk_label;
+				NOKIA.menu.setRsk(NOKIA.menu.rsk_event);	
+			}
+			
+		},
+
+		exit : function()
+		{
+			if(NOKIA.menu.is_dimmed)
+				return false;
+				
+			if(NOKIA.helper.setHomeScreen())
+				return false;
+
+			//	clear the Menu Settings
+			NOKIA.menu.cancel();
+			NOKIA.emulator.child.menu.setRightSoftkeyLabel('', null);
+			NOKIA.emulator.child.menu.items = [];
+			NOKIA.menu.softkeys_visibility = false;
+			
+			// Hide Widget DIV
+			NOKIA.menu.hideSoftKeys();
+			NOKIA.menu.setLsk(function(){});
+			NOKIA.menu.setRsk(function(){});
+			
+			$("#WidgetArea").hide();
+
+			//	Show Icon
+			var style = NOKIA.deviceList[NOKIA.currentDevice][NOKIA.mode]['style'];
+			$('#IconArea').css({
+				'width' 	:	'100%',
+				'height'	:	style['widget']['height']+'px',
+				'float' 	:	style['widget']['float']
+			});
+			
+			$('#IconArea')[0].className = NOKIA.mode+NOKIA.currentDevice;
+			
+			var img = document.createElement('img');
+			img.src = NOKIA.emulator.iconFile;
+			img.border = 0;
+			
+			var div = document.createElement('div');
+			var p = document.createElement('p');
+			
+			if(NOKIA.emulator.plist.DisplayName.length <= 12)
+				p.innerHTML = NOKIA.emulator.plist.DisplayName; 
+			else
+				p.innerHTML = NOKIA.emulator.plist.DisplayName.substr(0, 11) + '...' 
+
+			div.className = 'IconFile';
+			div.style.marginTop = parseInt(parseInt(style['widget']['height']/2)-80) + 'px';
+			div.appendChild(img);
+			img.onclick = function(){
+				
+				//	close the console DIV
+				NOKIA.layout._console_enabled = false;
+				NOKIA.layout.render();
+				
+				$("#loaderDiv").html("Widget is loading. Please wait...");
+				$("#loaderDiv")[0].className = 'green';
+				$("#loaderDiv").show();
+				window.setTimeout(function(){
+					document.location = document.location;
+				}, 3000);
+				
+			};
+			
+			div.appendChild(p);
+
+			$("#loaderDiv").html("Click on Icon to Launch Widget");
+			$("#loaderDiv").show();
+			$("#loaderDiv")[0].className = 'yellow';
+
+			$('#IconArea').append(div);
+			$('#IconArea').show();
+
+			NOKIA.menu.is_dimmed = true;
+			
+			$("#PreferencesBtn").hide();
+			$("#PreferencesTab").dialog('close');
+			
+		},
+		
+		setLsk : function(func)
+		{
+			//	for RSK
+			$('#LskArea')[0].onclick = function(){
+				if(!NOKIA.menu.is_dimmed)
+					func();
+			};
+		
+			$('#LskLabel > a')[0].onclick = function(){
+				if(!NOKIA.menu.is_dimmed)
+					func();
+			};
+
+			return true;
+		},
+		
+		setRsk : function(func)
+		{
+			//	for RSK
+			$('#RskArea')[0].onclick = function(){
+				if(!NOKIA.menu.is_dimmed)
+					func();
+			};
+			
+			$('#RskLabel > a')[0].onclick = function(){
+				if(!NOKIA.menu.is_dimmed)
+					func();
+			};
+			
+			return true;
+		},
+
+
+		triggerLsk : function(event)
+		{
+			var callback;
+			if(NOKIA.mode == 'portrait')
+				callback = NOKIA.menu.lsk_event;
+			else if( (NOKIA.mode == 'landscape') && (event.id =='LskLabel') )
+				callback = NOKIA.menu.lsk_event;
+			else
+				callback = NOKIA.menu.rsk_event;
+			
+			if(typeof callback == 'function' && !NOKIA.menu.is_dimmed)
+			{
+				callback();
+			}
+		},
+
+		triggerRsk : function(event)
+		{
+			var callback;
+			if(NOKIA.mode == 'portrait')
+				callback = NOKIA.menu.rsk_event;
+			else if( (NOKIA.mode == 'landscape') && (event.id =='RskLabel') )
+				callback = NOKIA.menu.rsk_event;
+			else
+				callback = NOKIA.menu.lsk_event;
+			
+			if(typeof callback == 'function')
+			{
+				if(!NOKIA.menu.is_dimmed)
+				{
+					callback();
+					NOKIA.menu.cancel();
+				}
+			}
+		},
+		
+		render : function()
+		{
+			if(!NOKIA.menu.softkeys_visibility)
+				NOKIA.menu.hideSoftKeys();
+			else
+				NOKIA.menu.showSoftKeys();
+			
+			NOKIA.emulator.setWidgetStyle();
+		},
+		
+
+		init : function()
+		{
+			NOKIA.menu.render();
+		},
+		
+		createSFKArea : function()
+		{
+			var a = $('#SoftKeys > a');
+			a.html('');
+			
+			var preferences = NOKIA.deviceList[NOKIA.currentDevice][NOKIA.mode];
+			
+			var lsk = document.createElement('img');
+			lsk.border="0";
+			lsk.id = "LskArea";
+			lsk.name ="LskArea";
+			lsk.src = "preview/images/TransperantImage.png";
+			lsk.style.width = preferences.style.softkeysImg.width; 
+			lsk.style.height = preferences.style.softkeysImg.height;
+			
+			var rsk = document.createElement('img');
+			rsk.border = 0;
+			rsk.id = "RskArea";
+			rsk.name = "RskArea";
+			rsk.src = "preview/images/TransperantImage.png";
+			rsk.style.width = preferences.style.softkeysImg.width; 
+			rsk.style.height = preferences.style.softkeysImg.height;
+
+			if(NOKIA.mode == 'portrait')
+			{	
+				lsk.onclick = function(){
+					$("#LskLabel > a").trigger('click');
+				}
+				a[0].appendChild(lsk);
+
+				rsk.onclick = function(){
+					$("#RskLabel > a").trigger('click');
+				}
+				a[1].appendChild(rsk);
+
+			}else{
+
+				rsk.onclick = function(){
+					$("#RskLabel > a").trigger('click');
+				}
+				a[0].appendChild(rsk);
+
+				lsk.onclick = function(){
+					$("#LskLabel > a").trigger('click');
+				}
+				a[1].appendChild(lsk);
+			}
+			
+			
+		},
+
+		showSoftKeys : function()
+		{
+			NOKIA.menu.is_softkeys_visible = true;
+
+			NOKIA.emulator.setWidgetStyle();
+			$("#SoftKeysArea").show();
+		},
+		
+		hideSoftKeys : function()
+		{
+			//	Hide the SFK's If user hidden them from his code
+			if(!NOKIA.menu.softkeys_visibility)
+				$("#SoftKeysArea").hide();
+			
+			NOKIA.menu.is_softkeys_visible = false;
+
+			NOKIA.emulator.setWidgetStyle();
+		}
+	};
+
+
+
+	/*
+	 * NOKIA.emulator
+	 */
+	NOKIA.namespace('emulator');
+	NOKIA.emulator = {
+		child : false,
+		iconFile : 'preview/images/default-Icon.png',
+		loaded : false,
+		plist : {
+			DisplayName	:	'',
+			Identifier	:	'',
+			MainHTML	:	'',
+			AllowNetworkAccess	:	"false",
+			Version		:	'',
+			MiniViewEnabled		:	"false",
+			is_browserReady : false
+		},
+		
+		load : function()
+		{
+			if(this.loaded)
+				return false;
+				
+			//	load the saved device Info
+			var device = NOKIA.helper.readCookie('NOKIA_EMULATOR_DEVICE');
+			NOKIA.currentDevice = device || NOKIA.currentDevice;
+
+
+			//	load the saved device mode
+			var mode = NOKIA.helper.readCookie('NOKIA_EMULATOR_DEVICE_MODE');
+			if(mode != null)
+				NOKIA.mode = mode;
+
+			//	SAVE the device DATA
+			NOKIA.helper.createCookie('NOKIA_EMULATOR_DEVICE', NOKIA.currentDevice);
+			NOKIA.helper.createCookie('NOKIA_EMULATOR_DEVICE_MODE', NOKIA.mode);
+			
+			this.loaded = true;
+			
+		},
+	
+		render : function()
+		{
+			this.load();
+			
+			if(!NOKIA.emulator.orientationSupports())
+				NOKIA.mode = NOKIA.deviceList[NOKIA.currentDevice]['default'];
+			
+			if(typeof NOKIA.deviceList == 'undefined' || typeof NOKIA.deviceList[NOKIA.currentDevice] == 'undefined' || typeof NOKIA.deviceList[NOKIA.currentDevice][NOKIA.mode] == 'undefined')
+			{
+				alert('Deive resolution: '+NOKIA.currentDevice+' or the mode: '+NOKIA.mode+' not found');
+				return false;
+			}
+			
+			this.setStyle();
+		},
+		
+		setMode : function(mode)
+		{
+			NOKIA.mode = mode;
+
+			//	SAVE the device DATA
+			NOKIA.helper.createCookie('NOKIA_EMULATOR_DEVICE_MODE', NOKIA.mode);
+
+			NOKIA.emulator.render();
+		},
+		
+		orientationSupports : function()
+		{
+			return NOKIA.deviceList[NOKIA.currentDevice]['orientation'];
+		},
+		
+		setStyle:function()
+		{
+			if(!NOKIA.helper.checkDependencies())
+			{
+				setTimeout(NOKIA.emulator.setStyle, 1000);
+			}
+			
+			var deviceProperties = NOKIA.deviceList[NOKIA.currentDevice][NOKIA.mode];
+			var style = deviceProperties['style'];
+
+			//	Apply Style and propertis to Device layers
+			$("#DeviceDisplayLayout").css(style['layout']);
+			$('#DisplayArea').css(style['display']);
+			
+			NOKIA.emulator.setWidgetStyle();
+			
+			$('#SoftKeysArea').css({
+				'width'	:	style['menu']['width']+'px',
+				'height'	:	style['menu']['height']+'px',
+				'float' 	:	style['menu']['float']
+			});
+			
+			$('#SoftKeysArea > ul > li').css('width', parseInt(style['menu']['width']/2)-10);
+
+			
+			NOKIA.emulator.setMenuItemsStyle();
+			
+			$('#SoftKeys').css(style['softkeys']);
+//			$('#SoftKeys > a > img').css(style['softkeysImg']);
+
+			NOKIA.menu.createSFKArea();
+			
+			$("#DeviceDisplayLayout").show();
+			$("#PreferencesTab").show();
+			
+			if(!NOKIA.menu.is_dimmed)
+				$("#PreferencesBtn").show();
+		},
+		
+		setWidgetStyle : function()
+		{
+			var style = NOKIA.deviceList[NOKIA.currentDevice][NOKIA.mode]['style'];
+			var height;
+			if(NOKIA.menu.softkeys_visibility || NOKIA.menu.is_softkeys_visible)
+				height = parseInt(style['widget']['height'] - style['menu']['height']);
+			else
+				height = style['widget']['height'];
+
+			$('#WidgetArea').css({
+				'width' 	:	style['widget']['width']+'px',
+				'height'	:	height+'px',
+				'float' 	:	style['widget']['float']
+			});
+		},
+		
+		setMenuItemsStyle : function()
+		{
+			var style 	= NOKIA.deviceList[NOKIA.currentDevice][NOKIA.mode]['style'];
+			var count = 1;
+			try {
+				if (NOKIA.emulator.child.menu) {
+					count = parseInt(NOKIA.helper.getElementsLengthInObject(NOKIA.emulator.child.menu.items)) + 1;
+				}
+			} catch (e) {
+				count = 1;
+			}
+			var height 	= parseInt(count*style['menu']['optionKeysheight']) + 10;
+			var top 	= parseInt(style['widget']['height'] - height); 
+
+			$('#MenuItemsArea').css({
+				'width'		:	style['widget']['width']+'px',
+				'height'	:	height+'px',
+				'marginTop'	:	'-2px',
+				'top'		:	(style['widget']['height']-height-style['menu']['height']+2)+'px',
+				'position'	: 	'relative'
+			});
+		}
+	};
+
+	/*
+	 * NOKIA.helper functions
+	 */
+	NOKIA.namespace('helper.loadScript');
+	NOKIA.helper = {
+		path : document.location.pathname,
+		errorDailog	: null,
+		prefDailog : null,
+		intervalId : null,
+		infoPlistCounter : false,
+		IconFileCounter  : false,
+		loadScript : function(path)
+		{
+			var head = document.getElementsByTagName("head")[0] || document.documentElement;
+			var script = document.createElement("script");
+	
+			script.type = "text/javascript";
+			script.src = src;
+			head.appendChild( script );
+		},
+
+		loadPreferences : function()
+		{
+			if(/dreamweaver/i.test(navigator.userAgent))
+			{
+				$("#dwDeviceHelp")[0].className = '';
+				$("#resSupportLink")[0].className = 'hide';
+			}
+			//	Selecting Resoltion
+			var resOptions = $("#resOptions")[0];
+			for(var i=0; i<NOKIA.resolution.length; i++)
+			{
+				if(NOKIA.resolution[i] == NOKIA.currentDevice)
+				{
+					resOptions.options[i].selected = true;
+					$("#resSupportLink")[0].href = resOptions.options[i].value;
+					break;
+				}				
+			}
+			
+			//	Selecting Orientation
+			if(NOKIA.mode == 'portrait')
+				$('#input_portrait')[0].checked = true;
+			else
+				$('#input_landscape')[0].checked = true;
+
+			if (!NOKIA.emulator.orientationSupports()) {
+				if (NOKIA.mode == 'portrait') 
+					$("#input_landscape")[0].disabled = true;
+				else 
+					$("#input_portrait")[0].disabled = true;
+					
+				$("#Orientation_Info").html("Not supported");
+				$("#Orientation_Info").show();
+				$("#Orientation_Controls").hide();
+			}
+			else {
+				$("#input_landscape")[0].disabled = false;
+				$("#input_portrait")[0].disabled = false;
+
+				$("#Orientation_Info").hide();
+				$("#Orientation_Controls").show();
+			}
+			
+			//	Selecting Version
+			if(NOKIA.version == 'WRT 1.0')
+				$('#wrt_version_1_0')[0].checked = true;
+			else
+				$('#wrt_version_1_1')[0].checked = true;
+				
+			//	HomeScreen Support
+			if(NOKIA.deviceList[NOKIA.currentDevice].homeScreenSupport)
+			{
+				if (typeof NOKIA.emulator.plist.MiniViewEnabled != 'undefined') {
+					if (NOKIA.emulator.plist.MiniViewEnabled == 'false') 
+						$('#HS_Control_Info').html("<span id='wrt-help' onclick='javascipt:NOKIA.helper.showMiniviewHelp();'></span><strong>Not Enabled</strong><br/><small>Click on help to read more about enabling Mini view support</small>");
+					else 
+						$('#HS_Control_Info').html("Supported");
+				}
+				else
+					$('#HS_Control_Info').html("<span id='wrt-help'></span>Not Supported");
+
+				$('#HS_Control_Info').show();
+
+			}
+			else
+			{
+				$('#HS_Control_Info').html("Not Supported for the selected Device resolution");
+				$('#HS_Control_Info').show();
+			}
+		},
+
+		getInfo : function(url, callback)
+		{
+			try {
+				var xhr = this.ajax();
+				
+				if ((/AppleWebKit/i.test(navigator.userAgent)))
+					xhr.open("GET", url, false);
+				else
+					xhr.open("GET", url, true);
+				
+				
+				xhr.onreadystatechange = function() 
+				{
+						// readyState = 4 ; "complete"
+						if (xhr.readyState==4)
+						{
+							// status = 200 ; "ok"
+							if( (xhr.status == 200) || (!xhr.status) )
+							{
+								callback(true, xhr);
+							}
+							else
+							{ 
+								callback(false, xhr);
+							}
+						}
+	
+				}
+				xhr.send(null);
+			} catch (e) {
+				if (e.name == 'NS_ERROR_FILE_NOT_FOUND') {
+					callback(false, xhr);
+				}			
+			}
+		},
+
+		getInfoCallback : function(flag, xhr)
+		{
+			//	If Info.plis NOT FOUND / FAILED LOAD
+			//	an ERROR!, unable to proceed further
+			// 	STOP there
+			if(!flag)
+			{
+				if(!NOKIA.helper.infoPlistCounter)
+				{
+					NOKIA.helper.infoPlistCounter = true;
+					NOKIA.helper.getInfo('info.plist', NOKIA.helper.getInfoCallback);
+					return false;
+				}
+
+				NOKIA.helper.error('Unable to intialize the widget, failed to process Info.plist file. <br/>Please ensure <strong style="color:#efe352;">Info.plist</strong> file exists on the widget root folder <br/>or check the filename of <strong style="color:#efe352;">Info.plist</strong> It is case-sensitive');
+				return false;
+			}
+			else{
+				
+				var xmlString = xhr.responseText;
+				
+				// do some cheating here
+				xmlString = xmlString.replace(/<\s*true\s*\/>/gi, "<string>true</string>");
+				xmlString = xmlString.replace(/<\s*false\s*\/>/gi, "<string>false</string>");
+	
+			/*
+			 * 	DomParser Logic
+				var appXml = new DOMParser();
+				var xmlobject = appXml.parseFromString(xmlString, "text/xml");
+			 */
+			
+				//	return the JSON Object
+				NOKIA.helper.validate(xml2json.parser(xmlString));
+			}
+			
+		},
+		
+		getIconCallback : function(flag, xhr)
+		{
+			
+			if(!flag)
+			{
+				if(!NOKIA.helper.IconFileCounter)
+				{
+					NOKIA.helper.IconFileCounter = true;
+					NOKIA.helper.getInfo('icon.png', NOKIA.helper.getIconCallback);
+					return false;	
+				}
+			}
+			else
+				NOKIA.emulator.iconFile =  (NOKIA.helper.IconFileCounter) ? "icon.png" : "Icon.png";
+		},
+		
+
+		validate : function(xmlObject)
+		{
+			window.xmlObject = xmlObject;
+			
+			//	<plist>
+			if(typeof xmlObject.plist != 'object' || xmlObject.plist == 'undefined')
+			{
+				NOKIA.helper.error('Corrupted Info.plist file');
+				return false;
+			}
+			//	<dict>
+			xmlObject = xmlObject.plist;
+			if(typeof xmlObject.dict != 'object' || xmlObject.dict == 'undefined')
+			{
+				NOKIA.helper.error('Corrupted Info.plist file');
+				return false;
+			}
+
+			//	<key>
+			xmlObject = xmlObject.dict;
+			if(typeof xmlObject.key != 'object' || xmlObject.key == 'undefined')
+			{
+				NOKIA.helper.error('Corrupted Info.plist file');
+				return false;
+			}
+
+			//	<string>
+			if(typeof xmlObject.string != 'object' || xmlObject.string == 'undefined')
+			{
+				NOKIA.helper.error('Corrupted Info.plist file');
+				return false;
+			}
+
+			//	num of <key> = num of <string>
+			if(xmlObject.key.length != xmlObject.string.length)
+			{
+				NOKIA.helper.error('Corrupted Info.plist file');
+				return false;
+			}
+
+			for(var val in xmlObject.key)
+			{
+				if(NOKIA.emulator.plist[xmlObject.key[val]] != 'undefined'){
+					NOKIA.emulator.plist[xmlObject.key[val]] = xmlObject.string[val].toString(); 
+				}
+			}
+
+			try {
+				if(typeof NOKIA.emulator.plist.DisplayName != 'undefined'){
+					document.title = NOKIA.emulator.plist.DisplayName + ' - ' + document.title;
+				}
+			} catch (e) {}
+
+			//	Add UI-Event listeners
+			NOKIA.helper.addListeners();
+			NOKIA.layout.init();
+			NOKIA.emulator.render();
+		},
+
+
+		ajax : function() 
+		{
+			//	xmlHttpRequest object	
+			var request = null;
+		
+		    // branch for native XMLHttpRequest object
+		    if(window.XMLHttpRequest && !(window.ActiveXObject)) {
+		    	try 
+				{
+					request = new XMLHttpRequest();
+					try
+					{
+						//	attach the Bypass code, if the browser is firefox
+						if(netscape.security.PrivilegeManager.enablePrivilege)
+						{
+							//	duplicate the function
+							request._open = request.open;
+							
+							//	redefine the function definition
+							request.open = function(method, url, flag)
+							{
+								try
+								{
+									// Enable Universal Browser Read
+									netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
+		
+									//	call the native XmlHttpRequest.open method
+									this._open(method, url, flag);
+								}catch(e)
+								{
+									//	call the native XmlHttpRequest.open method
+									this._open(method, url, flag);
+								}
+							}
+						}
+					}
+					catch(e)
+					{
+						//	eatup all exceptions
+					}
+				} 
+				catch(e) {
+					request = null;
+		        }
+		    // branch for IE/Windows ActiveX version
+		    } else if(window.ActiveXObject) {
+		       	try {
+		        	request = new ActiveXObject("Msxml2.XMLHTTP");
+		      	} catch(e) {
+		        	try {
+		          		request = new ActiveXObject("Microsoft.XMLHTTP");
+		        	} catch(e) {
+		          		alert('Failed to create XmlHttprequest');
+						return null;
+		        	}
+				}
+		    }
+			
+			return (request);
+		},
+
+		error : function(msg)
+		{
+			if(NOKIA.menu.enable_log)
+				NOKIA.layout.log("log", msg);
+			
+			$("#Dialog").html(msg);
+			$("#Dialog").dialog('open');
+		},
+
+		createCookie : function(name,value) 
+		{
+			var days = 240000;
+		    if (days) {
+				var date = new Date();
+				date.setTime(date.getTime()+(days*24*60*60*1000));
+				var expires = "; expires="+date.toGMTString();
+			}
+			else var expires = "";
+			document.cookie = "Nokia_WRT#" + NOKIA.helper.path + "#" + name + "=" + value + expires + "; path=/";
+		},
+		
+		readCookie : function(name) 
+		{
+			var nameEQ = "Nokia_WRT#" + NOKIA.helper.path + "#" + name + "=";
+			var ca = document.cookie.split(';');
+			for(var i=0;i < ca.length;i++) {
+				var c = ca[i];
+				while (c.charAt(0)==' ') c = c.substring(1,c.length);
+				if (c.indexOf(nameEQ) == 0) {
+					return c.substring(nameEQ.length,c.length);
+				}
+			}
+			return undefined;
+		},
+
+		toggle : function(ele)
+		{
+			if (NOKIA.emulator.orientationSupports()) {
+//				var mode = (NOKIA.mode == 'portrait') ? 'landscape' : 'portrait';
+				NOKIA.emulator.setMode(ele.value);
+			}
+			else
+			{	
+				ele.checked = false;
+				if(ele.value == 'portrait')
+					$("#input_landscape")[0].checked = true;
+				else
+					$("#input_portrait")[0].checked = true;
+			}
+		},
+
+		version : function(ele)
+		{
+			if (confirm('Would you like to reload the widget to apply the changes on the Version settings?')) 
+			{
+				NOKIA.helper.createCookie('_WRT_VERSION', ele.value);
+				$("#loaderDiv").html("Applying the " + ele.value + ", please wait...");
+				$("#loaderDiv").show();
+				$("#loaderDiv")[0].className = 'green';
+				
+				$("#PreferencesTab").dialog('close');
+				
+				window.setTimeout(function(){
+					document.location = document.location;
+				}, 3000);
+			}
+			else
+			{
+				ele.checked = false;
+				if(ele.value != 'WRT 1.0')
+					$("#wrt_version_1_0")[0].checked = true;
+				else
+					$("#wrt_version_1_1")[0].checked = true;
+			}
+		},
+
+		addListeners : function()
+		{
+			/*
+			 * Render Emulator for Interaction
+			 */
+			NOKIA.helper.prefDailog = $("#PreferencesTab").dialog({
+					width: 550,	minWidth: 550, minHeight: 350, height: 350, autoOpen: false, position : top, title : '&nbsp;',
+					buttons : {
+						Close : function(){
+							$("#PreferencesTab").dialog('close');
+
+							//	Hack for Mac firefox
+							if(/Mac/i.test(navigator.userAgent))
+							{
+								$("#WidgetArea iframe").css({overflow:'auto'});
+							}
+							
+							//	select index : 0 tab selected
+							$('#tabs').tabs( 'select' , 0);
+						}
+					}
+				});
+				
+			$('#PreferencesBtn').click(function(){
+				//	Load preferences
+				NOKIA.helper.loadPreferences();
+				$('#PreferencesTab').dialog('open');
+
+				//	Hack for Mac firefox
+				if(/Mac/i.test(navigator.userAgent))
+				{
+					$("#WidgetArea iframe").css({overflow:'hidden'});
+				}
+			});
+			
+			$('#input_portrait').change(function(){
+				NOKIA.helper.toggle(this);
+			});
+
+			$('#input_landscape').change(function(){
+				NOKIA.helper.toggle(this);
+			});
+
+			$('#resOptions').change(function(ele){
+				ele = ele.target || this;
+				
+				NOKIA.currentDevice = ele.options[ele.selectedIndex].text;
+				$("#resSupportLink")[0].href = ele.value;
+		
+				//	SAVE the device DATA
+				NOKIA.helper.createCookie('NOKIA_EMULATOR_DEVICE', NOKIA.currentDevice);
+		
+				NOKIA.emulator.render();
+				NOKIA.helper.loadPreferences();
+			});
+
+			//	Hack for Mac firefox
+			if (/Mac/i.test(navigator.userAgent)) {
+				if (!(/AppleWebKit/i.test(navigator.userAgent))) {
+					$("#resOptions")[0].size = '4';
+				}
+			}
+
+
+			//	WRT Version controls
+			$('#wrt_version_1_0').change(function(){
+				NOKIA.helper.version(this);
+			});
+			
+			$('#wrt_version_1_1').change(function(){
+				NOKIA.helper.version(this);
+			});
+
+
+			$("#orientationIcon").click(function(){
+				var mode = (NOKIA.mode == 'portrait') ? 'landscape' : 'portrait';
+				NOKIA.emulator.setMode(mode);
+				$("#WidgetArea")[0].className = 'hs_'+NOKIA.mode;
+			});
+
+
+			$("#iframeMask").click(function(){
+
+				$("#PreferencesBtn").show();
+				$("#orientationIcon").hide();
+				$("#iframeMask").hide();
+				$("#loaderDiv").hide();
+
+				NOKIA.menu.is_dimmed = false;
+				
+				$("#WidgetArea")[0].className = '';
+				
+				NOKIA.menu.softkeys_visibility = true;
+				NOKIA.menu.showSoftKeys();
+
+			});
+
+
+			//	MenuItems DIV events
+			$("#MenuItemsArea").mouseover(function(){
+				if(NOKIA.helper.intervalId)
+					clearInterval(NOKIA.helper.intervalId);
+
+				$("#MenuItemsArea").show();
+			});
+
+			$("#MenuItemsArea").mouseout(function(){
+				if(NOKIA.helper.intervalId)
+					clearInterval(NOKIA.helper.intervalId);
+
+				NOKIA.helper.intervalId = setTimeout(function(){
+					NOKIA.menu.cancel()
+				}, 500);
+			});
+
+
+			// Tabs
+			$('#tabs').tabs({
+				select : function(event, ui){
+					if(parseInt(ui.index) == 1)
+					{
+						$("#event-icons").show();
+						$("#event-battery-info").hide();
+						$("#event-messaging-info").hide();
+						$("#event-memory-info").hide();
+						
+						//	WRT versionn check
+						if(NOKIA.version == 'WRT 1.1')
+						{
+							$("#event-messaging")[0].className = 'active';
+							$("#event-memory")[0].className = 'active';
+						}else
+						{
+							$("#event-messaging")[0].className = 'inactive';
+							$("#event-memory")[0].className = 'inactive';
+						}
+						$("#event-battery")[0].className = 'active';
+					}else if(parseInt(ui.index) == 0)
+					{
+						$("#settings-view").show();
+						$("#mini-view-info").hide();
+					}
+				}
+			});
+
+			
+			/*	
+			 * 	Event triggering
+			 */
+			
+			//	for battery
+			$("#event-battery").click(function(event){
+				if(event.target.className == 'active')
+				{
+					$("#event-icons").hide();
+					$("#event-battery-info").show();
+
+/*
+				$('#slider').slider('option', 'value', NOKIA.emulator.child._BRIDGE_REF.helper.getBatteryStrength());
+				NOKIA.emulator.child._BRIDGE_REF.helper.getBatteryStrength()
+				$('#slider').slider('option', 'value', 10);
+				$('#slider').slider();
+*/
+				}
+			});
+
+			$("#event-battery-back").click(function(event){
+				$("#event-icons").show();
+				$("#event-battery-info").hide();
+			});
+
+
+			//	for messaging
+			$("#event-messaging").click(function(event){
+				if(event.target.className == 'active')
+				{
+					$("#event-icons").hide();
+					$("#event-messaging-info").show();
+				}
+			});
+
+			$("#event-messaging-back").click(function(event){
+				$("#event-icons").show();
+				$("#event-messaging-info").hide();
+			});
+
+
+			//	for memory
+			$("#event-memory").click(function(event){
+				if(event.target.className == 'active')
+				{
+					$("#event-icons").hide();
+					$("#event-memory-info").show();
+				}
+			});
+
+			$("#event-memory-back").click(function(event){
+				$("#event-icons").show();
+				$("#event-memory-info").hide();
+			});
+
+
+			//	for minView more info
+			$("#mini-view-back").click(function(event){
+				$("#settings-view").show();
+				$("#mini-view-info").hide();
+			});
+
+
+			// Slider
+			$('#slider').slider({
+				range: true,
+				min : 0,
+				max : 100,
+				step : 1,
+				value : 10,
+				animate: true,
+				slide: function(event, ui) {
+					$("#slider-value-panel > span").html(ui.value.toString());
+				}
+				});
+
+			//	Bind Buttons to trigger values to WRT 1.0 / 1.1 bindings
+			
+			$("#connect-charger").click(NOKIA.helper.triggerEvents);
+			$("#disconnect-charger").click(NOKIA.helper.triggerEvents);
+			$("#update-batter-strength").click(NOKIA.helper.triggerEvents);
+
+			$("#send-sms").click(NOKIA.helper.triggerEvents);
+			$("#send-mms").click(NOKIA.helper.triggerEvents);
+
+			$("#connect-memory-card").click(NOKIA.helper.triggerEvents);
+			$("#disconnect-memory-card").click(NOKIA.helper.triggerEvents);
+			
+		},
+		
+		setHomeScreen : function()
+		{
+			//	HomeScreen Support
+			if (NOKIA.deviceList[NOKIA.currentDevice].homeScreenSupport) {
+
+				if (typeof NOKIA.emulator.plist.MiniViewEnabled != 'undefined') {
+					if (NOKIA.emulator.plist.MiniViewEnabled != 'false') 
+					{
+						$("#WidgetArea")[0].className = 'hs_' + NOKIA.mode;
+						
+						//	menu handlining
+						NOKIA.menu.softkeys_visibility = false;
+						NOKIA.menu.cancel();
+						NOKIA.menu.is_dimmed = true;
+						
+
+						$("#loaderDiv").html("Click on widget for Return to Full view");
+						$("#loaderDiv")[0].className = 'green';
+						$("#loaderDiv").show();
+
+						$("#iframeMask").show();
+						$("#orientationIcon").show();
+						$("#PreferencesBtn").hide();
+
+						$("#PreferencesTab").dialog('close');
+						return true;
+					}
+				}
+			}
+			return false;			
+		},
+		
+		getElementsLengthInObject : function(items){
+			var count = 0;
+			for (var i in items) 
+			{
+				if(!items[i].isDimmed)
+					count++;
+			}
+			
+			return count;
+		},
+		
+		triggerEvents : function(event)
+		{
+			if(typeof event.target.id == 'undefined')
+			return false;
+			
+			switch(event.target.id)
+			{
+				//	for battery
+				case 'connect-charger': 
+										NOKIA.helper.trigger("power", "chargerconnected", 1);
+										if(NOKIA.version == 'WRT 1.1')
+											NOKIA.helper.triggerSapi("Service.SysInfo", "Battery.ChargingStatus", {Status: 1});
+										break;
+
+				case 'disconnect-charger': 
+										NOKIA.helper.trigger("power", "chargerconnected", 0);
+										if(NOKIA.version == 'WRT 1.1')
+											NOKIA.helper.triggerSapi("Service.SysInfo", "Battery.ChargingStatus", {Status: 0});
+										break;
+
+				case 'update-batter-strength': 
+										var chargeValue = parseInt($('#slider').slider('value'));
+										NOKIA.helper.trigger("power", "chargelevel", chargeValue);
+										if(NOKIA.version == 'WRT 1.1')
+											NOKIA.helper.triggerSapi("Service.SysInfo", "Battery.BatteryStrength", {Status: chargeValue});
+										break;
+
+				//	for messaging
+				case 'send-sms': 
+										if(NOKIA.version == 'WRT 1.1')
+											NOKIA.helper.triggerSapi("Service.Messaging", "NewMessage", {MessageType: 'SMS'});
+										break;
+				case 'send-mms': 
+										if(NOKIA.version == 'WRT 1.1')
+											NOKIA.helper.triggerSapi("Service.Messaging", "NewMessage", {MessageType: 'MMS'});
+										break;
+
+				//	for memory
+				case 'connect-memory-card': 
+										if(NOKIA.version == 'WRT 1.1')
+											NOKIA.helper.triggerSapi("Service.SysInfo", "Memory.MemoryCard", {Status: 1});
+										break;
+				case 'disconnect-memory-card': 
+										if(NOKIA.version == 'WRT 1.1')
+											NOKIA.helper.triggerSapi("Service.SysInfo", "Memory.MemoryCard", {Status: 0});
+										break;
+			}
+		},	
+
+		triggerSapi : function(provider, eventType, data){
+			NOKIA.emulator.child.device.implementation.triggerListener(provider, eventType, data);
+		},	
+
+		trigger : function(provider, eventType, data){
+			NOKIA.emulator.child.widget.triggerListener(provider, eventType, data);
+		},
+		
+		showMiniviewHelp : function(){
+			$("#settings-view").hide();
+			$("#mini-view-info").show();
+		},
+		
+		checkDependencies : function(){
+			
+			for(var key in NOKIA.scriptsLoaded)
+			{
+				if(!NOKIA.scriptsLoaded[key])
+					return false;
+			}
+
+			//	for LSK
+			NOKIA.menu.setLsk(NOKIA.emulator.child.menu.show);
+		
+			//	for RSK
+			NOKIA.menu.setRsk(NOKIA.menu.exit);
+
+			return true;
+		}
+	};
+	
+
+	/*
+	 * NOKIA.layout functions
+	 */
+	NOKIA.namespace('layout');
+	NOKIA.layout = {
+		_console_minimized : true,
+		_console_enabled : false,
+		_consoleWindowHeight : 200,
+		_consoleHeaderHeight : 31,
+
+		init : function(){
+			
+			//	Toggle console window
+			$('#Console-Toggle-Button').click(function(){
+				
+				NOKIA.layout._console_minimized = (NOKIA.layout._console_minimized) ? false : true;
+				NOKIA.layout.render();
+			});
+			
+			// clear Log
+			$("#Console-Clear-Button").click(function(){
+				$("#preview-ui-bottom-body")[0].innerHTML = '';
+			});
+
+
+			$('#preview-ui-bottom').show();
+			NOKIA.layout.render();
+		},
+		
+		log : function(type, msg){
+			var p = document.createElement('p');
+			p.className = type;
+			p.innerHTML = msg;
+			var divBody = $('#preview-ui-bottom-body')
+			divBody.append(p);
+			divBody[0].scrollTop = divBody[0].scrollHeight;
+		},
+		
+		
+		render : function(){
+			var _width = parseInt(window.innerWidth);
+			var _height = parseInt(window.innerHeight);
+			
+			if(!NOKIA.layout._console_enabled)
+			{
+				$('#preview-ui-bottom').css({
+					display: 'none'
+				});
+				
+				$('#preview-ui-top').css({
+					height: _height+'px'
+				});
+
+				return false;
+			}
+			
+			
+			if(!NOKIA.layout._console_minimized)
+			{
+				$('#Console-Toggle-Button')[0].className = 'open';
+				
+				//	set STYLE details for TOP window
+				$('#preview-ui-top').css({
+					height: parseInt(_height - NOKIA.layout._consoleWindowHeight) + 'px'
+				});
+				
+				//	set STYLE details for Bottom window
+				$('#preview-ui-bottom').css({
+					height: NOKIA.layout._consoleWindowHeight + 'px',
+					display : 'block'
+				});
+
+				$('#preview-ui-bottom-header').css({
+					height: NOKIA.layout._consoleHeaderHeight + 'px'
+				});
+
+				$('#preview-ui-bottom-body').css({
+					height: parseInt(NOKIA.layout._consoleWindowHeight - NOKIA.layout._consoleHeaderHeight) + 'px',
+					display : 'block'
+				});
+				
+				// Auto scroll when console window opened from MINIMIZED => MAXIMIZED state
+				window.setTimeout(function(){
+					$('#preview-ui-bottom-body')[0].scrollTop = $('#preview-ui-bottom-body')[0].scrollHeight;
+				}, 100);
+				
+			}else{
+				$('#Console-Toggle-Button')[0].className = 'close';
+
+				//	set STYLE details for TOP window
+				$('#preview-ui-top').css({
+					height: parseInt(_height - NOKIA.layout._consoleHeaderHeight) + 'px'
+				});
+				
+				//	set STYLE details for Bottom window
+				$('#preview-ui-bottom').css({
+					height: NOKIA.layout._consoleHeaderHeight + 'px',
+					display : 'block'
+				});
+
+				$('#preview-ui-bottom-header').css({
+					height: NOKIA.layout._consoleHeaderHeight + 'px',
+					display : 'block'
+				});
+
+				$('#preview-ui-bottom-body').css({
+					display : 'none'
+				});
+			}
+		}
+		
+	};
+}
+
+$(document).ready(function () {
+	NOKIA.init();	
+});
+
+window.onresize = NOKIA.layout.render;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/preview/script/resolution.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,303 @@
+/*
+ * Device Resolution details
+ */
+var deviceResolutionList = {
+	'240x320'	: 	{
+		'default'			:	'portrait',
+		'orientation'		:	true,
+		'homeScreenSupport'	:	false,
+		'fontSize'			:	'12px',
+		'portrait'	:	{
+			'style'	:	{
+				'layout'	:	{
+					'backgroundImage'	: 'url(preview/images/device/240x320/Portrait.png)',
+					'width'				: '600px',
+					'height'			: '536px'
+					},
+				'display':	{
+					'width'		:	'240px',
+					'height'	:	'320px',
+					'paddingTop':	'108px',
+					'marginLeft': 	'auto'				
+					},
+				'widget':	{
+					'width'		:	240,
+					'height'	:	320,
+					'float'		: 	'left'
+					},
+				'menu'	:	{
+					'width'		:	240,
+					'height'	:	30,
+					'float'		: 	'right',
+					'optionKeysheight'	:	24
+					},
+				'softkeys'	:	{
+					'width'	:	'240px',
+					'height':	'50px',
+					'left'	:	'0px',
+					'top'	:	'0px',
+					'position':	'relative'
+				},
+				'softkeysImg' : {
+					'width'	:	"50%",
+					'height':	"100%"
+				}
+			}
+		},
+		'landscape'	:	{
+			'style'	:	{
+				'layout'	:	{
+					'backgroundImage'	: 'url(preview/images/device/240x320/Landscape.png)',
+					'width'				: '848px',
+					'height'			: '408px'
+					},
+				'display':	{
+					'width'		:	'320px',
+					'height'	:	'240px',
+					'paddingTop':	'84px',
+					'marginLeft': 	'auto'				
+					},
+				'widget':	{
+					'width'		:	320,
+					'height'	:	240,
+					'float'		: 	'left'
+					},
+				'menu'	:	{
+					'width'		:	320,
+					'height'	:	30,
+					'float'		: 	'right',
+					'optionKeysheight'	:	24
+					},
+				'softkeys'	:	{
+					'width'	:	'50px',
+					'height':	'240px',
+					'left'	:	'200px',
+					'top'	:	'-250px',
+					'position':	'relative'
+				},	
+				'softkeysImg' : {
+					'width'	:	"100%",
+					'height':	"50%"
+				}
+			}
+		}
+	},
+
+	'320x240'	: 	{
+		'default'			:	'portrait',
+		'orientation'		:	true,
+		'homeScreenSupport'	:	false,
+		'fontSize'			:	'12px',
+		'portrait'	:	{
+			'style'	:	{
+				'layout'	:	{
+					'backgroundImage'	: 'url(preview/images/device/320x240/Portrait.png)',
+					'width'				: '640px',
+					'height'			: '472px'
+					},
+				'display':	{
+					'width'		:	'320px',
+					'height'	:	'240px',
+					'paddingTop':	'113px',
+					'marginLeft': 	'163px'				
+					},
+				'widget':	{
+					'width'		:	320,
+					'height'	:	240,
+					'float'		: 	'left'
+					},
+				'menu'	:	{
+					'width'		:	320,
+					'height'	:	30,
+					'float'		: 	'right',
+					'optionKeysheight'	:	24
+					},
+				'softkeys'	:	{
+					'width'	:	'320px',
+					'height':	'38px',
+					'left'	:	'0px',
+					'top'	:	'0px',
+					'position':	'relative'
+				},
+				'softkeysImg' : {
+					'width'	:	"50%",
+					'height':	"100%"
+				}
+			}
+		},
+		'landscape'	:	{
+			'style'	:	{
+				'layout'	:	{
+					'backgroundImage'	: 'url(preview/images/device/320x240/Landscape.png)',
+					'width'				: '680px',
+					'height'			: '472px'
+					},
+				'display':	{
+					'width'		:	'240px',
+					'height'	:	'320px',
+					'paddingTop':	'76px',
+					'marginLeft': 	'223px'				
+					},
+				'widget':	{
+					'width'		:	240,
+					'height'	:	320,
+					'float'		: 	'left'
+					},
+				'menu'	:	{
+					'width'		:	240,
+					'height'	:	30,
+					'float'		: 	'right',
+					'optionKeysheight'	:	24
+					},
+				'softkeys'	:	{
+					'width'	:	'30px',
+					'height':	'320px',
+					'left'	:	'150px',
+					'top'	:	'-330px',
+					'position':	'relative'
+				},	
+				'softkeysImg' : {
+					'width'	:	"100%",
+					'height':	"50%"
+				}
+			}
+		}
+	},
+
+	'360x640'	: 	{
+		'default'			:	'portrait',
+		'orientation'		:	true,
+		'homeScreenSupport'	:	true,
+		'fontSize'			:	'12px',
+		'portrait'	:	{
+			'style'	:	{
+				'layout'	:	{
+					'backgroundImage'	: 'url(preview/images/device/360x640/Portrait.png)',
+					'width'				: '678px',
+					'height'			: '838px'
+					},
+				'display':	{
+					'width'		:	'360px',
+					'height'	:	'640px',
+					'paddingTop':	'89px',
+					'marginLeft': 	'158px'				
+					},
+				'widget':	{
+					'width'		:	360,
+					'height'	:	640,
+					'float'		: 	'left'
+					},
+				'menu'	:	{
+					'width'		:	360,
+					'height'	:	30,
+					'float'		: 	'right',
+					'optionKeysheight'	:	24
+					},
+				'softkeys'	:	{
+					'width'	:	'360px',
+					'height':	'50px',
+					'left'	:	'0px',
+					'top'	:	'0px',
+					'position':	'relative',
+					'marginLeft' : '159px'
+				},
+				'softkeysImg' : {
+					'width'	:	"50%",
+					'height':	"100%"
+				},
+				'homeScreenDisplay':	{
+					'width'		:	'306px',
+					'height'	:	'76px'
+				}
+			}
+		},
+		'landscape'	:	{
+			'style'	:	{
+				'layout'	:	{
+					'backgroundImage'	: 'url(preview/images/device/360x640/Landscape.png)',
+					'width'				: '1054px',
+					'height'			: '572px'
+					},
+				'display':	{
+					'width'		:	'640px',
+					'height'	:	'360px',
+					'paddingTop':	'104px',
+					'marginLeft': 	'206px'				
+					},
+				'widget':	{
+					'width'		:	640,
+					'height'	:	360,
+					'float'		: 	'left'
+					},
+				'menu'	:	{
+					'width'		:	640,
+					'height'	:	30,
+					'float'		: 	'right',
+					'optionKeysheight'	:	24
+					},
+				'softkeys'	:	{
+					'width'	:	'50px',
+					'height':	'360px',
+					'left'	:	'350px',
+					'top'	:	'-370px',
+					'position':	'relative',
+					'marginLeft': 	'auto'	
+				},	
+				'softkeysImg' : {
+					'width'	:	"100%",
+					'height':	"50%"
+				},
+				'homeScreenDisplay':	{
+					'width'		:	'306px',
+					'height'	:	'76px'
+				}
+			}
+		}
+	},
+
+	'800x352'	: 	{
+		'default'			:	'landscape',
+		'orientation'		:	false,
+		'homeScreenSupport'	:	false,
+		'fontSize'			:	'12px',
+		'landscape'	:	{
+			'style'	:	{
+				'layout'	:	{
+					'backgroundImage'	: 'url(preview/images/device/800x352/Landscape.png)',
+					'width'				: '1180px',
+					'height'			: '572px'
+					},
+				'display':	{
+					'width'		:	'800px',
+					'height'	:	'352px',
+					'paddingTop':	'108px',
+					'marginLeft': 	'190px'				
+					},
+				'widget':	{
+					'width'		:	800,
+					'height'	:	352,
+					'float'		: 	'left'
+					},
+				'menu'	:	{
+					'width'		:	800,
+					'height'	:	30,
+					'float'		: 	'right',
+					'optionKeysheight'	:	24
+					},
+				'softkeys'	:	{
+					'width'	:	'50px',
+					'height':	'352px',
+					'left'	:	'432px',
+					'top'	:	'-364px',
+					'position':	'relative',
+					'marginLeft': 	'auto'	
+				},	
+				'softkeysImg' : {
+					'width'	:	"100%",
+					'height':	"50%"
+				}
+			}
+		}
+	}
+
+};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/preview/script/xml2json.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,172 @@
+/*
+xml2json v 1.1
+copyright 2005-2007 Thomas Frank
+
+This program is free software under the terms of the 
+GNU General Public License version 2 as published by the Free 
+Software Foundation. It is distributed without any warranty.
+*/
+
+var xml2json={ 
+	parser:function(xmlcode,ignoretags,debug){
+		if(!ignoretags){ignoretags=""};
+		xmlcode=xmlcode.replace(/\s*\/>/g,'/>');
+		xmlcode=xmlcode.replace(/<\?[^>]*>/g,"").replace(/<\![^>]*>/g,"");
+		if (!ignoretags.sort){ignoretags=ignoretags.split(",")};
+		var x=this.no_fast_endings(xmlcode);
+		x=this.attris_to_tags(x);
+		x=escape(x);
+		x=x.split("%3C").join("<").split("%3E").join(">").split("%3D").join("=").split("%22").join("\"");
+		for (var i=0;i<ignoretags.length;i++){
+			x=x.replace(new RegExp("<"+ignoretags[i]+">","g"),"*$**"+ignoretags[i]+"**$*");
+			x=x.replace(new RegExp("</"+ignoretags[i]+">","g"),"*$***"+ignoretags[i]+"**$*")
+		};
+		x='<JSONTAGWRAPPER>'+x+'</JSONTAGWRAPPER>';
+		this.xmlobject={};
+		var y=this.xml_to_object(x).jsontagwrapper;
+		if(debug){y=this.show_json_structure(y,debug)};
+		return y
+	},
+	xml_to_object:function(xmlcode){
+		var x=xmlcode.replace(/<\//g,"§");
+		x=x.split("<");
+		var y=[];
+		var level=0;
+		var opentags=[];
+		for (var i=1;i<x.length;i++){
+			var tagname=x[i].split(">")[0];
+			opentags.push(tagname);
+			level++
+			y.push(level+"<"+x[i].split("§")[0]);
+			while(x[i].indexOf("§"+opentags[opentags.length-1]+">")>=0){level--;opentags.pop()}
+		};
+		var oldniva=-1;
+		var objname="this.xmlobject";
+		for (var i=0;i<y.length;i++){
+			var preeval="";
+			var niva=y[i].split("<")[0];
+			var tagnamn=y[i].split("<")[1].split(">")[0];
+			tagnamn=tagnamn.toLowerCase();
+			var rest=y[i].split(">")[1];
+			if(niva<=oldniva){
+				var tabort=oldniva-niva+1;
+				for (var j=0;j<tabort;j++){objname=objname.substring(0,objname.lastIndexOf("."))}
+			};
+			objname+="."+tagnamn;
+			var pobject=objname.substring(0,objname.lastIndexOf("."));
+			if (eval("typeof "+pobject) != "object"){preeval+=pobject+"={value:"+pobject+"};\n"};
+			var objlast=objname.substring(objname.lastIndexOf(".")+1);
+			var already=false;
+			for (k in eval(pobject)){if(k==objlast){already=true}};
+			var onlywhites=true;
+			for(var s=0;s<rest.length;s+=3){
+				if(rest.charAt(s)!="%"){onlywhites=false}
+			};
+			if (rest!="" && !onlywhites){
+				if(rest/1!=rest){
+					rest="'"+rest.replace(/\'/g,"\\'")+"'";
+					rest=rest.replace(/\*\$\*\*\*/g,"</");
+					rest=rest.replace(/\*\$\*\*/g,"<");
+					rest=rest.replace(/\*\*\$\*/g,">")
+				}
+			} 
+			else {rest="{}"};
+			if(rest.charAt(0)=="'"){rest='unescape('+rest+')'};
+			if (already && !eval(objname+".sort")){preeval+=objname+"=["+objname+"];\n"};
+			var before="=";after="";
+			if (already){before=".push(";after=")"};
+			var toeval=preeval+objname+before+rest+after;
+			eval(toeval);
+			if(eval(objname+".sort")){objname+="["+eval(objname+".length-1")+"]"};
+			oldniva=niva
+		};
+		return this.xmlobject
+	},
+	show_json_structure:function(obj,debug,l){
+		var x='';
+		if (obj.sort){x+="[\n"} else {x+="{\n"};
+		for (var i in obj){
+			if (!obj.sort){x+=i+":"};
+			if (typeof obj[i] == "object"){
+				x+=this.show_json_structure(obj[i],false,1)
+			}
+			else {
+				if(typeof obj[i]=="function"){
+					var v=obj[i]+"";
+					//v=v.replace(/\t/g,"");
+					x+=v
+				}
+				else if(typeof obj[i]!="string"){x+=obj[i]+",\n"}
+				else {x+="'"+obj[i].replace(/\'/g,"\\'").replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r")+"',\n"}
+			}
+		};
+		if (obj.sort){x+="],\n"} else {x+="},\n"};
+		if (!l){
+			x=x.substring(0,x.lastIndexOf(","));
+			x=x.replace(new RegExp(",\n}","g"),"\n}");
+			x=x.replace(new RegExp(",\n]","g"),"\n]");
+			var y=x.split("\n");x="";
+			var lvl=0;
+			for (var i=0;i<y.length;i++){
+				if(y[i].indexOf("}")>=0 || y[i].indexOf("]")>=0){lvl--};
+				tabs="";for(var j=0;j<lvl;j++){tabs+="\t"};
+				x+=tabs+y[i]+"\n";
+				if(y[i].indexOf("{")>=0 || y[i].indexOf("[")>=0){lvl++}
+			};
+			if(debug=="html"){
+				x=x.replace(/</g,"&lt;").replace(/>/g,"&gt;");
+				x=x.replace(/\n/g,"<BR>").replace(/\t/g,"&nbsp;&nbsp;&nbsp;&nbsp;")
+			};
+			if (debug=="compact"){x=x.replace(/\n/g,"").replace(/\t/g,"")}
+		};
+		return x
+	},
+	no_fast_endings:function(x){
+		x=x.split("/>");
+		for (var i=1;i<x.length;i++){
+			var t=x[i-1].substring(x[i-1].lastIndexOf("<")+1).split(" ")[0];
+			x[i]="></"+t+">"+x[i]
+		}	;
+		x=x.join("");
+		return x
+	},
+	attris_to_tags: function(x){
+		var d=' ="\''.split("");
+		x=x.split(">");
+		for (var i=0;i<x.length;i++){
+			var temp=x[i].split("<");
+			for (var r=0;r<4;r++){temp[0]=temp[0].replace(new RegExp(d[r],"g"),"_jsonconvtemp"+r+"_")};
+			if(temp[1]){
+				temp[1]=temp[1].replace(/'/g,'"');
+				temp[1]=temp[1].split('"');
+				for (var j=1;j<temp[1].length;j+=2){
+					for (var r=0;r<4;r++){temp[1][j]=temp[1][j].replace(new RegExp(d[r],"g"),"_jsonconvtemp"+r+"_")}
+				};
+				temp[1]=temp[1].join('"')
+			};
+			x[i]=temp.join("<")
+		};
+		x=x.join(">");
+		x=x.replace(/ ([^=]*)=([^ |>]*)/g,"><$1>$2</$1");
+		x=x.replace(/>"/g,">").replace(/"</g,"<");
+		for (var r=0;r<4;r++){x=x.replace(new RegExp("_jsonconvtemp"+r+"_","g"),d[r])}	;
+		return x
+	}
+};
+
+
+if(!Array.prototype.push){
+	Array.prototype.push=function(x){
+		this[this.length]=x;
+		return true
+	}
+};
+
+if (!Array.prototype.pop){
+	Array.prototype.pop=function(){
+  		var response = this[this.length-1];
+  		this.length--;
+  		return response
+	}
+};
+
Binary file Wikipedia/right.gif has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/style.css	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,128 @@
+/* Feed item date */
+.FeedItemDate {
+    font-style: italic;
+}
+
+/* Feed item text */
+.FeedItemDescription {
+    padding: 4px 0px;
+}
+
+/* Feed item links */
+.FeedItemLink {
+    font-weight: bold;
+}
+
+/* Anchor tags in the context of a feed item link */
+.FeedItemLink a {
+    text-decoration: underline;
+    font-weight: bold;
+    color: rgb(0,0,0);
+}
+
+/* Focused anchor tags */
+.FeedItemLink a:focus {
+    background: rgb(253,200,47);
+    color: rgb(0,0,0);
+}
+
+
+/* Flatten the main page table layout */
+table.layout,
+table.layout tbody,
+table.layout tr,
+table.layout th,
+table.layout td,
+table.gallery,
+table.gallery tbody,
+table.gallery tr,
+table.gallery th,
+table.gallery td,
+#mp-topbanner,
+#mp-topbanner tbody,
+#mp-topbanner tr,
+#mp-topbanner th,
+#mp-topbanner td,
+#mp-upper,
+#mp-upper tbody,
+#mp-upper tr,
+#mp-upper th,
+#mp-upper td,
+#mp-tfp,
+#mp-tfp tbody,
+#mp-tfp tr,
+#mp-tfp th,
+#mp-tfp td {
+  display: block ;
+  width: 92% ;
+}
+
+
+table.wikitable {
+	width: 92%;
+}
+table.wikitable,
+table.wikitable tbody,
+table.wikitable tr,
+table.wikitable th,
+table.wikitable td {
+	border-bottom:1px solid #AAAAAA;
+	border-collapse:collapse;
+	border-spacing:1px;
+	border-top:1px solid #AAAAAA;
+	clear:both;
+	font-size:90%;
+	margin-bottom:2px;
+}
+
+table.wikitable th {
+	font-weight: bold;	
+}
+
+.codebox {
+    font: normal 12px Arial, sans-serif;
+	border-width: 1px 1px 1px 1px;
+	padding: 1px 1px 1px 1px;
+	border-style: inset inset inset inset;
+	border-color: gray gray gray gray;
+}
+
+table.infobox {
+  display: block ;
+  width: 95%;
+  clear:both;
+}
+
+.templatequote {
+	font-style: italic;
+	font-size: 90%;	
+}
+
+.internal {
+	display: none;	
+}
+
+
+#minidiv {
+	margin:0px 0px; 
+	padding: 0px 0px; 
+	overflow:hidden;
+	background: url("WRTKit/Resources/title.png") no-repeat left top;
+}
+
+.box{
+	display: block;
+	clear: both;
+	width: 92%;
+}
+
+.vertical-navbox{
+	display: block;
+	clear: both;
+	width: 92%;
+}
+	
+	
+#wrtnavimg {
+	width: auto;
+}
\ No newline at end of file
Binary file Wikipedia/titlebar.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/todo.txt	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,3 @@
+- Add links hover in article view 
+- settings
+- predictive search
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/utils.js	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,256 @@
+// ////////////////////////////////////////////////////////////////////////////
+// Symbian Foundation Example Code
+//
+// This software is in the public domain. No copyright is claimed, and you 
+// may use it for any purpose without license from the Symbian Foundation.
+// No warranty for any purpose is expressed or implied by the authors or
+// the Symbian Foundation. 
+// ////////////////////////////////////////////////////////////////////////////
+
+var logEnabled = true;
+
+// Opens a URL in a separate browser window
+function openURL(url) {
+    if (window.widget) {
+        // in WRT
+        widget.openURL(url);
+    } else {
+        // outside WRT
+        window.open(url, "NewWindow");
+    }
+}
+
+function increaseFontSize(){
+    if (window.widget) {
+		setCssBodyFontSize(currentFontSize + 2);
+	}
+}
+
+function decreaseFontSize(){
+    if (window.widget) {
+		if (currentFontSize > 4) {
+			setCssBodyFontSize(currentFontSize - 2);
+		}
+	}
+}
+
+function setCssBodyFontSize(size){
+    if (window.widget) {
+		currentFontSize = size;
+		var sizestring = "" + size;
+		document.body.style.fontSize = sizestring + "px";
+		widget.setPreferenceForKey(sizestring, "fontsize");
+	}
+}
+
+
+function log(txt) {
+	if (logEnabled) {
+//		txt = txt.replace(/</g, unescape("%26lt%3B")).replace(/>/g, unescape("%26gt%3B")); 
+//		txt = txt.replace(/</g, "&lt");
+//		txt = txt.replace(/\>/g, "&gt");
+		document.getElementById("debugdiv").innerHTML = txt + "<br> " + document.getElementById("debugdiv").innerHTML;
+	} 
+}
+
+function setupLog() {
+	if (logEnabled) {
+		if (window.widget) {
+			var logMenuItem = new MenuItem("Toggle log", 99);
+			logMenuItem.onSelect = function() {
+				var div = document.getElementById("debugdiv");
+				var main = document.getElementById("uimandiv");
+				if ( div.style.display == "none" ) {
+					div.style.display = "";
+					main.style.display = "none";
+				} else {
+					div.style.display = "none";
+					main.style.display = "";
+				}
+			}
+			menu.append(logMenuItem);
+		}
+	}
+}
+
+function shorten(text, len) {
+	if ( text.length < len + 3 ) return text;
+	return text.substring(0,len) + "...";
+}
+
+function uniDecode(text) {
+	var ptr = 0;
+	var buf = "";
+	while ( ptr < text.length ){
+		if ( text.charAt(ptr) == '%' ) {
+			// read next two chars and interpret as hex UTF-8 char code
+			var hex = "";
+			ptr ++;
+			hex += text.charAt(ptr) ;
+			ptr ++;
+			hex += text.charAt(ptr) ;
+			var ccode = unhex(hex);
+			// decode utf-8
+			if (ccode < 128) { // 1 byte char
+				buf += String.fromCharCode(ccode);
+				ptr++;
+			}
+			else if((ccode > 191) && (ccode < 224)) { // 2 byte char 
+				var hex2 = "";
+				ptr ++; // move to % 
+				ptr ++; // move to first hex digit 
+				hex2 += text.charAt(ptr) ;
+				ptr ++;
+				hex2 += text.charAt(ptr) ;
+				var ccode2 = unhex(hex2);
+				// need more stuff to get char
+				buf += String.fromCharCode(((ccode & 31) << 6) | (ccode2 & 63));
+				ptr ++;
+			}
+			else {  // 3 byte char
+				var hex2 = "";
+				ptr ++; // move to % 
+				ptr ++; // move to first hex digit 
+				hex2 += text.charAt(ptr) ;
+				ptr ++;
+				hex2 += text.charAt(ptr) ;
+				var ccode2 = unhex(hex2);
+				var hex3 = "";
+				ptr ++; // move to % 
+				ptr ++; // move to first hex digit 
+				hex3 += text.charAt(ptr) ;
+				ptr ++;
+				hex3 += text.charAt(ptr) ;
+				var ccode3 = unhex(hex2);
+				buf += String.fromCharCode(((ccode & 15) << 12) | ((ccode2 & 63) << 6) | (ccode3 & 63));
+				ptr++;
+			}
+		} else {
+			buf += text.charAt(ptr);
+			ptr ++;
+		}
+	}
+	return buf;
+}
+
+function unhex(hx) {
+	var val = 0;
+	for ( var i = 0 ; i < hx.length ; i ++ ) {
+		val = val * 16;
+		switch(hx.charAt(i)) {
+			case '0': continue; 
+			case '1':
+			case '2':
+			case '3':
+			case '4':
+			case '5':
+			case '6':
+			case '7':
+			case '8':
+			case '9': {
+				val += parseInt(hx.charAt(i));
+				break;
+			}
+			case 'A':
+			case 'a':{
+				val += 10;
+				break;
+			}
+			case 'B':
+			case 'b':{
+				val += 11;
+				break;
+			}
+			case 'C':
+			case 'c':{
+				val += 12;
+				break;
+			}
+			case 'D':
+			case 'd':{
+				val += 13;
+				break;
+			}
+			case 'E':
+			case 'e':{
+				val += 14;
+				break;
+			}
+			case 'F':
+			case 'f':{
+				val += 15;
+				break;
+			}
+		}
+	}
+	return val;
+}
+
+function shortFormatTime(ts) {
+	var date = new Date(ts);
+	var ret = "";
+	ret += pad(2,"0", date.getDate());
+	ret += "/";
+	ret += pad(2,"0",(1+date.getMonth()));
+	ret += " ";
+	ret += pad(2,"0", date.getHours());
+	ret += ":";
+	ret += pad(2,"0",date.getMinutes());
+	return ret;
+}
+
+
+function nocache(url) {
+    if (url.indexOf("?") == -1) {
+        url += "?";
+    } else {
+        url += "&";
+    }
+    url += "xnocache=" + (new Date().getTime());
+	return url;
+}
+
+function pad(_num, _char, _val) {
+	var buf = ""+ _val;
+	while(buf.length < _num){
+		buf = _char + "" + buf;
+	}
+//	alert("pad: num=" +num + ", char=" + char + ", val=" + val +", result=" +buf );
+	return buf;
+}
+
+function getViewRep(view) {
+	if ( view == null ) {
+		return "null";
+	} else if (view) {
+		return view.caption;
+	} else {
+		return "undefined";
+	}
+}
+
+
+function ViewCache(size) {
+	this.size = size;
+	this.names = new Array();
+	this.views = new Array();
+}
+
+ViewCache.prototype.addView = function(name,view) {
+	this.names.splice(0,0,name);
+	this.views.splice(0,0,view);
+	
+	if (this.names.length > this.size) {
+		this.names.splice(this.size, 1);
+		this.views.splice(this.size, 1);
+	}
+}
+
+ViewCache.prototype.getView = function(name){
+	for ( var i = 0 ; i < this.names.length ; i++ ) {
+		if ( name == this.names[i] ) {
+			return this.views[i];
+		}
+	}
+	return null;
+}
\ No newline at end of file
Binary file Wikipedia/warning.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/wiki.css	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,1228 @@
+a.stub, a.new {
+color:#BA0000;
+text-decoration:none;
+}
+#toc {
+display:none;
+/*
+background-color:#F9F9F9;
+border:1px solid #AAAAAA;
+padding:5px;
+*/
+}
+a.hover {
+	background-color: #87CDFF;
+}
+.tocindent {
+margin-left:2em;
+}
+.tocline {
+margin-bottom:0;
+}
+div.floatright {
+border-color:White;
+border-style:solid;
+/*
+border-width:0.5em 0 0.8em 1.4em;
+clear:right;
+float:right;
+position:relative;
+*/
+float: left;
+clear:both;
+margin:0;
+}
+div.floatright p {
+font-style:italic;
+}
+div.floatleft {
+border-color:White;
+border-style:solid;
+/*
+border-width:0.5em 1.4em 0.8em 0;
+position:relative;
+margin:0.3em 0.5em 0.5em 0;
+*/
+float:left;
+clear:both;
+}
+div.floatleft p {
+font-style:italic;
+}
+div.thumb {
+border: 1px solid #808080;
+overflow:hidden;
+width:95%;
+clear:both;
+padding:2px;
+margin-top:5px !important;
+margin-bottom:5px !important;
+margin-left:0px;
+margin-right:0px;
+}
+div.thumb div {
+background-color:#F9F9F9;
+font-size:94%;
+padding:0px !important;
+margin:0px !important;
+text-align:center;
+}
+div.thumb div a img {
+padding:0px !important;
+margin:0px !important;
+max-width: 95%;
+}
+div.thumb div div.thumbcaption {
+padding:0px !important;
+margin:0px !important;
+/*
+padding:0.3em 0 0.1em;
+*/
+}
+div.magnify {
+display:none;
+}
+div.tright {
+/*
+border-width:0.5em 0 0.8em 1.4em;
+clear:right;
+float:right;
+*/
+float:left;
+display:block;
+clear:both;
+}
+div.thumbinner {
+padding: 0px;
+margin: 0px;
+}
+div.tleft {
+/*
+border-width:0.5em 1.4em 0.8em 0;
+float:left;
+margin-right:0.5em;
+*/
+float:left;
+clear:both;
+display:block;
+}
+img.thumbborder {
+max-width: 95%;
+}
+table.rimage {
+/*
+margin-left:1em;
+float:right;
+*/
+float:left;
+display: block;
+clear: both;
+margin-bottom:1em;
+position:relative;
+text-align:center;
+width:1pt;
+}
+
+.noprint, div#jump-to-nav, div.top, div#column-one, #colophon, .editsection, .toctoggle, .tochidden, div#f-poweredbyico, div#f-copyrightico, li#viewcount, li#about, li#disclaimer, li#privacy, #mw-hidden-catlinks {
+display:none;
+}
+
+ul {
+list-style-type:square;
+margin-left:0px;
+padding-left: 3px;
+}
+
+#content {
+border:medium none !important;
+margin:0 !important;
+padding:0 !important;
+}
+
+#footer {
+border-top:1px solid black;
+color:black;
+}
+
+h1, h2, h3, h4, h5, h6 {
+font-weight:bold;
+text-decoration: underline;
+}
+
+h3 {
+font-size: 1.1em;
+font-weight:bolder;
+font-family: inherit;
+font-style: inherit;
+}
+
+h4 {
+font-size: 1.1em;
+font-weight:bolder;
+font-family: inherit;
+font-style: inherit;
+}
+
+p, .documentDescription {
+line-height:1.2em;
+/*
+margin:1em 0 !important;
+*/
+}
+.tocindent p {
+margin:0 !important;
+}
+pre {
+border:1pt dashed black;
+color:black;
+font-size:8pt;
+overflow:auto;
+padding:1em 0;
+white-space:pre;
+}
+table.listing, table.listing td {
+border:1pt solid black;
+border-collapse:collapse;
+}
+/*
+#content a.external.text:after, #content a.external.autonumber:after {
+content:" (" attr(href) ") ";
+}
+*/
+#globalWrapper {
+min-width:0 !important;
+width:100% !important;
+}
+#content {
+color:black;
+}
+#column-content {
+margin:0 !important;
+}
+#column-content #content {
+margin:0 !important;
+padding:1em;
+}
+/*
+a, a.external, a.new, a.stub {
+color:black !important;
+text-decoration:none !important;
+}
+a, a.external, a.new, a.stub {
+color:inherit !important;
+text-decoration:inherit !important;
+}
+*/
+img {
+border:medium none;
+}
+img.tex {
+vertical-align:middle;
+max-width: 95%;
+}
+span.texhtml {
+font-family:serif;
+}
+#siteNotice {
+display:none;
+}
+div.gallerybox {
+background-color:#F9F9F9;
+border:1px solid #CCCCCC;
+width:150px;
+}
+div.gallerytext {
+overflow:visible;
+}
+table.diff {
+background:white none repeat scroll 0 0;
+}
+td.diff-otitle {
+background:#FFFFFF none repeat scroll 0 0;
+}
+td.diff-ntitle {
+background:#FFFFFF none repeat scroll 0 0;
+}
+td.diff-addedline {
+background:#CCFFCC none repeat scroll 0 0;
+border:2px solid black;
+font-size:smaller;
+}
+td.diff-deletedline {
+background:#FFFFAA none repeat scroll 0 0;
+border:2px dotted black;
+font-size:smaller;
+}
+td.diff-context {
+background:#EEEEEE none repeat scroll 0 0;
+font-size:smaller;
+}
+.diffchange {
+color:silver;
+font-weight:bold;
+text-decoration:underline;
+}
+
+
+
+
+
+
+/* //////////////////////////////////////////////////////////////////// */
+
+
+/* <source lang="css"> */
+ 
+/* Main page fixes */
+#interwiki-completelist {
+    font-weight: bold;
+}
+
+body.page-Main_Page #ca-delete {
+    display: none !important;
+}
+
+body.page-Main_Page #mp-topbanner {
+   clear: both;
+}
+
+/* Edit window toolbar */
+#toolbar {
+    height: 22px;
+    margin-bottom: 6px;
+}
+
+/* Margins for <ol> and <ul> */
+#content ol, #content ul,
+#mw_content ol, #mw_content ul {
+  margin-bottom: 0.5em;
+}
+
+/* Make the list of references in [[Template:Reflist]] smaller */
+.references-small { 
+    font-size: 90%;
+}
+
+/* VALIDATOR NOTICE: the following is correct, but the W3C validator doesn't accept it */
+/* -moz-* is a vendor-specific extension (CSS 2.1 4.1.2.1) */
+/* column-count is from the CSS3 module "CSS Multi-column Layout" */
+/* Please ignore any validator errors caused by these two lines */
+.references-2column {
+    font-size: 90%;
+    -moz-column-count: 2;
+    column-count: 2;
+}
+
+/* Highlight clicked reference in blue to help navigation */
+ol.references > li:target,
+sup.reference:target,
+span.citation:target { 
+    background-color: #DEF;
+}
+
+/* Ensure refs in table headers and the like aren't bold or italic */
+sup.reference {
+    font-weight: normal;
+    font-style: normal;
+}
+
+
+/* Styling for citations */
+span.citation, cite {
+    font-style: normal;
+    word-wrap: break-word;
+}
+
+/* For linked citation numbers and document IDs, where
+   the number need not be shown on a screen or a handheld,
+   but should be included in the printed version
+*/
+@media screen, handheld {
+    span.citation *.printonly {
+        display: none;
+    }
+}
+
+
+table.prettytable {
+    background: #f9f9f9;
+    border: 1px #aaa solid;
+    border-collapse: collapse;
+}
+.prettytable th, .prettytable td {
+    border: 1px #aaa solid;
+    padding: 0.2em;
+}
+.prettytable th {
+    background: #f2f2f2;
+    text-align: center;
+}
+.prettytable caption {
+    font-weight: bold;
+}
+
+/* Default skin for navigation boxes */
+table.vertical-navbox,
+table.navbox {            /* Navbox container style */
+  border: 1px solid #aaa;
+  width: 95%; 
+  margin: auto;
+  clear: both;
+  font-size: 88%;
+  text-align: center;
+  padding: 1px;
+}
+table.navbox + table.navbox {  /* Single pixel border between adjacent navboxes */
+  margin-top: -1px;            /* (doesn't work for IE6, but that's okay)       */
+}
+.navbox-title,
+.navbox-abovebelow,
+table.navbox th {
+  text-align: center;      /* Title and above/below styles */
+  padding-left: 1px;
+  padding-right: 1px;
+}
+
+table.vertical-navbox th,
+table.navbox th {
+  background-color: #87CDFF;
+}
+
+.navbox-group {            /* Group style */
+  white-space: nowrap;
+  text-align: right;
+  font-weight: bold;
+  padding-left: 1px;
+  padding-right: 1px;
+}
+.navbox, .navbox-subgroup {
+  background: #fdfdfd;     /* Background color */
+}
+.navbox-list {
+  border-color: #fdfdfd;   /* Must match background color */
+}
+.navbox-title,
+table.navbox th {
+  background: #ccccff;     /* Level 1 color */
+}
+.navbox-abovebelow,
+.navbox-group,
+.navbox-subgroup .navbox-title {
+  background: #ddddff;     /* Level 2 color */
+}
+.navbox-subgroup .navbox-group, .navbox-subgroup .navbox-abovebelow {
+  background: #e6e6ff;     /* Level 3 color */
+}
+.navbox-even {
+  background: #f7f7f7;     /* Even row striping */
+}
+.navbox-odd {
+  background: transparent; /* Odd row striping */
+}
+
+.collapseButton {          /* 'show'/'hide' buttons created dynamically */
+	display: none;
+}
+
+/* Infobox template style */
+.infobox {
+    border: 1px solid #aaa;
+    background-color: #f9f9f9;
+    color: black;
+    float: left;
+	display: block;
+    clear: both;
+	width: 95%;
+	font-size: 80%;
+}
+
+.infobox tbody {
+	max-width: 95%;
+    background-color: #f9f9f9;
+}
+
+.infobox td,
+.infobox th {
+    vertical-align: top;
+}
+
+.infobox th {
+	background-color: #87CDFF;
+}
+.infobox caption {
+    font-size: larger;
+}
+.infobox.bordered {
+    border-collapse: collapse;
+}
+.infobox.bordered td,
+.infobox.bordered th {
+    border: 1px solid #aaa;
+}
+.infobox.bordered .borderless td,
+.infobox.bordered .borderless th {
+    border: 0;
+}
+
+.infobox.sisterproject {
+    width: 20em;
+    font-size: 90%;
+}
+
+.infobox.standard-talk {
+    border: 1px solid #c0c090;
+    background-color: #f8eaba;
+}
+.infobox.standard-talk.bordered td,
+.infobox.standard-talk.bordered th {
+    border: 1px solid #c0c090;
+}
+
+/* styles for bordered infobox with merged rows */
+.infobox.bordered .mergedtoprow td,
+.infobox.bordered .mergedtoprow th {
+    border: 0;
+    border-top: 1px solid #aaa;
+    border-right: 1px solid #aaa;
+}
+
+.infobox.bordered .mergedrow td,
+.infobox.bordered .mergedrow th {
+    border: 0;
+    border-right: 1px solid #aaa;
+}
+
+/* Styles for geography infoboxes, eg countries,
+   country subdivisions, cities, etc.            */
+.infobox.geography {
+    text-align: left;
+    border-collapse: collapse;
+    line-height: 1.2em; 
+    font-size: 90%;
+}
+
+.infobox.geography  td,
+.infobox.geography  th {
+    border-top: solid 1px #aaa;
+}
+.infobox.geography .mergedtoprow td,
+.infobox.geography .mergedtoprow th {
+    border-top: solid 1px #aaa;
+}
+
+.infobox.geography .mergedrow td,
+.infobox.geography .mergedrow th {
+    border: 0;
+}
+
+.infobox.geography .mergedbottomrow td,
+.infobox.geography .mergedbottomrow th {
+    border-top: 0;
+    border-bottom: solid 1px #aaa;
+}
+
+.infobox.geography .maptable td,
+.infobox.geography .maptable th {
+    border: 0;
+    padding: 0;
+}
+
+/* Makes redirects appear in italics in categories and on [[Special:Allpages]] */
+.redirect-in-category, .allpagesredirect {
+    font-style: italic;
+}
+
+/* Icons for medialist templates [[Template:Listen]],
+   [[Template:Multi-listen_start]], [[Template:Video]],
+   [[Template:Multi-video_start]]
+*/
+div.listenlist {
+    background:
+        url("http://upload.wikimedia.org/wikipedia/commons/thumb/a/a6/Gnome-speakernotes.png/30px-Gnome-speakernotes.png");
+    padding-left: 40px;
+}
+
+/* Style rules for media list templates */
+div.medialist {
+    min-height: 50px;
+    margin: 1em;
+    background-position: top left;
+    background-repeat: no-repeat;
+}
+div.medialist ul {
+    list-style-type: none; 
+    list-style-image: none;
+    margin: 0;
+}
+div.medialist ul li {
+    padding-bottom: 0.5em;
+}
+div.medialist ul li li {
+    font-size: 91%;
+    padding-bottom: 0;
+}
+
+/* Change the external link icon to an Adobe icon for all PDF files
+   in browsers that support these CSS selectors, like Mozilla and Opera */
+#content a[href$=".pdf"].external, 
+#content a[href*=".pdf?"].external, 
+#content a[href*=".pdf#"].external,
+#content a[href$=".PDF"].external, 
+#content a[href*=".PDF?"].external, 
+#content a[href*=".PDF#"].external,
+#mw_content  a[href$=".pdf"].external, 
+#mw_content  a[href*=".pdf?"].external, 
+#mw_content  a[href*=".pdf#"].external,
+#mw_content  a[href$=".PDF"].external, 
+#mw_content  a[href*=".PDF?"].external, 
+#mw_content  a[href*=".PDF#"].external {
+    background: url("http://upload.wikimedia.org/wikipedia/commons/2/23/Icons-mini-file_acrobat.gif") center right no-repeat;
+    padding-right: 16px;
+}
+
+/* Change the external link icon to an Adobe icon anywhere the PDFlink class
+   is used (notably Template:PDFlink). This works in IE, unlike the above. */
+#content span.PDFlink a,
+#mw_content span.PDFlink a {
+    background: url("http://upload.wikimedia.org/wikipedia/commons/2/23/Icons-mini-file_acrobat.gif") center right no-repeat;
+    padding-right: 17px;
+}
+
+/* Content in columns with CSS instead of tables [[Template:Columns]] */
+div.columns-2 div.column {
+    float: left;
+	display: block;
+    clear: both;
+	width: 95%;
+}
+div.columns-3 div.column {
+    float: left;
+	display: block;
+    clear: both;
+	width: 95%;
+}
+div.columns-4 div.column {
+    float: left;
+	display: block;
+    clear: both;
+	width: 95%;
+}
+div.columns-5 div.column {
+    float: left;
+	display: block;
+    clear: both;
+	width: 95%;
+}
+
+/* Messagebox templates */
+.messagebox {
+    border: 1px solid #aaa;
+    background-color: #f9f9f9;
+    width: 80%;
+    margin: 0 auto 1em auto;
+    padding: .2em;
+}
+.messagebox.merge {
+    border: 1px solid #c0b8cc;
+    background-color: #f0e5ff;
+    text-align: center;
+}
+.messagebox.cleanup {
+    border: 1px solid #9f9fff;
+    background-color: #efefff;
+    text-align: center;
+}
+.messagebox.standard-talk {
+    border: 1px solid #c0c090;
+    background-color: #f8eaba;
+    margin: 4px auto;
+}
+/* For old WikiProject banners inside banner shells. */
+.mbox-inside .standard-talk,
+.messagebox.nested-talk {
+    border: 1px solid #c0c090;
+    background-color: #f8eaba;
+    width: 100%;
+    margin: 2px 0;
+    padding: 2px;
+}
+.messagebox.small {
+    width: 90%px;
+    font-size: 85%;
+    float: left;
+	display: block;
+    clear: both;
+	width: 95%;
+    margin: 0 0 1em 1em;
+    line-height: 1.25em; 
+}
+.messagebox.small-talk {
+    width: 238px;
+    font-size: 85%;
+    float: left;
+	display: block;
+    clear: both;
+	width: 95%;
+    margin: 0 0 1em 1em;
+    line-height: 1.25em; 
+    background: #F8EABA;
+}
+
+
+/* Cell sizes for ambox/tmbox/imbox/cmbox/ombox/fmbox/dmbox message boxes */
+th.mbox-text, td.mbox-text {     /* The message body cell(s) */
+    border: none; 
+    width: 95%;    /* Make all mboxes the same width regardless of text length */
+}
+td.mbox-image {                  /* The left image cell */
+    border: none; 
+    text-align: center; 
+}
+td.mbox-imageright {             /* The right image cell */
+    border: none;
+    text-align: center; 
+}
+td.mbox-empty-cell {         /* An empty narrow cell */
+    border: none;
+    padding: 0px;
+    width: 1px;
+}
+
+/* Article message box styles */
+table.ambox {
+    margin: 0px 10%;   /* 10% = Will not overlap with other elements */
+    border: 1px solid #aaa; 
+    border-left: 10px solid #1e90ff;    /* Default "notice" blue */
+    background: #fbfbfb; 
+}
+table.ambox + table.ambox {   /* Single border between stacked boxes. */
+    margin-top: -1px;
+}
+.ambox th.mbox-text, 
+.ambox td.mbox-text {            /* The message body cell(s) */
+    padding: 0.25em 1px;       /* 0.5em left/right */
+}
+.ambox td.mbox-image {           /* The left image cell */
+    padding: 2px 0 2px 0.5em;    /* 0.5em left, 0px right */
+}
+.ambox td.mbox-imageright {      /* The right image cell */
+    padding: 2px 1.px 2px 0;    /* 0px left, 0.5em right */
+}
+
+table.ambox-notice {
+    border-left: 1px solid #1e90ff;    /* Blue */
+}
+table.ambox-speedy {
+    border-left: 1px solid #b22222;    /* Red */
+    background: #fee;                   /* Pink */
+}
+table.ambox-delete {
+    border-left: 1px solid #b22222;    /* Red */
+}
+table.ambox-content {
+    border-left: 1px solid #f28500;    /* Orange */
+}
+table.ambox-style {
+    border-left: 1px solid #f4c430;    /* Yellow */
+}
+table.ambox-move {
+    border-left: 1px solid #9932cc;    /* Purple */
+}
+table.ambox-protection {
+    border-left: 1px solid #bba;       /* Gray-gold */
+}
+
+/* Image message box styles */
+table.imbox {
+    margin: 1px 10%; 
+    border-collapse: collapse; 
+    border: 1px solid #1e90ff;    /* Default "notice" blue */
+    background: #fbfbfb;
+}
+.imbox .mbox-text .imbox {    /* For imboxes inside imbox-text cells. */
+    margin: 0 -0.5em;    /* 0.9 - 0.5 = 0.4em left/right. */
+}
+.mbox-inside .imbox {    /* For imboxes inside other templates. */
+    margin: 1px;
+}
+
+table.imbox-notice {
+    border: 1px solid #1e90ff;    /* Blue */
+}
+table.imbox-speedy {
+    border: 1px solid #b22222;    /* Red */
+    background: #fee;             /* Pink */
+}
+table.imbox-delete {
+    border: 1px solid #b22222;    /* Red */
+}
+table.imbox-content {
+    border: 1px solid #f28500;    /* Orange */
+}
+table.imbox-style {
+    border: 1px solid #f4c430;    /* Yellow */
+}
+table.imbox-move {
+    border: 1px solid #9932cc;    /* Purple */
+}
+table.imbox-protection {
+    border: 1px solid #bba;       /* Gray-gold */
+}
+table.imbox-license {
+    border: 1px solid #88a;       /* Dark gray */
+    background: #f7f8ff;          /* Light gray */
+}
+table.imbox-featured {
+    border: 1px solid #cba135;    /* Brown-gold */
+}
+
+/* Category message box styles */
+table.cmbox {
+    margin: 1px 10%;
+    border-collapse: collapse;
+    border: 1px solid #aaa; 
+    background: #DFE8FF;    /* Default "notice" blue */
+}
+
+table.cmbox-notice {
+    background: #D8E8FF;    /* Blue */
+}
+table.cmbox-speedy {
+    margin-top: 4px;
+    margin-bottom: 4px;
+    border: 1px solid #b22222;    /* Red */
+    background: #FFDBDB;          /* Pink */
+}
+table.cmbox-delete {
+    background: #FFDBDB;    /* Red */
+}
+table.cmbox-content {
+    background: #FFE7CE;    /* Orange */
+}
+table.cmbox-style {
+    background: #FFF9DB;    /* Yellow */
+}
+table.cmbox-move {
+    background: #E4D8FF;    /* Purple */
+}
+table.cmbox-protection {
+    background: #EFEFE1;    /* Gray-gold */
+}
+
+/* Other pages message box styles */
+table.ombox {
+    margin: 1px 10%; 
+    border-collapse: collapse; 
+    border: 1px solid #aaa;       /* Default "notice" gray */
+    background: #f9f9f9;
+}
+
+table.ombox-notice {
+    border: 1px solid #aaa;       /* Gray */
+}
+table.ombox-speedy {
+    border: 1px solid #b22222;    /* Red */
+    background: #fee;             /* Pink */
+}
+table.ombox-delete {
+    border: 1px solid #b22222;    /* Red */
+}
+table.ombox-content {
+    border: 1px solid #f28500;    /* Orange */
+}
+table.ombox-style {
+    border: 1px solid #f4c430;    /* Yellow */
+}
+table.ombox-move {
+    border: 1px solid #9932cc;    /* Purple */
+}
+table.ombox-protection {
+    border: 1px solid #bba;       /* Gray-gold */
+}
+ 
+/* Talk page message box styles */
+table.tmbox {
+    margin: 1px 10%;
+    border-collapse: collapse;
+    border: 1px solid #c0c090;    /* Default "notice" gray-brown */
+    background: #f8eaba;
+}
+.mediawiki .mbox-inside .tmbox { /* For tmboxes inside other templates. The "mediawiki" */
+    margin: 1px 0;               /* class ensures that this declaration overrides other */
+    width: 95%;  /* For Safari and Opera */     /* styles (including mbox-small above) */
+}
+.mbox-inside .tmbox.mbox-small { /* "small" tmboxes should not be small when  */
+    line-height: 1.5em;          /* also "nested", so reset styles that are   */   
+    font-size: 100%;             /* set in "mbox-small" above.                */
+}
+
+table.tmbox-speedy {
+    border: 1px solid #b22222;    /* Red */
+    background: #fee;             /* Pink */
+}
+table.tmbox-delete {
+    border: 1px solid #b22222;    /* Red */
+}
+table.tmbox-content {
+    border: 1px solid #f28500;    /* Orange */
+}
+table.tmbox-style {
+    border: 1px solid #f4c430;    /* Yellow */
+}
+table.tmbox-move {
+    border: 1px solid #9932cc;    /* Purple */
+}
+table.tmbox-protection,
+table.tmbox-notice {
+    border: 1px solid #c0c090;    /* Gray-brown */
+}
+
+/* Disambig and set index box styles */
+table.dmbox {
+    clear: both; 
+    margin: 1px; 
+    border-top: 1px solid #ccc; 
+    border-bottom: 1px solid #ccc; 
+    background: transparent;
+}
+ 
+/* Footer and header message box styles */
+table.fmbox {
+    clear: both;
+    margin: 1px 0;
+    width: 95%;
+    border: 1px solid #aaa;
+    background: #f9f9f9;     /* Default "system" gray */
+}
+table.fmbox-system {
+    background: #f9f9f9;
+}
+table.fmbox-warning {
+    border: 1px solid #bb7070;  /* Dark pink */
+    background: #ffdbdb;        /* Pink */
+}
+table.fmbox-editnotice {
+    background: transparent;
+}
+/* Div based "warning" style fmbox messages. */
+div.mw-warning-with-logexcerpt,
+div.mw-lag-warn-high,
+div.mw-cascadeprotectedwarning,
+div#mw-protect-cascadeon {
+    clear: both;
+    margin: 1pxem 0;
+    border: 1px solid #bb7070;
+    background: #ffdbdb;
+    padding: 1px 1px;
+}
+/* Div based "system" style fmbox messages. Used in 
+   [[MediaWiki:Noarticletext]] and [[MediaWiki:Readonly lag]]. */
+div.mw-lag-warn-normal,
+div.noarticletext,
+div.fmbox-system {
+    clear: both;
+    margin: 1pxem 0;
+    border: 1px solid #aaa;
+    background: #f9f9f9;
+    padding: 1pxem 1px;
+}
+
+/* These mbox-small classes must be placed after all other 
+   ambox/tmbox/ombox etc classes. "body.mediawiki" is so 
+   they override "table.ambox + table.ambox" above. */
+body.mediawiki table.mbox-small {   /* For the "small=yes" option. */
+    float: left;
+	display: block;
+    clear: both;
+	width: 95%;
+    margin: 1px 0 1px 1px;
+    font-size: 88%;
+    line-height: 1.25em;
+}
+body.mediawiki table.mbox-small-left {   /* For the "small=left" option. */
+    margin: 1px 1em 4px 0;
+	width: 95%;
+    border-collapse: collapse;
+    font-size: 88%;
+    line-height: 1.25em;
+}
+
+
+/* Support for Template:IPA, Template:Unicode and Template:Polytonic.
+   The second declarations reset the styles for all browsers except
+   IE6, which chokes on the empty comment tags. Please copy any changes
+   to [[Template:IPA fonts]] and [[Template:Unicode fonts]].
+*/
+.IPA {
+    font-family: "Charis SIL", "Doulos SIL", Gentium, GentiumAlt,
+                 "DejaVu Sans", Code2000, "TITUS Cyberbit Basic",
+                 "Arial Unicode MS", "Lucida Sans Unicode",
+                 "Chrysanthi Unicode";
+    font-family /**/: inherit;
+}
+.Unicode {
+    font-family: Code2000, Code2001, "Free Serif", "TITUS Cyberbit Basic",
+                 "Doulos SIL", "Chrysanthi Unicode", "Bitstream Cyberbit",
+                 "Bitstream CyberBase", Thryomanes, Gentium, GentiumAlt,
+                 "Lucida Grande", "Free Sans", "Arial Unicode MS",
+                 "Microsoft Sans Serif", "Lucida Sans Unicode";
+    font-family /**/: inherit;
+}
+.latinx {
+    font-family: Code2000, Code2001, "TITUS Cyberbit Basic", "Microsoft Sans Serif";
+    font-family /**/: inherit;
+}
+.polytonic {
+    font-family: "Athena Unicode", Gentium, "Palatino Linotype",
+                 "Arial Unicode MS", "Lucida Sans Unicode",
+                 "Lucida Grande", Code2000; 
+    font-family /**/: inherit;
+}
+
+#wpSave {
+    font-weight: bold;
+}
+
+/* class hiddenStructure is defunct. See [[Wikipedia:hiddenStructure]] */
+.hiddenStructure {
+    display: inline ! important;
+    color: #f00; 
+    background-color: #0f0;
+}
+
+/* suppress missing interwiki image links where #ifexist cannot
+   be used due to high number of requests see .hidden-redlink on 
+   http://meta.wikimedia.org/wiki/MediaWiki:Common.css
+*/
+.check-icon a.new {
+    display: none; 
+    speak: none;
+}
+
+/* Removes underlines from links */
+.nounderlines a { 
+    text-decoration: none;
+}
+
+/* Remove underline from IPA links */
+.IPA a:link, .IPA a:visited {
+    text-decoration: none;
+}
+
+/* Standard Navigationsleisten, aka box hiding thingy
+   from .de.  Documentation at [[Wikipedia:NavFrame]]. */
+div.NavFrame {
+    margin: 0;
+    padding: 1px;
+    border: 1px solid #aaa;
+    text-align: center;
+    border-collapse: collapse;
+    font-size: 95%;
+}
+div.NavFrame + div.NavFrame {
+    border-top-style: none;
+    border-top-style: hidden;
+}
+div.NavPic {
+    background-color: #fff;
+    margin: 0;
+    padding: 1px;
+    float: left;
+}
+div.NavFrame div.NavHead {
+    height: 1.6em;
+    font-weight: bold;
+    background-color: #ccf;
+    position: relative;
+}
+div.NavFrame p,
+div.NavFrame div.NavContent,
+div.NavFrame div.NavContent p {
+    font-size: 100%;
+}
+div.NavEnd {
+    margin: 0;
+    padding: 0;
+    line-height: 1px;
+    clear: both;
+}
+a.NavToggle {
+    position: absolute;
+    top: 0;
+    right: 3px;
+    font-weight: normal;
+    font-size: 90%;
+}
+
+/* Hatnotes and disambiguation notices */
+.rellink,
+.dablink {
+    font-style: italic;
+    padding-left: 1px;
+    margin-bottom: 1px;
+}
+.rellink i,
+.dablink i {
+    font-style: normal;
+}
+
+/* Style for horizontal UL lists */
+.horizontal ul {
+    padding: 0;
+    margin: 0;
+}
+.horizontal li { 
+    padding: 0 0.6em 0 0.4em;
+    display: inline;
+    border-right: 1px solid;
+}
+.horizontal li:last-child {
+    border-right: none;
+    padding-right: 0;
+}
+
+/* Allow transcluded pages to display in lists rather than a table.
+   Compatible in Firefox; incompatible in IE6. */
+.listify td    { display: list-item; }
+.listify tr    { display: block; }
+.listify table { display: block; }
+
+/* Geographical coordinates defaults. See [[Template:Coord/link]]
+   for how these are used. The classes "geo", "longitude", and
+   "latitude" are used by the [[Geo microformat]].
+ */
+.geo-default, .geo-dms, .geo-dec  { display: inline; }
+.geo-nondefault, .geo-multi-punct { display: none; }
+.longitude, .latitude             { white-space: nowrap; }
+
+/* When <div class="nonumtoc"> is used on the table of contents,
+   the ToC will display without numbers */
+.nonumtoc .tocnumber { display: none; }
+.nonumtoc #toc ul,
+.nonumtoc .toc ul {
+    line-height: 1.5em;
+    list-style: none;
+    margin: .3em 0 0;
+    padding: 0;
+}
+.nonumtoc #toc ul ul, 
+.nonumtoc .toc ul ul { 
+    margin: 0 0 0 2em; 
+}
+
+/* Allow limiting of which header levels are shown in a TOC;
+   <div class="toclimit-3">, for instance, will limit to
+   showing ==headings== and ===headings=== but no further
+   (as long as there are no =headings= on the page, which
+   there shouldn't be according to the MoS).
+ */
+.toclimit-2 .toclevel-2,
+.toclimit-3 .toclevel-3,
+.toclimit-4 .toclevel-4,
+.toclimit-5 .toclevel-5,
+.toclimit-6 .toclevel-6,
+.toclimit-7 .toclevel-7 { display: none; }
+
+/* Styling for Template:Quote */
+blockquote.templatequote { 
+     margin-top: 0; 
+}
+blockquote.templatequote div.templatequotecite { 
+    line-height: 1em;
+    text-align: left;
+    padding-left: 1px;
+    margin-top: 0;
+}
+blockquote.templatequote div.templatequotecite cite {
+    font-size: 85%;
+}
+
+div.user-block {
+    padding: 2px;
+    border: 1px solid #A9A9A9;
+    background-color: #FFEFD5;
+}
+
+/* Prevent line breaks in silly places: 
+   1) Links when we don't want them to
+   2) Bold "links" to the page itself
+   2) HTML formulae
+   3) Ref tags with group names <ref group="Note"> --> "[Note 1]"
+*/
+.nowraplinks a,
+.nowraplinks .selflink,
+span.texhtml,
+sup.reference a { 
+    white-space: nowrap;
+}
+
+/* For template documentation */
+.template-documentation {
+    clear: both;
+    margin: 1px 0 0 0;
+    border: 1px solid #aaa; 
+    background-color: #ecfcf4; 
+    padding: 1em;
+}
+
+/* Inline divs in ImageMaps (code borrowed from de.wiki) */
+.imagemap-inline div {
+    display: inline;
+}
+
+
+/* Reduce line-height for <sup> and <sub> */
+sup, sub {
+    line-height: 1em;
+}
+
+
+/* Put a chequered background behind images, only visible if they have transparency */
+.gallerybox .thumb img,
+#file img {
+    background: white url("http://upload.wikimedia.org/wikipedia/commons/5/5d/Checker-16x16.png") repeat;
+max-width: 95%;
+}
+/* But not on articles, user pages, portals or with opt-out. */
+.ns-0 .gallerybox .thumb img,
+.ns-2 .gallerybox .thumb img,
+.ns-100 .gallerybox .thumb img, 
+.nochecker .gallerybox .thumb img {
+    background: white;
+max-width: 95%;
+}
+
+/* Prevent floating boxes from overlapping any category listings,
+   file histories, edit previews, and edit [Show changes] views */
+#mw-subcategories, #mw-pages, #mw-category-media, 
+#filehistory, #wikiPreview, #wikiDiff {
+    clear: both;
+}
+
+/* Selectively hide headers in WikiProject banners */
+.wpb .wpb-header             { display: none; }
+.wpbs-inner .wpb .wpb-header { display: block; }     /* for IE */
+.wpbs-inner .wpb .wpb-header { display: table-row; } /* for real browsers */
+.wpbs-inner .wpb-outside     { display: none; }      /* hide things that should only display outside shells */
+
+/* Styling for Abuse Filter tags */
+.mw-tag-markers {
+ font-family:sans-serif;
+ font-style:italic;
+ font-size:90%;
+}
+
+/* Fix so <tt>, <code> and <pre> tags get normal text size also in 
+   some versions of Firefox, Safari, Konqueror, Chrome etc. */
+tt, code, pre {
+    font-family: monospace, sans-serif;
+}
+
+.image img {
+	width: auto;
+	height: auto;
+	max-width: 80%;
+}
+
+/* </source> */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/wrt_preview_frame.html	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,218 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+	<title>Nokia WRT Preview</title>
+	<!-- jQuery-ui Begins -->
+		<link type="text/css" rel="stylesheet"  href="preview/script/jquery-ui/css/ui-darkness/ui.all.css"/>	
+		<script type="text/javascript" src="preview/script/jquery-ui/js/jquery-1.2.6.min.js"></script>
+		<script type="text/javascript" src="preview/script/jquery-ui/js/jquery-ui-1.6.custom.min.js"></script>
+	<!-- jQuery-ui Ends -->	
+	<script type="text/javascript" language="JavaScript" src="preview/script/xml2json.js"></script>
+	<script type="text/javascript" language="JavaScript" src="preview/script/nokia.js"></script>
+	<script type="text/javascript" language="JavaScript" src="preview/script/resolution.js"></script>
+	<link type="text/css" rel="stylesheet"  href="preview/css/style.css"/>
+</head>
+<body>
+	<div id="preview-ui-top">
+		<div id="DeviceDisplayLayout" class="hide">
+			<div id="DisplaySFKWrapper">
+				<div id="DisplayArea">
+					<div id="IconArea"></div>
+					<div id="WidgetArea">
+						<div id="iframeMask" class="hide"></div>
+						<iframe src=""></iframe>
+					</div>
+					<div id="MenuItemsArea" class="scroll-pane">
+						<ul>
+							<li><a href="javascript:void(0);">Exit</a></li>
+						</ul>
+					</div>
+					<div id="SoftKeysArea">
+						<ul>
+							<li id="LskLabel"><a href="javascript:void(0);">Options</a></li>
+							<li id="RskLabel"><a href="javascript:void(0);">Exit</a></li>
+						</ul>
+					</div>
+				</div>
+				<div id="SoftKeys">
+					<a href="javascript:void(0);"><img src="preview/images/TransperantImage.png" name="LskArea" border="0" id="LskArea"/></a><a href="javascript:void(0);"><img src="preview/images/TransperantImage.png" name="RskArea" border="0" id="RskArea"/></a> </div>
+				</div>
+			</div>
+		<div id="Dialog" title="Notification window"></div>
+<div id="PreferencesTab" class="hide">
+	<div id="tabs">
+		<ul>
+			<li><a href="#tabs-1">Preferences</a></li>
+			<li><a href="#tabs-2">Event Triggers</a></li>
+		</ul>
+		<div id="tabs-1">
+			<div id="settings-view">
+		<table width="100%" cellpadding="0" cellspacing="0">
+			<tr>
+				<th>
+					Resolution
+				</th>
+				<td>
+					<select id="resOptions">
+						<option selected="true" value="http://www.forum.nokia.com/devices/matrix_240x320_1.html">240x320</option>
+						<option value="http://www.forum.nokia.com/devices/matrix_320x240_1.html">320x240</option>
+						<option value="http://www.forum.nokia.com/devices/matrix_360x640_1.html">360x640</option>
+						<option value="http://www.forum.nokia.com/devices/E90_Communicator">800x352</option>
+					</select>&nbsp; 
+					<a class="link" target="_blank" href="http://www.forum.nokia.com/devices/matrix_240x320_1.html" id="resSupportLink">Device matrix featuring this resolution</a>
+					<span id="dwDeviceHelp" class="hide" >See WRT Help for device specifications</span>
+				</td>
+			</tr>
+			<tr>
+				<th>
+					Orientation					
+				</th>
+				<td>
+					<div id="Orientation_Controls" class="hide">
+						<label><input type="radio" name="input_orientation" id="input_portrait" value="portrait"/> Portrait</label>	
+						<label><input type="radio" name="input_orientation" id="input_landscape" value="landscape"/> Landscape</label>	
+					</div>
+					<div id="Orientation_Info" class="hide">
+					</div>
+				</td>
+			</tr>
+			<tr>
+				<th>
+					WRT Version
+				</th>
+				<td>
+					<label><input type="radio" name="wrt_version" id="wrt_version_1_0" value="WRT 1.0"/> WRT 1.0</label>	
+					<label><input type="radio" name="wrt_version" id="wrt_version_1_1" value="WRT 1.1"/> WRT 1.1</label>	
+				</td>
+			</tr>
+			<tr>
+				<th>
+					Home Screen view
+				</th>
+				<td>
+					<div id="HS_Control_Info">
+						Hello
+					</div>
+				</td>
+			</tr>
+		</table>
+		</div>
+		
+			<div id="mini-view-info" class="hide">
+				<div class="ui-panel">
+					<a class="ui-button" id="mini-view-back">Back</a>
+				</div>
+				<table cellpadding='0' cellspacing='0' width="100%">
+					<tr>
+						<th>To enable Mini view support for HomeScreen widget </th>
+					</tr>
+					<tr>
+						<td>
+							Add this line in Info.plist file
+							<code>&lt;key&gt;MiniViewEnabled&lt;/key&gt;<br/>&lt;true/&gt;</code>
+							and optionally add the following to the MainHTML file
+							<code>&lt;div id="miniView"&gt; &lt;--  Define your Home Screen view here  --&gt; &lt;/div&gt;</code><br/>
+							See Web Developer's Library for <a class="link" href="http://library.forum.nokia.com/index.jsp?topic=/Web_Developers_Library/GUID-63F4E17E-8895-4054-82AD-762B90610B30.html" target="_blank">more details</a>
+						</td>
+					</tr>
+				</table>
+			</div>
+		
+		
+		</div>
+		<div id="tabs-2">
+			
+			<div id="event-icons">
+				<div id="event-battery"></div>
+				<div id="event-messaging"></div>
+				<div id="event-memory"></div>
+			</div>
+
+			<div id="event-battery-info" class="hide">
+				<div class="ui-panel">
+					<a class="ui-button" id="event-battery-back">Back</a>
+				</div>
+				<table cellpadding='0' cellspacing='0' width="100%">
+					<tr>
+						<th colspan="2">Battery Triggers</th>
+					</tr>
+					<tr>
+						<td>Charging status</td>
+						<td>
+							<a class="ui-button-fixed" id="connect-charger">Connect charger</a>
+							<a class="ui-button-fixed" id="disconnect-charger">Disconnect charger</a>
+						</td>
+					</tr>
+					<tr>
+						<td>Battery Strength</td>
+						<td>
+							<div id="slider"></div>
+							<div id="slider-value-panel"><span>0</span></div>
+							<div><a class="ui-button-fixed" id="update-batter-strength">Update</a></div>
+						</td>
+					</tr>
+				</table>
+			</div>
+
+			<div id="event-messaging-info" class="hide">
+				<div class="ui-panel">
+					<a class="ui-button" id="event-messaging-back">Back</a>
+				</div>
+				<table cellpadding='0' cellspacing='0' width="100%">
+					<tr>
+						<th colspan="2">Message Triggers</th>
+					</tr>
+					<tr>
+						<td>New message</td>
+						<td>
+							<a class="ui-button-fixed" id="send-sms">Trigger new SMS</a>
+							<a class="ui-button-fixed" id="send-mms">Trigger new MMS</a>
+						</td>
+					</tr>
+				</table>
+			</div>
+
+			<div id="event-memory-info" class="hide">
+				<div class="ui-panel">
+					<a class="ui-button" id="event-memory-back">Back</a>
+				</div>
+				<table cellpadding='0' cellspacing='0' width="100%">
+					<tr>
+						<th colspan="2">Memory Triggers</th>
+					</tr>
+					<tr>
+						<td>Memory Card</td>
+						<td>
+							<a class="ui-button-fixed" id="connect-memory-card">Connect</a>
+							<a class="ui-button-fixed" id="disconnect-memory-card">Disconnect</a>
+						</td>
+					</tr>
+				</table>
+			</div>
+			
+		</div>
+	</div>
+</div>
+	</div>
+	<div id="preview-ui-bottom">
+		<div id="preview-ui-bottom-header">
+			<div>Console window</div>
+			<span class="open" id="Console-Toggle-Button"></span>
+			<span id="Console-Clear-Button"></span>
+		</div>
+		<div style="clear:left;"></div>
+		<div id="preview-ui-bottom-body">
+		</div>
+	</div>
+	<div id="PreferencesBtn" class="hide"></div>
+	<div id="orientationIcon"></div>
+	<div id="loaderDiv"></div>
+	<div id="NotificationDiv" class="hide">
+		<p>NOKIA WRT Simulation may not work properly on this browser, <br/>Firefox is recommended for widget preview and debugging.  <br/><br/><strong>Continue?</strong></p>
+	</div>
+	<div id="BrowserNotificationBar" class="hide">
+		<p><a></a>NOKIA WRT Simulation may not work properly on this browser, Firefox is recommended for widget preview and debugging</p>
+	</div>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Wikipedia/wrt_preview_main.html	Tue Mar 09 10:34:58 2010 +0000
@@ -0,0 +1,31 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"  lang="mul" dir="ltr">
+    <head>
+	<script language="JavaScript" type="text/javascript" src="preview/script/lib/loader.js"></script>
+
+        <title></title>
+		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />		
+        <script type="text/javascript" src="WRTKit/WRTKit.js"></script>
+        <script type="text/javascript" src="utils.js"></script>
+        <script type="text/javascript" src="RssReader.js"></script>
+        <script type="text/javascript" src="FeedUpdateBroker.js"></script>
+        <script type="text/javascript" src="FeedPresentation.js"></script>
+        <script type="text/javascript" src="Wiki.js"></script>
+        <script type="text/javascript" src="History.js"></script>
+        <script type="text/javascript" src="Bookmarks.js"></script>
+        <script type="text/javascript" src="main.js"></script>
+        <link rel="stylesheet" href="style.css" type="text/css">
+        <link rel="stylesheet" href="wiki.css" type="text/css">
+		<link rel="stylesheet" href="WRTKit/Resources/UI.css" id="stylesheet">
+		<meta name="language" content="Many" />
+        <META NAME="Generator" CONTENT="Nokia WRT plug-in for Aptana Studio 2.2.0" />
+    </head>
+    <body onload="init();"  
+			onShow="javascript:setViewMode();" 
+			onResize="javascript:setViewMode();">
+    	<div id="uimandiv" style="display: none;"></div>
+    	<div id="minidiv" style="display: none;"><img src="miniview.png" style="margin:0px 0px; padding: 0px 0px;"></div>
+    	<div id="debugdiv" style="display: none;"></div>
+    </body>
+</html>