//----------------------------------------------------------------------------------------------------------------
/**
* Common is an abstract base class.
* The class implements all kinds of common tools. 
* @class
* @version 1.1
* @author Lasse Storgaard Jacobsen
* @constructor
*/
function Common(){
}//Common end

//Adds the functions to the class
Common.prototype.printpage = printpage;
Common.prototype.bookmarksite = bookmarksite;



//----------------------------------------------------------------------------------------------------------------
/**
* This function simply prints the current page, based on the default printsettings for the users computer. 
* There is no return datatype. Just call the method.
*/
function printpage(){
  window.print();
}//printpage end



//----------------------------------------------------------------------------------------------------------------
/**
* This function bookmarks the current page on the users computer
* There is no return datatype. Just call the method.
* @param {title} The title of the bookmark
* @param {url} The url on the bookmark 
* Modified to support Opera 
*/
function bookmarksite(title,url){
	if (window.sidebar){ // firefox
		window.sidebar.addPanel(title, url, "");
	}else if(window.opera && window.print){ // opera
		var elem = document.createElement('a');
		elem.setAttribute('href',url);
		elem.setAttribute('title',title);
		elem.setAttribute('rel','sidebar');
		elem.click();
	} else if(document.all){// ie
		window.external.AddFavorite(url, title);
	}
}//bookmarksite end
