//----------------------------------------------------------------------------------------------------------------
/**
* Formater is an abstract base class.
* The class implements all kinds of messageboxes. 
* @version 1.1
* @author Lasse Storgaard Jacobsen
* @constructor
*/
function Messageboxes(){
}//Messageboxes end


//Adds the functions to the class
Messageboxes.prototype.myconfirm = myconfirm;
Messageboxes.prototype.popup = popup;
Messageboxes.prototype.myprompt = myprompt;

function myprompt(message,def)
{
	return prompt (message,def)		
}



//----------------------------------------------------------------------------------------------------------------
/**
* This function shows a messagebox to confirm an action and returns the result.
* The return datatype is a boolean and have allways the format: [true/false]
* @param {Stirng} message The message to display in the messagebox.
* @returns {boolean} The response from the user.
*/
function myconfirm(message) 
{
  if (confirm(message)) 
  {
    return true;
  }
  else
  {
  	return false;
  }//end if
}//end confirm




//*********************************************************************************
//*********************************************************************************
//This script is used for popup windows *******************************************
//*********************************************************************************
//*********************************************************************************



//----------------------------------------------------------------------------------------------------------------
/**
* This function makes a popup window.
* There is no return value
* @param {Stirng} url The link to the page to display in the popup.
* @param {Stirng} name The name of the window - will be displayes at the top of the popup.
* @param {int} win_height The height of the popup window (px).
* @param {int} win_width The width of the popup window (px).
*/
function popup(url,name,win_height,win_width) 
{
	
	pos_horizon = ((screen.width/2)-(win_width/2));
	pos_vertical = ((screen.height/2)-(win_height/2));
	window.open(url,name,'width='+win_width+',height='+win_height+',top='+pos_vertical+',left='+pos_horizon + ',scrollbars=No');
}//end popup
