/*
	Copyright (c) 2004-2005, The Dojo Foundation
	All Rights Reserved.

	Licenced under the Academic Free Licence version 2.1 or above OR the
	modified BSD licence. For more information on Dojo licensing, see:

		http://dojotoolkit.org/community/licensing.shtml
*/

dojo.require("dojo.event.*");
dojo.require("dojo.storage.*");

var libraryStorage = {
	currentProvider: "default",
	
	initialize: function(){
		
		// print out metadata
		collection.store.initialize();
	},
	_save: function(key, value){
		var self = this;
		var saveHandler = function(status, keyName){
			if(status == dojo.storage.FAILED){
				alert("You do not have permission to store data for this web site. "
			        + "Press the Configure button to grant permission.");
			}
		};
		try{
			dojo.storage.put(key, value, saveHandler);
		}catch(exp){
			alert("libraryStorage put error - " + exp);
		}
	}
};

var rpStorage = {
	currentProvider: "default",
	
	initialize: function(){
		
		// print out metadata
		rp.store.initialize();
	},
	_save: function(key, value){
		var self = this;
		var saveHandler = function(status, keyName){
			if(status == dojo.storage.FAILED){
				alert("You do not have permission to store data for this web site. "
			        + "Press the Configure button to grant permission.");
			}
		};
		try{
			dojo.storage.put(key, value, saveHandler);
		}catch(exp){
			alert("recently played error - " + exp);
		}
	}
};

var rpLib = {
	currentProvider: "default",
	initialize: function(){
	// alert('in here');	
		
		// print out metadata
		rp.get.initialize();
	},
	_save: function(key, value){
		var self = this;
		var saveHandler = function(status, keyName){
			if(status == dojo.storage.FAILED){
				alert("You do not have permission to store data for this web site. "
			        + "Press the Configure button to grant permission.");
			}
		};
		try{
			dojo.storage.put(key, value, saveHandler);
		}catch(exp){
			alert("rp error - " + exp);
		}
	}
};

