//############################  SHARE PRICE ##########################


var code = null;
/* ------------------------------------------------------
function loadVariables
	simple function which stores variables
------------------------------------------------------ */
function loadVariables(fSec,fMin,fHour,fDay,fMonth,fYear,fPrice,fChange,fPercent) {
	//Load the time and date into an array for easy sorting to allow for different date formats
	this.timeArray = new Array(fSec,fMin,fHour,fDay,fMonth,fYear);
	//Retrieve the date
	this.getDate = retrieveDate;
	this.price = fPrice;
	this.getPrice = retrievePrice;
	this.change = fChange;
	this.perc = fPercent;
	this.getChange = retrieveChange;
	}
function retrievePrice() {
	return this.price;
	}
function retrieveChange() {
	
	var val = this.change;
	if (val>0) return "<img class='nobreak' src='http://www.bankofireland.ie/html/gws/includes/investor/graphics/general/arrow_up.gif' width='9' height='9'>+" + val;
	else if (val<0) return "<img class='nobreak' src='http://www.bankofireland.ie/html/gws/includes/investor/graphics/general/arrow_down.gif' width='9' height='9'>" + val;
	return "<img class='nobreak' src='http://www.bankofireland.ie/html/gws/includes/investor/graphics/general/sp.gif' width='9' height='9'>" + val;
	}
/* ------------------------------------------------------
function retrieveDate
	parent: loadVariables
	returns the date in a variety of formats depending on the arguments passed
------------------------------------------------------ */
function retrieveDate() {
	var returnStr="";
	//Loop through each argument passed to this function
	for(var i=0; i<retrieveDate.arguments.length; i++) {
		//Check to see if the argument is not a string
		if (retrieveDate.arguments[i].constructor.toString().indexOf("String")==-1) {
			//Check to see if timeArray[argument value] exists
			if (this.timeArray[retrieveDate.arguments[i]]) {
				//Append the timeArray[argument value] to the returnString
				returnStr+=this.timeArray[retrieveDate.arguments[i]].toString();
				}
			}
		//If the argument is a String then append the value to the returnString
		else  {
			returnStr+=retrieveDate.arguments[i].toString();
			}
		}
	return returnStr;
	}






//##################################           CLOSE WINDOW           ###############################

function closeWindow()
{
window.close();
}


//##################################           Break out of FRAMES           ###############################
function breakOut(url)
{
parent.location=url;
}


//##################################     CLOSE WINDOW AND REDIRECT     ##############################

function closeAndRedirect(where)
{
if (!(window.opener))
{
window.location = where;
}
else
{
window.close();
window.opener.location = where;
}
}

function popprod(wname) {
	prodwin=window.open(wname,"Item","Toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=0,width=550,height=550")
popprod = popprod + "";
	setTimeout('prodwin.focus()',500);
}

//##################################     POPUP WINDOW                 ################################

//var newwin;
function launchwin(winurl,winname,winfeatures)
{
newwin = window.open(winurl,winname,winfeatures);

}


//##################################           INVESTOR STOCK ISSUE RHN           ###############################

function stockIssue()
{
document.write('1,188,611,367'); 
}

















