
/*
	"Hemi" JavaScript Framework
	Engine for Web Applications 3.1
	Composite file "hemi.comp.js" release: 3.1.1
	Copyright 2002 - 2010. All Rights Reserved.
	Author: Stephen W. Cote
	Email: sw.cote@gmail.com
	Project: http://www.whitefrost.com/Hemi/
	BSD License: http://www.whitefrost.com/Hemi.license.txt
*/
(function(){if(typeof Storage=="undefined")return;H.namespace("storage.dom",H,{st:"DOMStorage",ss:0,ls:(window.localStorage?window.localStorage:0),gs:(window.globalStorage?window.globalStorage:0),ps:0,cs:0,getPreferredStorage:
function(){var s=H.storage.dom;if(!s.cs)s.init();return s.ps;},init:
function(){var s=H.storage.dom;try{s.ss=(window.sessionStorage?window.sessionStorage:0);}catch(e){}if(s.ls)s.ps=s.ls;else if(s.gs)s.ps=s.gs;else if(s.ss)s.ps=s.ss;s.cs=1;},getLength:
function(){var o,s=H.storage.dom;o=s.getPreferredStorage();if(!o)return 0;if(o instanceof Storage)return o.length;return o[document.domain].length;},getItem:
function(n){var o,s=H.storage.dom;o=s.getPreferredStorage();if(!o)return 0;if(o instanceof Storage)return o.getItem(n);return o[document.domain].getItem(n);},setItem:
function(n,v){var o,s=H.storage.dom;o=s.getPreferredStorage();if(!o)return 0;if(o instanceof Storage)return o.setItem(n,v);return o[document.domain].setItem(n,v);},removeItem:
function(n){var o,s=H.storage.dom;o=s.getPreferredStorage();if(!o)return 0;if(o instanceof Storage)return o.removeItem(n);return o[document.domain].removeItem(n);},key:
function(i){var o,s=H.storage.dom;o=s.getPreferredStorage();if(!o)return 0;if(o instanceof Storage)return o.key(i);return o[document.domain].key(i);},clear:
function(i){var o,s=H.storage.dom;o=s.getPreferredStorage();if(!o)return 0;var i,l=s.getLength();for(i=l-1;i>=0;i--){s.removeItem(s.key(i));}}});}());
/* End Hemi Framework 3.1 */
