function CSearchAssoc(text, link)
{
	this.text = text;
	this.link = link;
}


function ShowConfirmationMessage(textToShow, height, showOrNot)
{
	//alert("chris");
	//if ( showOrNot == "true" )
		//confirmationWindow = dhtmlmodal.open('ConfirmationWindow', 'iframe', '/ajax/confirmationMessage.aspx?textToShow=' + textToShow, '', 'width=705px,height=' + height + 'px,center=1,resize=0,scrolling=1')
}


function GotoLink(where)
{
	window.location.href = where;
}


function OpenLogin(windowTitle, qsValue)
{
	loginLayer = dhtmlmodal.open('LoginLayer', 'iframe', '/login/loginLayer.aspx?qsValue=' + qsValue, windowTitle, 'width=387px,height=155px,center=1,resize=0,scrolling=0')
}


function OpenForgotPassword(windowTitle)
{
	forgotPasswordLayer = dhtmlmodal.open('ForgotPasswordLayer', 'iframe', '/login/forgotPasswordLayer.aspx', windowTitle, 'width=486px,height=123px,center=1,resize=0,scrolling=0')
}


//-- This one is used by a) Malta and b) Greece in moduleSearchMkt1980elGR.ascx
function ValidateSearch(searchTextBoxID, cmbWhereID)
{

	searchAssocLink = "";
	itIsASearchAssoc = false;
	textToSearch = document.getElementById(searchTextBoxID).value;
	collectionID = document.getElementById(cmbWhereID).value;
		
	for ( i = 0; i < searchArray.length; i++)
	{

		assoc = searchArray[i];
		
		if ( assoc.text == textToSearch )
		{
			itIsASearchAssoc = true;
			searchAssocLink = assoc.link;
			break;
		}
		
	}
		
	if ( textToSearch.length < 3 )
	{
	}
	else if ( itIsASearchAssoc )
		window.location = searchAssocLink;
	else if ( (collectionID == 0) && (textToSearch.length >= 3) )
		window.location = "/search/results.aspx?query=" + textToSearch;
	else if ( (collectionID != 0) && (textToSearch.length >= 3) )
		window.location = "/search/results.aspx?query=" + textToSearch + "&collectionFilter=" + collectionID;
		
}


//-- This one is used by Greece in moduleHeaderNew1980.ascx
function ValidateSearchNew(searchTextBoxID, hidSearchWhere)
{

	searchAssocLink = "";
	itIsASearchAssoc = false;
	textToSearch = document.getElementById(searchTextBoxID).value;
	collectionID = $("#" + hidSearchWhere).val();

	for ( i = 0; i < searchArray.length; i++)
	{

		assoc = searchArray[i];
		
		if ( assoc.text == textToSearch )
		{
			itIsASearchAssoc = true;
			searchAssocLink = assoc.link;
			break;
		}
		
	}
	
	if ( textToSearch.length < 3 )
		window.location = "/search/advancedSearch.aspx?query=none";
	else if ( itIsASearchAssoc )
		window.location = searchAssocLink;
	else if ( (collectionID == 0) && (textToSearch.length >= 3) )
		window.location = "/search/results.aspx?query=" + textToSearch;
	else if ( (collectionID != 0) && (textToSearch.length >= 3) )
		window.location = "/search/results.aspx?query=" + textToSearch + "&collectionFilter=" + collectionID;
		
}


//-- This one is used by a) Russia in moduleSearchMkt1980ruRU.ascx and also in new header moduleHeaderNew1980ruRU.ascx
function ValidateSearchWithMessage(searchTextBoxID, cmbWhereID, noCharactersText)
{

	searchAssocLink = "";
	itIsASearchAssoc = false;

	textToSearch = document.getElementById(searchTextBoxID).value;
	collectionID = document.getElementById(cmbWhereID).value;
	
	for ( i = 0; i < searchArray.length; i++)
	{

		assoc = searchArray[i];
		
		if ( assoc.text == textToSearch )
		{
			itIsASearchAssoc = true;
			searchAssocLink = assoc.link;
			break;
		}
		
	}
		
	if ( textToSearch.length < 3 )
		document.getElementById(searchTextBoxID).value = noCharactersText;
	else if ( itIsASearchAssoc )
		window.location = searchAssocLink;
	else if ( textToSearch == noCharactersText )
		document.getElementById(searchTextBoxID).value = noCharactersText;
	else if ( (collectionID == 0) && (textToSearch.length >= 3) )
		window.location = "/search/results.aspx?query=" + textToSearch;
	else if ( (collectionID != 0) && (textToSearch.length >= 3) )
		window.location = "/search/results.aspx?query=" + textToSearch + "&collectionFilter=" + collectionID;
		
}


function ValidateAdvancedSearch()
{
	

	textToSearch = document.forms[0].ctl00$cphMain$ctl00$txtQuery.value;
	textToSearch = textToSearch == "" ? " " : textToSearch;
	colourToSearch = document.forms[0].ctl00$cphMain$ctl00$txtColour.value;
	sizeToSearch = document.forms[0].ctl00$cphMain$ctl00$txtSize.value;
	brandToSearch = document.forms[0].ctl00$cphMain$ctl00$txtBrand.value;
	minPrice = document.forms[0].ctl00$cphMain$ctl00$txtPriceFrom.value;
	minPrice = minPrice == "" ? "0" : minPrice;
	maxPrice = document.forms[0].ctl00$cphMain$ctl00$txtPriceTo.value;	
	maxPrice = maxPrice == "" ? "50000" : maxPrice;

	level1 = document.forms[0].ctl00$cphMain$ctl00$cmbBoutique.value;
	level2 = "0";
	
	if ( document.forms[0].ctl00$cphMain$ctl00$rblCategories != null )
	{

		for (i = 0; i < document.forms[0].ctl00$cphMain$ctl00$rblCategories.length; i++)
		{
			if (document.forms[0].ctl00$cphMain$ctl00$rblCategories[i].checked == true)
				level2 = document.forms[0].ctl00$cphMain$ctl00$rblCategories[i].value;
		}
	
	}
	
	if ( (textToSearch != " ") || (colourToSearch != "") || (sizeToSearch != "") || (brandToSearch != "") || (minPrice != "0") || (maxPrice != "1000") )
		window.location = "/search/results.aspx?query=" + textToSearch + "&collectionFilter=" + level1 + "&collectionFilterL2=" + level2 + "&colour=" + colourToSearch + "&brand=" + brandToSearch + "&size=" + sizeToSearch + "&minPrice=" + minPrice + "&maxPrice=" + maxPrice;
	else
		window.location = "/search/advancedSearch.aspx?query=emptyform";

}


function ShowForgotPassword()
{

	forgotPassword = document.getElementById("login-divForgotPassword");

	if ( forgotPassword.style.display != "none" )
		forgotPassword.style.display = "none";
	else
		forgotPassword.style.display = "block";

}


function ShowCreatePassword()
{

	createPassword = document.getElementById("login-divCreatePassword");

	if ( createPassword.style.display != "none" )
		createPassword.style.display = "none";
	else
		createPassword.style.display = "block";

}


function openPopUp(url, name, w, h)
{

	w += 32;
	h += 96;
	wleft = (screen.width - w) / 2;
	wtop = (screen.height - h) / 2;

	if (wleft < 0)
	{
		w = screen.width;
		wleft = 0;
	}

	if (wtop < 0)
	{
		h = screen.height;
		wtop = 0;
	}

	var win = window.open(url, name, 'width=' + w + ', height=' + h + ', ' +
	'left=' + wleft + ', top=' + wtop + ', ' + 'location=no, menubar=no, ' +
	'status=no, toolbar=no, scrollbars=yes, resizable=no');

	win.resizeTo(w, h);
	win.moveTo(wleft, wtop);
	win.focus();

}


function openPopUpNoScrollBar(url, name, w, h)
{

	w += 32;
	h += 96;
	wleft = (screen.width - w) / 2;
	wtop = (screen.height - h) / 2;

	if (wleft < 0)
	{
		w = screen.width;
		wleft = 0;
	}

	if (wtop < 0)
	{
		h = screen.height;
		wtop = 0;
	}

	var win = window.open(url, name, 'width=' + w + ', height=' + h + ', ' +
	'left=' + wleft + ', top=' + wtop + ', ' + 'location=no, menubar=no, ' +
	'status=no, toolbar=no, scrollbars=no, resizable=no');
    
    //-- IE 6 problem: win is null --//
    if(win!=null)
    {
	    win.resizeTo(w, h);
	    win.moveTo(wleft, wtop);	
	    win.focus();
	}

}


function IncreaseFont()
{
	divTop = document.getElementById("divDescriptionTop");
	fontSize = divTop.style.fontSize != "" ? divTop.style.fontSize.substring(0, 2) : "11";
	divTop.style.fontSize = parseInt(fontSize)+1 + "px";

	divBottom = document.getElementById("divDescriptionBottom");
	divBottom.style.fontSize = parseInt(fontSize)+1 + "px";
}


function DecreaseFont()
{
	divTop = document.getElementById("divDescriptionTop");
	fontSize = divTop.style.fontSize != "" ? divTop.style.fontSize.substring(0, 2) : "11";
	divTop.style.fontSize = parseInt(fontSize)-1 + "px";

	divBottom = document.getElementById("divDescriptionBottom");
	divBottom.style.fontSize = parseInt(fontSize)-1 + "px";
}


function UpperText(textBoxToUpper)
{

	//
	// http://daniellarson.spaces.live.com/?_c11_BlogPart_BlogPart=blogview&_c=BlogPart&partqs=amonth%3D11%26ayear%3D2006
	// http://tlt.its.psu.edu/suggestions/international/bylanguage/greekchart.html
	//

	textBoxToUpper.value = textBoxToUpper.value.toUpperCase();

	for ( i = 0; i < textBoxToUpper.value.length; i++ )
	{
		textBoxToUpper.value = textBoxToUpper.value.replace(String.fromCharCode(902),String.fromCharCode(0x0391)); // ALPHA
		textBoxToUpper.value = textBoxToUpper.value.replace(String.fromCharCode(904),String.fromCharCode(0x0395)); // EPSILON
		textBoxToUpper.value = textBoxToUpper.value.replace(String.fromCharCode(905),String.fromCharCode(0x0397)); // ETA
		textBoxToUpper.value = textBoxToUpper.value.replace(String.fromCharCode(906),String.fromCharCode(0x0399)); // IOTA
		textBoxToUpper.value = textBoxToUpper.value.replace(String.fromCharCode(908),String.fromCharCode(0x039f)); // OMICRON
		textBoxToUpper.value = textBoxToUpper.value.replace(String.fromCharCode(910),String.fromCharCode(0x03a5)); // UPSILON
		textBoxToUpper.value = textBoxToUpper.value.replace(String.fromCharCode(911),String.fromCharCode(0x03a9)); // OMEGA
		textBoxToUpper.value = textBoxToUpper.value.replace(String.fromCharCode(962),String.fromCharCode(931));
	}

}


function ProperText(textBoxToUpper)
{
    textBoxToUpper.value = textBoxToUpper.value.toProperCase();
}


function CheckKeyCode(event)
{

	var Key = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;

	if ( (Key == 189 || Key == 109) ||
	     (Key >= 48 && Key <= 57) ||
	     (Key == 8) || (Key == 9) ||
	     (Key == 17) || (Key == 116) ||
	     (Key == 8) || (Key == 46) ||
	     (Key == 17) || (Key == 86) ||
	     (Key >= 37 && Key <= 40) ||
	     (Key >= 96 && Key <= 105) ||
	     (Key == 13) )
	{
		return true;
	}
	else
	{	
		return false;
	}
	
}


function CheckGreekCharacters(e)
{

	var key = window.event ? e.keyCode : e.which;
	var keychar = String.fromCharCode(key);
	reg = /\d/;
	return !reg.test(keychar);

}


function ExpandInformation(image, divNumber)
{

	currentStatus = document.getElementById("divInformation" + divNumber).style.display;

	if ( currentStatus == "none" )
	{
		document.getElementById("divInformation" + divNumber).style.display = "block";
		image.src = "/cms/images/faq-Collapse.gif";
		margin = document.getElementById("divFooterMargin").style.marginTop;

		if ( margin == "" )
			document.getElementById("divFooterMargin").style.marginTop = "50px";
		else
		{
			currentMargin = parseInt(margin.substring(0, margin.indexOf("px")));
			currentMargin += 1;
			document.getElementById("divFooterMargin").style.marginTop = currentMargin + "px";
		}									
	}
	else
	{
		document.getElementById("divInformation" + divNumber).style.display = "none";
		image.src = "/cms/images/faq-Expand.gif";
		margin = document.getElementById("divFooterMargin").style.marginTop;

		if ( margin != "" )
		{
			currentMargin = parseInt(margin.substring(0, margin.indexOf("px")));
			currentMargin -= 1;
			document.getElementById("divFooterMargin").style.marginTop = currentMargin + "px";
		}									
	}

}


function WishListSelectAll()
{
	
	var formElements = document.forms[0].elements;
	
	for(i = 0; i < formElements.length; i++)
	{
		if ( formElements[i].name.indexOf("chkDelete") != -1 )
		{
			if ( formElements[i].checked == true )
				formElements[i].checked = false;
			else
				formElements[i].checked = true;
		}
	}

}


function RedirectToSearch(collectionFilter)
{
	query = document.getElementById("ctl00_cphMain_ctl00_ctl15_txtQuickSearch").value;
	
	if ( query != "" )
		window.location = "/search/results.aspx?query=" + query + "&collectionFilter=" + collectionFilter;
}


function SHP_CheckForEnterKey(event, collectionFilter, buttonClick, sessionGUID, moduleName, moduleGuid, collectionID)
{
	if ( (buttonClick) || (event.keyCode == 13) )
	{
		LogModuleClick(sessionGUID, moduleName, moduleGuid, collectionID);
		RedirectToSearch(collectionFilter);
		return false;
	}
	else
		return true;
}


function SHP_CheckForEnterKeyNews(event, location, buttonClick, sessionGUID, moduleName, moduleGuid, collectionID)
{	

	if ( (buttonClick) || (event.keyCode == 13) )
	{
		LogModuleClick(sessionGUID, moduleName, moduleGuid, collectionID);
		window.location = location;
		return false;
	}
	else
		return true;
}


function URLEscape(url)
{    
    return url.replace(/\?/g, "$**$").replace(/&/g,"$*$");
}


function openTermsAndConditions(openOrNot)
{

	document.forms[0].hidShowTermsPopUp.value = "false";

	if ( openOrNot == "true" )
		termsWindow = dhtmlmodal.open('TermsWindow', 'iframe', '/webAccount/registerTerms.aspx', '', 'width=650px,height=565px,center=1,resize=0,scrolling=1');

}


function LogVisit(sessionGUID,sessionID,source,customerCode)
{

    /*
    var b_lang = navigator.userLanguage;
    var os = navigator.oscpu;
    var resolution = screen.width + " x " + screen.height;
    */
    
    var browser = navigator.userAgent;
    var refer = document.referrer;
    var currentURL = document.location.pathname+document.location.search; //page+query string
    currentURL=URLEscape(currentURL);
    refer=URLEscape(refer);
    port="";
    if (document.location.port)
    {
        port=":"+document.location.port;
    }

    var logURL= "http://"+document.domain+port+"/logging/VisitLog.aspx?ran="+Math.random();
    var qstring = "&uastring="+browser+"&referrer="+refer+"&currentPage="+currentURL+"&sessionid="+sessionID+"&visitorGuid="+sessionGUID+"&source="+source+"&customerCode="+customerCode;

    var img = new Image(0,0);
    img.src=logURL+qstring;
    
}


function getAjaxRequest()
{
    
    var r
    
    r=false;        
    
    if (window.XMLHttpRequest)
    {
        try 
        {
            r=new XMLHttpRequest();
        }
        catch (e)
        {
            r=false;
        }
    }
    
    if (window.ActiveXObject)
    {
        try
        {                
            r =  new ActiveXObject("Microsoft.XMLHTTP");
        }
        catch (e)
        {
            r=false;
        }
    }
    
    return r;
    
}


function LogModuleClick(sessionGUID,moduleName,moduleGuid,collectionID)
{
    var logURL= "http://"+document.domain+"/logging/moduleclicklog.aspx?ran="+Math.random();    
    var qstring = "&sessionid="+sessionGUID+"&module="+moduleName+"&moduleGuid="+moduleGuid+"&collectionID=" + collectionID+ "&actionid=1";    
    var req=getAjaxRequest();
    req.onreadystatechange=function(){};
    req.open("GET",logURL+qstring);
    req.send(null);
}


function LogModuleClickForRegistration(sessionGUID,moduleName,moduleGuid,collectionID)
{
    var logURL= "http://"+document.domain+"/logging/moduleclicklog.aspx?ran="+Math.random();    
    var qstring = "&sessionid="+sessionGUID+"&module="+moduleName+"&moduleGuid="+moduleGuid+"&collectionID=" + collectionID+ "&actionid=11";    
    var req=getAjaxRequest();
    req.onreadystatechange=function(){};
    req.open("GET",logURL+qstring);
    req.send(null);
}


function ChangeSizeCustomisation()
{

	radFemale = document.getElementById("ctl00_cphMain_ctl00_radFemale");
	radMale = document.getElementById("ctl00_cphMain_ctl00_radMale");
	
	if ( radFemale.checked )
	{
		document.getElementById("divFemale").style.display = "block";
		document.getElementById("divMale").style.display = "none";
	}
	else
	{
		document.getElementById("divFemale").style.display = "none";
		document.getElementById("divMale").style.display = "block";
	}

}


String.prototype.toProperCase = function()
{
 	return this.toLowerCase().replace(/^(.)|\s(.)/g, 
		function($1) { return $1.toUpperCase(); });
}


function ProperText(fld)
{
    fld.value = fld.value.toProperCase();
}


function getAjaxRequest()
{

    var r
    r=false;        
    
    if (window.XMLHttpRequest)
    {
        
        try 
        {
            r=new XMLHttpRequest();
        }
        catch (e)
        {
            r=false;
        }
        
    }
    
    if (window.ActiveXObject)
    {
        
        try
        {                
            r =  new ActiveXObject("Microsoft.XMLHTTP");
        }
        
        catch (e)
        {
            r=false;
        } 
        
    
    }
    return r;

}


function ExitPopup()
{	
	window.open("/popups/exitpopup.aspx",'','toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0,width=100,height=100').blur();
}


function OpenAddToCartPopUp(refCode)
{
	addToCartWindow = dhtmlmodal.open("AvailGrid", "iframe", "/popups/addToCart.aspx?refCode=" + refCode, "", "width=950px,height=190px,center=1,resize=0,scrolling=1");
}


//Used to set the hiddenfield 'hidCurrentFlyOutId' value to current menu item collectionID.
function MenuItemsMouseOver(id) 
{
    document.getElementById(hidCurrentFlyOutId).value = id;
}


function OpenVideo1466One(windowTitle)
{
	videoLayer = dhtmlmodal.open('VideoLayer', 'iframe', '/repository/14661467/bed.swf', windowTitle, 'width=364px,height=220px,center=1,resize=0,scrolling=0')
}


function OpenVideo1466Two(windowTitle)
{
	videoLayer = dhtmlmodal.open('VideoLayer', 'iframe', '/repository/14661467/Comp_1_15.swf', windowTitle, 'width=364px,height=220px,center=1,resize=0,scrolling=0')
}


function OpenQuickCartPopup(windowTitle)
{
	popupQuickCart = dhtmlmodal.open("QuickCartPopup", "iframe", "/productDetails/quickCartPopup.aspx", windowTitle, "width=500px,height=185px,center=1,resize=0,scrolling=1");
}


//http://www.featureblend.com/license.txt
var FlashDetect=new function(){var self=this;self.installed=false;self.raw="";self.major=-1;self.minor=-1;self.revision=-1;self.revisionStr="";var activeXDetectRules=[{"name":"ShockwaveFlash.ShockwaveFlash.7","version":function(obj){return getActiveXVersion(obj);}},{"name":"ShockwaveFlash.ShockwaveFlash.6","version":function(obj){var version="6,0,21";try{obj.AllowScriptAccess="always";version=getActiveXVersion(obj);}catch(err){}
return version;}},{"name":"ShockwaveFlash.ShockwaveFlash","version":function(obj){return getActiveXVersion(obj);}}];var getActiveXVersion=function(activeXObj){var version=-1;try{version=activeXObj.GetVariable("$version");}catch(err){}
return version;};var getActiveXObject=function(name){var obj=-1;try{obj=new ActiveXObject(name);}catch(err){obj={activeXError:true};}
return obj;};var parseActiveXVersion=function(str){var versionArray=str.split(",");return{"raw":str,"major":parseInt(versionArray[0].split(" ")[1],10),"minor":parseInt(versionArray[1],10),"revision":parseInt(versionArray[2],10),"revisionStr":versionArray[2]};};var parseStandardVersion=function(str){var descParts=str.split(/ +/);var majorMinor=descParts[2].split(/\./);var revisionStr=descParts[3];return{"raw":str,"major":parseInt(majorMinor[0],10),"minor":parseInt(majorMinor[1],10),"revisionStr":revisionStr,"revision":parseRevisionStrToInt(revisionStr)};};var parseRevisionStrToInt=function(str){return parseInt(str.replace(/[a-zA-Z]/g,""),10)||self.revision;};self.majorAtLeast=function(version){return self.major>=version;};self.minorAtLeast=function(version){return self.minor>=version;};self.revisionAtLeast=function(version){return self.revision>=version;};self.versionAtLeast=function(major){var properties=[self.major,self.minor,self.revision];var len=Math.min(properties.length,arguments.length);for(i=0;i<len;i++){if(properties[i]>=arguments[i]){if(i+1<len&&properties[i]==arguments[i]){continue;}else{return true;}}else{return false;}}};self.FlashDetect=function(){if(navigator.plugins&&navigator.plugins.length>0){var type='application/x-shockwave-flash';var mimeTypes=navigator.mimeTypes;if(mimeTypes&&mimeTypes[type]&&mimeTypes[type].enabledPlugin&&mimeTypes[type].enabledPlugin.description){var version=mimeTypes[type].enabledPlugin.description;var versionObj=parseStandardVersion(version);self.raw=versionObj.raw;self.major=versionObj.major;self.minor=versionObj.minor;self.revisionStr=versionObj.revisionStr;self.revision=versionObj.revision;self.installed=true;}}else if(navigator.appVersion.indexOf("Mac")==-1&&window.execScript){var version=-1;for(var i=0;i<activeXDetectRules.length&&version==-1;i++){var obj=getActiveXObject(activeXDetectRules[i].name);if(!obj.activeXError){self.installed=true;version=activeXDetectRules[i].version(obj);if(version!=-1){var versionObj=parseActiveXVersion(version);self.raw=versionObj.raw;self.major=versionObj.major;self.minor=versionObj.minor;self.revision=versionObj.revision;self.revisionStr=versionObj.revisionStr;}}}}}();};FlashDetect.JS_RELEASE="1.0.4";


/**
 * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;


var conciergerie = {
	
	_base16: "0A12B34C56D78E9F",
	_baseClassName:"concierge",

	encode: function (str)
	{
		var retour="";
		for(var i=0;i<str.length;i++)
		{
			var cc=str.charCodeAt(i);
			var ch=cc>>4;
			var cl=cc-(ch*16);
			retour+=this._base16[ch]+this._base16[cl];
		}
		return this._baseClassName+retour;
	},

	decode: function (str)
	{
		var retour="";
		for(var i=0;i<str.length;i+=2)
		{
			var ch=this._base16.indexOf(str.charAt(i));
			var cl=this._base16.indexOf(str.charAt(i+1));
			retour+=String.fromCharCode((ch*16)+cl);
		}
		return retour;
	},
	
	init: function ()
	{
		var tagsA=document.getElementsByTagName("span");
		for(var i=0;i<tagsA.length;i++)
		{
			if (tagsA[i].className.substring(0,this._baseClassName.length)==this._baseClassName)
			{
				var url=this.decode(tagsA[i].className.substring(9));
				//-- If the "concierge" span does not have "invalid" html e.g. a <br/> or <strong> within, create a normal anchor tag --//
				if (tagsA[i].innerHTML.indexOf("<")<=0)
				{
				    var nlink=document.createElement("a");
				    nlink.href=url;	
				    for(var j=0;j<tagsA[i].childNodes.length;j++)
				    {
					    nlink.appendChild(tagsA[i].childNodes[j]);					    
				    }    				
				    tagsA[i].appendChild(nlink);
				}
				else //-- otherwise, create a new div and make it a "link" by setting its "onclick" attribute --//
				{
				    var ndiv=document.createElement("div");
				    // ndiv.setAttribute("onclick","window.location='"+url+"'");
				    
				    ndiv.onclick = Function("window.location='"+url+"';");
				 
				    ndiv.style.cursor="pointer";
				    ndiv.className=this._baseClassName+"-div";
				    ndiv
				    var html = tagsA[i].innerHTML;
    				
				    tagsA[i].innerHTML="";
				    ndiv.innerHTML = html;				    
				    tagsA[i].appendChild(ndiv);
				}
			}
		}
	}	
}

$(document).ready( function () {conciergerie.init();} );


/************************************************************************************************************

	Form field tooltip
	(C) www.dhtmlgoodies.com, September 2006

	This is a script from www.dhtmlgoodies.com. You will find this and a lot of other scripts at our website.	
	
	Terms of use:
	Look at the terms of use at http://www.dhtmlgoodies.com/index.html?page=termsOfUse
	
	Thank you!
	
	www.dhtmlgoodies.com
	Alf Magne Kalleland

************************************************************************************************************/

var DHTMLgoodies_globalTooltipObj;


/** 
Constructor 
**/
function DHTMLgoodies_formTooltip()
{
	var tooltipDiv;
	var tooltipText;
	var tooltipContentDiv;				// Reference to inner div with tooltip content
	var imagePath;						// Relative path to images
	var arrowImageFile;					// Name of arrow image
	var arrowImageFileRight;			// Name of arrow image
	var arrowRightWidth;
	var arrowTopHeight;
	var tooltipWidth;					// Width of tooltip
	var roundedCornerObj;				// Reference to object of class DHTMLgoodies_roundedCorners
	var tooltipBgColor;
	var closeMessage;					// Close message
	var activeInput;					// Reference to currently active input
	var tooltipPosition;				// Tooltip position, possible values: "below" or "right"
	var tooltipCornerSize;				// Size of rounded corners
	var displayArrow;					// Display arrow above or at the left of the tooltip?
	var cookieName;						// Name of cookie
	var disableTooltipPossibility;		// Possibility of disabling tooltip
	var disableTooltipByCookie;			// If tooltip has been disabled, save the settings in cookie, i.e. for other pages with the same cookie name.
	var disableTooltipMessage;
	var tooltipDisabled;
	var isMSIE;
	var tooltipIframeObj;
	var pageBgColor;					// Color of background - used in ie when applying iframe which covers select boxes
	var currentTooltipObj;				// Reference to form field which tooltip is currently showing for
	
	this.currentTooltipObj = false,
	this.tooltipDiv = false,
	this.tooltipText = false;
	this.imagePath = 'images/';
	this.arrowImageFile = 'green-arrow.gif';
	this.arrowImageFileRight = 'green-arrow-right.gif';
	this.tooltipWidth = 200;
	this.tooltipBgColor = '#317082';
	this.closeMessage = 'Close';
	this.disableTooltipMessage = 'Don\'t show this message again';
	this.activeInput = false;
	this.tooltipPosition = 'right';
	this.arrowRightWidth = 16;			// Default width of arrow when the tooltip is on the right side of the inputs.
	this.arrowTopHeight = 13;			// Default height of arrow at the top of tooltip
	this.tooltipCornerSize = 10;
	this.displayArrow = true;
	this.cookieName = 'DHTMLgoodies_tooltipVisibility';
	this.disableTooltipByCookie = false;
	this.tooltipDisabled = false;
	this.disableTooltipPossibility = true;
	this.tooltipIframeObj = false;
	this.pageBgColor = '#FFFFFF';
	
	DHTMLgoodies_globalTooltipObj = this;
	
	if(navigator.userAgent.indexOf('MSIE')>=0)this.isMSIE = true; else this.isMSIE = false;
}


DHTMLgoodies_formTooltip.prototype = {
	// {{{ initFormFieldTooltip()
    /**
     *
	 *
     *  Initializes the tooltip script. Most set methods needs to be executed before you call this method.
     * 
     * @public
     */		
	initFormFieldTooltip : function()
	{
		var formElements = new Array();
		var inputs = document.getElementsByTagName('INPUT');
		for(var no=0;no<inputs.length;no++){
			var attr = inputs[no].getAttribute('tooltipText');
			if(!attr)attr = inputs[no].tooltipText;
			if(attr)formElements[formElements.length] = inputs[no];
		}
			
		var inputs = document.getElementsByTagName('TEXTAREA');
		for(var no=0;no<inputs.length;no++){
			var attr = inputs[no].getAttribute('tooltipText');
			if(!attr)attr = inputs[no].tooltipText;
			if(attr)formElements[formElements.length] = inputs[no];
		}
		var inputs = document.getElementsByTagName('SELECT');
		for(var no=0;no<inputs.length;no++){
			var attr = inputs[no].getAttribute('tooltipText');
			if(!attr)attr = inputs[no].tooltipText;
			if(attr)formElements[formElements.length] = inputs[no];
		}
			
		window.refToFormTooltip = this;
		
		for(var no=0;no<formElements.length;no++){
			formElements[no].onmouseover = this.__displayTooltip;
			formElements[no].onmouseout = this.__hideTooltip;
		}
		this.addEvent(window,'resize',function(){ window.refToFormTooltip.__positionCurrentToolTipObj(); });
		
		this.addEvent(document.documentElement,'click',function(e){ window.refToFormTooltip.__autoHideTooltip(e); });
	}
	
	// }}}
	,		
	// {{{ setTooltipPosition()
    /**
     *
	 *
     *  Specify position of tooltip(below or right)
     *	@param String newPosition (Possible values: "below" or "right") 
     * 
     * @public
     */	
	setTooltipPosition : function(newPosition)
	{
		this.tooltipPosition = newPosition;
	}
	// }}}
	,		
	// {{{ setCloseMessage()
    /**
     *
	 *
     *  Specify "Close" message
     *	@param String closeMessage
     * 
     * @public
     */
	setCloseMessage : function(closeMessage)
	{
		this.closeMessage = closeMessage;
	}
	// }}}
	,	
	// {{{ setDisableTooltipMessage()
    /**
     *
	 *
     *  Specify disable tooltip message at the bottom of the tooltip
     *	@param String disableTooltipMessage
     * 
     * @public
     */
	setDisableTooltipMessage : function(disableTooltipMessage)
	{
		this.disableTooltipMessage = disableTooltipMessage;
	}
	// }}}
	,		
	// {{{ setTooltipDisablePossibility()
    /**
     *
	 *
     *  Specify whether you want the disable link to appear or not.
     *	@param Boolean disableTooltipPossibility
     * 
     * @public
     */
	setTooltipDisablePossibility : function(disableTooltipPossibility)
	{
		this.disableTooltipPossibility = disableTooltipPossibility;
	}
	// }}}
	,		
	// {{{ setCookieName()
    /**
     *
	 *
     *  Specify name of cookie. Useful if you're using this script on several pages. 
     *	@param String newCookieName
     * 
     * @public
     */
	setCookieName : function(newCookieName)
	{
		this.cookieName = newCookieName;
	}
	// }}}
	,		
	// {{{ setTooltipWidth()
    /**
     *
	 *
     *  Specify width of tooltip
     *	@param Int newWidth
     * 
     * @public
     */	
	setTooltipWidth : function(newWidth)
	{
		this.tooltipWidth = newWidth;
	}
	
	// }}}
	,		
	// {{{ setArrowVisibility()
    /**
     *
	 *
     *  Display arrow at the top or at the left of the tooltip?
     *	@param Boolean displayArrow
     * 
     * @public
     */	
	
	setArrowVisibility : function(displayArrow)
	{
		this.displayArrow = displayArrow;
	}
	
	// }}}
	,		
	// {{{ setTooltipBgColor()
    /**
     *
	 *
     *  Send true to this method if you want to be able to save tooltip visibility in cookie. If it's set to true,
     *	It means that when someone returns to the page, the tooltips won't show.
     * 
     *	@param Boolean disableTooltipByCookie
     * 
     * @public
     */	
	setDisableTooltipByCookie : function(disableTooltipByCookie)
	{
		this.disableTooltipByCookie = disableTooltipByCookie;
	}	
	// }}}
	,		
	// {{{ setTooltipBgColor()
    /**
     *
	 *
     *  This method specifies background color of tooltip
     *	@param String newBgColor
     * 
     * @public
     */	
	setTooltipBgColor : function(newBgColor)
	{
		this.tooltipBgColor = newBgColor;
	}
	
	// }}}
	,		
	// {{{ setTooltipCornerSize()
    /**
     *
	 *
     *  Size of rounded corners around tooltip
     *	@param Int newSize (0 = no rounded corners)
     * 
     * @public
     */	
	setTooltipCornerSize : function(tooltipCornerSize)
	{
		this.tooltipCornerSize = tooltipCornerSize;
	}
	
	// }}}
	,
	// {{{ setTopArrowHeight()
    /**
     *
	 *
     *  Size height of arrow at the top of tooltip
     *	@param Int arrowTopHeight
     * 
     * @public
     */	
	setTopArrowHeight : function(arrowTopHeight)
	{
		this.arrowTopHeight = arrowTopHeight;
	}
	
	// }}}
	,	
	// {{{ setRightArrowWidth()
    /**
     *
	 *
     *  Size width of arrow when the tooltip is on the right side of inputs
     *	@param Int arrowTopHeight
     * 
     * @public
     */	
	setRightArrowWidth : function(arrowRightWidth)
	{
		this.arrowRightWidth = arrowRightWidth;
	}
	
	// }}}
	,	
	// {{{ setPageBgColor()
    /**
     *
	 *
     *  Specify background color of page.
     *	@param String pageBgColor
     * 
     * @public
     */	
	setPageBgColor : function(pageBgColor)
	{
		this.pageBgColor = pageBgColor;
	}
	
	// }}}
	,		
	// {{{ __hideTooltip()
    /**
     *
	 *
     *  This method displays the tooltip
     *
     * 
     * @private
     */		
	__displayTooltip : function()
	{
		if(DHTMLgoodies_globalTooltipObj.disableTooltipByCookie){
			var cookieValue = DHTMLgoodies_globalTooltipObj.getCookie(DHTMLgoodies_globalTooltipObj.cookieName) + '';	
			if(cookieValue=='1')DHTMLgoodies_globalTooltipObj.tooltipDisabled = true;
		}	
		
		if(DHTMLgoodies_globalTooltipObj.tooltipDisabled)return;	// Tooltip disabled
		var tooltipText = this.getAttribute('tooltipText');
		DHTMLgoodies_globalTooltipObj.activeInput = this;
		
		if(!tooltipText)tooltipText = this.tooltipText;
		DHTMLgoodies_globalTooltipObj.tooltipText = tooltipText;

		
		if(!DHTMLgoodies_globalTooltipObj.tooltipDiv)DHTMLgoodies_globalTooltipObj.__createTooltip();
		
		DHTMLgoodies_globalTooltipObj.__positionTooltip(this);
		
		
		
	
		DHTMLgoodies_globalTooltipObj.tooltipContentDiv.innerHTML = tooltipText;
		DHTMLgoodies_globalTooltipObj.tooltipDiv.style.display='block';
		
		if(DHTMLgoodies_globalTooltipObj.isMSIE){
			if(DHTMLgoodies_globalTooltipObj.tooltipPosition == 'below'){
				DHTMLgoodies_globalTooltipObj.tooltipIframeObj.style.height = (DHTMLgoodies_globalTooltipObj.tooltipDiv.clientHeight - DHTMLgoodies_globalTooltipObj.arrowTopHeight);
			}else{
				DHTMLgoodies_globalTooltipObj.tooltipIframeObj.style.height = (DHTMLgoodies_globalTooltipObj.tooltipDiv.clientHeight);
			}
		}
		
	}
	// }}}
	,		
	// {{{ __hideTooltip()
    /**
     *
	 *
     *  This function hides the tooltip
     *
     * 
     * @private
     */		
	__hideTooltip : function()
	{
		try{
			DHTMLgoodies_globalTooltipObj.tooltipDiv.style.display='none';
		}catch(e){
		}
		
	}
	// }}}
	,
	// {{{ getSrcElement()
    /**
     *
	 *
     *  Return the source of an event.
     *
     * 
     * @private
     */		
    getSrcElement : function(e)
    {
    	var el;
		if (e.target) el = e.target;
			else if (e.srcElement) el = e.srcElement;
			if (el.nodeType == 3) // defeat Safari bug
				el = el.parentNode;
		return el;	
    }	
	// }}}
	,
	__autoHideTooltip : function(e)
	{
		if(document.all)e = event;	
		var src = this.getSrcElement(e);
		if(src.tagName.toLowerCase()!='input' && src.tagName.toLowerCase().toLowerCase()!='textarea' && src.tagName.toLowerCase().toLowerCase()!='select')this.__hideTooltip();

		var attr = src.getAttribute('tooltipText');
		if(!attr)attr = src.tooltipText;
		if(!attr){
			this.__hideTooltip();
		}	
		
	}
	// }}}
	,		
	// {{{ __hideTooltipFromLink()
    /**
     *
	 *
     *  This function hides the tooltip
     *
     * 
     * @private
     */	
	__hideTooltipFromLink : function()
	{
		
		this.activeInput.focus();
		window.refToThis = this;
		setTimeout('window.refToThis.__hideTooltip()',10);
	}
	// }}}
	,		
	// {{{ disableTooltip()
    /**
     *
	 *
     *  Hide tooltip and disable it
     *
     * 
     * @public
     */	
	disableTooltip : function()
	{
		this.__hideTooltipFromLink();
		if(this.disableTooltipByCookie)this.setCookie(this.cookieName,'1',500);	
		this.tooltipDisabled = true;	
	}	
	// }}}
	,		
	// {{{ __positionTooltip()
    /**
     *
	 *
     *  This function creates the tooltip elements
     *
     * 
     * @private
     */	
	__createTooltip : function()
	{
		this.tooltipDiv = document.createElement('DIV');
		this.tooltipDiv.style.position = 'absolute';
		
		if(this.displayArrow){
			var topDiv = document.createElement('DIV');
			
			if(this.tooltipPosition=='below'){
				
				topDiv.style.marginLeft = '20px';
				var arrowDiv = document.createElement('IMG');
				arrowDiv.src = this.imagePath + this.arrowImageFile + '?rand='+ Math.random();
				arrowDiv.style.display='block';
				topDiv.appendChild(arrowDiv);
					
			}else{
				topDiv.style.marginTop = '5px';
				var arrowDiv = document.createElement('IMG');
				arrowDiv.src = this.imagePath + this.arrowImageFileRight + '?rand='+ Math.random();	
				arrowDiv.style.display='block';
				topDiv.appendChild(arrowDiv);					
				topDiv.style.position = 'absolute';			
			}
			
			this.tooltipDiv.appendChild(topDiv);	
		}
		
		var outerDiv = document.createElement('DIV');
		outerDiv.style.position = 'relative';
		outerDiv.style.zIndex = 1000;
		if(this.tooltipPosition!='below' && this.displayArrow){			
			outerDiv.style.left = this.arrowRightWidth + 'px';
		}
				
		outerDiv.id = 'DHTMLgoodies_formTooltipDiv';
		outerDiv.className = 'DHTMLgoodies_formTooltipDiv';
		outerDiv.style.backgroundColor = this.tooltipBgColor;
		this.tooltipDiv.appendChild(outerDiv);

		if(this.isMSIE){
			this.tooltipIframeObj = document.createElement('<IFRAME name="tooltipIframeObj" width="' + this.tooltipWidth + '" frameborder="no" src="about:blank"></IFRAME>');
			this.tooltipIframeObj.style.position = 'absolute';
			this.tooltipIframeObj.style.top = '0px';
			this.tooltipIframeObj.style.left = '0px';
			this.tooltipIframeObj.style.width = (this.tooltipWidth) + 'px';
			this.tooltipIframeObj.style.zIndex = 100;
			this.tooltipIframeObj.background = this.pageBgColor;
			this.tooltipIframeObj.style.backgroundColor= this.pageBgColor;
			this.tooltipDiv.appendChild(this.tooltipIframeObj);	
			if(this.tooltipPosition!='below' && this.displayArrow){
				this.tooltipIframeObj.style.left = (this.arrowRightWidth) +  'px';	
			}else{
				this.tooltipIframeObj.style.top = this.arrowTopHeight + 'px';	
			}

			setTimeout("self.frames['tooltipIframeObj'].document.documentElement.style.backgroundColor='" + this.pageBgColor + "'",500);

		}
		
		this.tooltipContentDiv = document.createElement('DIV');	
		this.tooltipContentDiv.style.position = 'relative';	
		this.tooltipContentDiv.id = 'DHTMLgoodies_formTooltipContent';
		outerDiv.appendChild(this.tooltipContentDiv);			
		
		var closeDiv = document.createElement('DIV');
		closeDiv.style.textAlign = 'center';
	
		closeDiv.innerHTML = '<A class="DHTMLgoodies_formTooltip_closeMessage" href="#" onclick="DHTMLgoodies_globalTooltipObj.__hideTooltipFromLink();return false">' + this.closeMessage + '</A>';
		
		if(this.disableTooltipPossibility){
			var tmpHTML = closeDiv.innerHTML;
			tmpHTML = tmpHTML + ' | <A class="DHTMLgoodies_formTooltip_closeMessage" href="#" onclick="DHTMLgoodies_globalTooltipObj.disableTooltip();return false">' + this.disableTooltipMessage + '</A>';
			closeDiv.innerHTML = tmpHTML;
		} 
		
		outerDiv.appendChild(closeDiv);
		
		document.body.appendChild(this.tooltipDiv);
		
		
				
		if(this.tooltipCornerSize>0){
			this.roundedCornerObj = new DHTMLgoodies_roundedCorners();
			// (divId,xRadius,yRadius,color,backgroundColor,padding,heightOfContent,whichCorners)
			this.roundedCornerObj.addTarget('DHTMLgoodies_formTooltipDiv',this.tooltipCornerSize,this.tooltipCornerSize,this.tooltipBgColor,this.pageBgColor,5);
			this.roundedCornerObj.init();
		}
		

		this.tooltipContentDiv = document.getElementById('DHTMLgoodies_formTooltipContent');
	}
	// }}}
	,
	addEvent : function(whichObject,eventType,functionName)
	{ 
	  if(whichObject.attachEvent){ 
	    whichObject['e'+eventType+functionName] = functionName; 
	    whichObject[eventType+functionName] = function(){whichObject['e'+eventType+functionName]( window.event );} 
	    whichObject.attachEvent( 'on'+eventType, whichObject[eventType+functionName] ); 
	  } else 
	    whichObject.addEventListener(eventType,functionName,false); 	    
	} 	
	// }}}
	,
	__positionCurrentToolTipObj : function()
	{
		if(DHTMLgoodies_globalTooltipObj.activeInput)this.__positionTooltip(DHTMLgoodies_globalTooltipObj.activeInput);
		
	}
	// }}}
	,		
	// {{{ __positionTooltip()
    /**
     *
	 *
     *  This function positions the tooltip
     *
     * @param Obj inputObj = Reference to text input
     * 
     * @private
     */	
	__positionTooltip : function(inputObj)
	{	
		var offset = 0;
		if(!this.displayArrow)offset = 3;	
		if(this.tooltipPosition=='below'){
			this.tooltipDiv.style.left = this.getLeftPos(inputObj)+  'px';
			this.tooltipDiv.style.top = (this.getTopPos(inputObj) + inputObj.offsetHeight + offset) + 'px';
		}else{
		
			this.tooltipDiv.style.left = (this.getLeftPos(inputObj) + inputObj.offsetWidth + offset)+  'px';
			this.tooltipDiv.style.top = this.getTopPos(inputObj) + 'px';			
		}
		this.tooltipDiv.style.width=this.tooltipWidth + 'px';
		
	}
	,
	// {{{ getTopPos()
    /**
     * This method will return the top coordinate(pixel) of an object
     *
     * @param Object inputObj = Reference to HTML element
     * @public
     */	
	getTopPos : function(inputObj)
	{		
	  var returnValue = inputObj.offsetTop;
	  while((inputObj = inputObj.offsetParent) != null){
	  	if(inputObj.tagName!='HTML'){
	  		returnValue += inputObj.offsetTop;
	  		if(document.all)returnValue+=inputObj.clientTop;
	  	}
	  } 
	  return returnValue;
	}
	// }}}
	
	,
	// {{{ getLeftPos()
    /**
     * This method will return the left coordinate(pixel) of an object
     *
     * @param Object inputObj = Reference to HTML element
     * @public
     */	
	getLeftPos : function(inputObj)
	{	  
	  var returnValue = inputObj.offsetLeft;
	  while((inputObj = inputObj.offsetParent) != null){
	  	if(inputObj.tagName!='HTML'){
	  		returnValue += inputObj.offsetLeft;
	  		if(document.all)returnValue+=inputObj.clientLeft;
	  	}
	  }
	  return returnValue;
	}
	
	,
	
	// {{{ getCookie()
    /**
     *
     * 	These cookie functions are downloaded from 
	 * 	http://www.mach5.com/support/analyzer/manual/html/General/CookiesJavaScript.htm
	 *
     *  This function returns the value of a cookie
     *
     * @param String name = Name of cookie
     * @param Object inputObj = Reference to HTML element
     * @public
     */	
	getCookie : function(name) { 
	   var start = document.cookie.indexOf(name+"="); 
	   var len = start+name.length+1; 
	   if ((!start) && (name != document.cookie.substring(0,name.length))) return null; 
	   if (start == -1) return null; 
	   var end = document.cookie.indexOf(";",len); 
	   if (end == -1) end = document.cookie.length; 
	   return unescape(document.cookie.substring(len,end)); 
	} 	
	// }}}
	,	
	
	// {{{ setCookie()
    /**
     *
     * 	These cookie functions are downloaded from 
	 * 	http://www.mach5.com/support/analyzer/manual/html/General/CookiesJavaScript.htm
	 *
     *  This function creates a cookie. (This method has been slighhtly modified)
     *
     * @param String name = Name of cookie
     * @param String value = Value of cookie
     * @param Int expires = Timestamp - days
     * @param String path = Path for cookie (Usually left empty)
     * @param String domain = Cookie domain
     * @param Boolean secure = Secure cookie(SSL)
     * 
     * @public
     */	
	setCookie : function(name,value,expires,path,domain,secure) { 
		expires = expires * 60*60*24*1000;
		var today = new Date();
		var expires_date = new Date( today.getTime() + (expires) );
	    var cookieString = name + "=" +escape(value) + 
	       ( (expires) ? ";expires=" + expires_date.toGMTString() : "") + 
	       ( (path) ? ";path=" + path : "") + 
	       ( (domain) ? ";domain=" + domain : "") + 
	       ( (secure) ? ";secure" : ""); 
	    document.cookie = cookieString; 
	}
	// }}}
		
		
}


/************************************************************************************************************<br>
<br>
	@fileoverview
	Rounded corners class<br>
	(C) www.dhtmlgoodies.com, September 2006<br>
	<br>
	This is a script from www.dhtmlgoodies.com. You will find this and a lot of other scripts at our website.	<br>
	<br>
	Terms of use:<br>
	Look at the terms of use at http://www.dhtmlgoodies.com/index.html?page=termsOfUse<br>
	<br>
	Thank you!<br>
	<br>
	www.dhtmlgoodies.com<br>
	Alf Magne Kalleland<br>
<br>
************************************************************************************************************/

// {{{ Constructor
function DHTMLgoodies_roundedCorners()
{
	var roundedCornerTargets;
	
	this.roundedCornerTargets = new Array();
	
}
	var string = '';
// }}}
DHTMLgoodies_roundedCorners.prototype = {

	// {{{ addTarget() 
    /**
     *
	 *
     *  Add rounded corners to an element
     *
     *	@param String divId = Id of element on page. Example "leftColumn" for &lt;div id="leftColumn">
     *	@param Int xRadius = Y radius of rounded corners, example 10
     *	@param Int yRadius = Y radius of rounded corners, example 10
     *  @param String color = Background color of element, example #FFF or #AABBCC
     *  @param String color = backgroundColor color of element "behind", example #FFF or #AABBCC
     *  @param Int padding = Padding of content - This will be added as left and right padding(not top and bottom)
     *  @param String heightOfContent = Optional argument. You can specify a fixed height of your content. example "15" which means pixels, or "50%". 
     *  @param String whichCorners = Optional argument. Commaseparated list of corners, example "top_left,top_right,bottom_left"
     * 
     * @public
     */		
    addTarget : function(divId,xRadius,yRadius,color,backgroundColor,padding,heightOfContent,whichCorners)
    {	
    	var index = this.roundedCornerTargets.length;
    	this.roundedCornerTargets[index] = new Array();
    	this.roundedCornerTargets[index]['divId'] = divId;
    	this.roundedCornerTargets[index]['xRadius'] = xRadius;
    	this.roundedCornerTargets[index]['yRadius'] = yRadius;
    	this.roundedCornerTargets[index]['color'] = color;
    	this.roundedCornerTargets[index]['backgroundColor'] = backgroundColor;
    	this.roundedCornerTargets[index]['padding'] = padding;
    	this.roundedCornerTargets[index]['heightOfContent'] = heightOfContent;
    	this.roundedCornerTargets[index]['whichCorners'] = whichCorners;  
    	
    }
    // }}}
    ,
	// {{{ init()
    /**
     *
	 *
     *  Initializes the script
     *
     * 
     * @public
     */	    
	init : function()
	{
		
		for(var targetCounter=0;targetCounter < this.roundedCornerTargets.length;targetCounter++){
			
			// Creating local variables of each option
			whichCorners = this.roundedCornerTargets[targetCounter]['whichCorners'];
			divId = this.roundedCornerTargets[targetCounter]['divId'];
			xRadius = this.roundedCornerTargets[targetCounter]['xRadius'];
			yRadius = this.roundedCornerTargets[targetCounter]['yRadius'];
			color = this.roundedCornerTargets[targetCounter]['color'];
			backgroundColor = this.roundedCornerTargets[targetCounter]['backgroundColor'];
			padding = this.roundedCornerTargets[targetCounter]['padding'];
			heightOfContent = this.roundedCornerTargets[targetCounter]['heightOfContent'];
			whichCorners = this.roundedCornerTargets[targetCounter]['whichCorners'];

			// Which corners should we add rounded corners to?
			var cornerArray = new Array();
			if(!whichCorners || whichCorners=='all'){
				cornerArray['top_left'] = true;
				cornerArray['top_right'] = true;
				cornerArray['bottom_left'] = true;
				cornerArray['bottom_right'] = true;
			}else{
				cornerArray = whichCorners.split(/,/gi);
				for(var prop in cornerArray)cornerArray[cornerArray[prop]] = true;
			}
					
				
			var factorX = xRadius/yRadius;	// How big is x radius compared to y radius
		
			var obj = document.getElementById(divId);	// Creating reference to element
			obj.style.backgroundColor=null;	// Setting background color blank
			obj.style.backgroundColor='transparent';
			var content = obj.innerHTML;	// Saving HTML content of this element
			obj.innerHTML = '';	// Setting HTML content of element blank-
			
	
			
			
			// Adding top corner div.
			
			if(cornerArray['top_left'] || cornerArray['top_right']){
				var topBar_container = document.createElement('DIV');
				topBar_container.style.height = yRadius + 'px';
				topBar_container.style.overflow = 'hidden';	
		
				obj.appendChild(topBar_container);		
				var currentAntialiasSize = 0;
				var savedRestValue = 0;
				
				for(no=1;no<=yRadius;no++){
					var marginSize = (xRadius - (this.getY((yRadius - no),yRadius,factorX)));					
					var marginSize_decimals = (xRadius - (this.getY_withDecimals((yRadius - no),yRadius,factorX)));					
					var restValue = xRadius - marginSize_decimals;		
					var antialiasSize = xRadius - marginSize - Math.floor(savedRestValue)
					var foregroundSize = xRadius - (marginSize + antialiasSize);	
					
					var el = document.createElement('DIV');
					el.style.overflow='hidden';
					el.style.height = '1px';					
					if(cornerArray['top_left'])el.style.marginLeft = marginSize + 'px';				
					if(cornerArray['top_right'])el.style.marginRight = marginSize + 'px';	
					topBar_container.appendChild(el);				
					var y = topBar_container;		
					
					for(var no2=1;no2<=antialiasSize;no2++){
						switch(no2){
							case 1:
								if (no2 == antialiasSize)
									blendMode = ((restValue + savedRestValue) /2) - foregroundSize;
								else {
								  var tmpValue = this.getY_withDecimals((xRadius - marginSize - no2),xRadius,1/factorX);
								  blendMode = (restValue - foregroundSize - antialiasSize + 1) * (tmpValue - (yRadius - no)) /2;
								}						
								break;							
							case antialiasSize:								
								var tmpValue = this.getY_withDecimals((xRadius - marginSize - no2 + 1),xRadius,1/factorX);								
								blendMode = 1 - (1 - (tmpValue - (yRadius - no))) * (1 - (savedRestValue - foregroundSize)) /2;							
								break;
							default:			
								var tmpValue2 = this.getY_withDecimals((xRadius - marginSize - no2),xRadius,1/factorX);
								var tmpValue = this.getY_withDecimals((xRadius - marginSize - no2 + 1),xRadius,1/factorX);		
								blendMode = ((tmpValue + tmpValue2) / 2) - (yRadius - no);							
						}
						
						el.style.backgroundColor = this.__blendColors(backgroundColor,color,blendMode);
						y.appendChild(el);
						y = el;
						var el = document.createElement('DIV');
						el.style.height = '1px';	
						el.style.overflow='hidden';
						if(cornerArray['top_left'])el.style.marginLeft = '1px';
						if(cornerArray['top_right'])el.style.marginRight = '1px';    						
						el.style.backgroundColor=color;					
					}
					
					y.appendChild(el);				
					savedRestValue = restValue;
				}
			}
			
			// Add content
			var contentDiv = document.createElement('DIV');
			contentDiv.className = obj.className;
			contentDiv.style.border='1px solid ' + color;
			contentDiv.innerHTML = content;
			contentDiv.style.backgroundColor=color;
			contentDiv.style.paddingLeft = padding + 'px';
			contentDiv.style.paddingRight = padding + 'px';
	
			if(!heightOfContent)heightOfContent = '';
			heightOfContent = heightOfContent + '';
			if(heightOfContent.length>0 && heightOfContent.indexOf('%')==-1)heightOfContent = heightOfContent + 'px';
			if(heightOfContent.length>0)contentDiv.style.height = heightOfContent;
			
			obj.appendChild(contentDiv);
	
		
			if(cornerArray['bottom_left'] || cornerArray['bottom_right']){
				var bottomBar_container = document.createElement('DIV');
				bottomBar_container.style.height = yRadius + 'px';
				bottomBar_container.style.overflow = 'hidden';	
		
				obj.appendChild(bottomBar_container);		
				var currentAntialiasSize = 0;
				var savedRestValue = 0;
				
				var errorOccured = false;
				var arrayOfDivs = new Array();
				for(no=1;no<=yRadius;no++){
					
					var marginSize = (xRadius - (this.getY((yRadius - no),yRadius,factorX)));					
					var marginSize_decimals = (xRadius - (this.getY_withDecimals((yRadius - no),yRadius,factorX)));						
	
					var restValue = (xRadius - marginSize_decimals);				
					var antialiasSize = xRadius - marginSize - Math.floor(savedRestValue)
					var foregroundSize = xRadius - (marginSize + antialiasSize);	
					
					var el = document.createElement('DIV');
					el.style.overflow='hidden';
					el.style.height = '1px';					
					if(cornerArray['bottom_left'])el.style.marginLeft = marginSize + 'px';				
					if(cornerArray['bottom_right'])el.style.marginRight = marginSize + 'px';	
					bottomBar_container.insertBefore(el,bottomBar_container.firstChild);				
					
					var y = bottomBar_container;		
					
					for(var no2=1;no2<=antialiasSize;no2++){
						switch(no2){
							case 1:
								if (no2 == antialiasSize)
									blendMode = ((restValue + savedRestValue) /2) - foregroundSize;
								else {
								  var tmpValue = this.getY_withDecimals((xRadius - marginSize - no2),xRadius,1/factorX);
								  blendMode = (restValue - foregroundSize - antialiasSize + 1) * (tmpValue - (yRadius - no)) /2;
								}						
								break;							
							case antialiasSize:								
								var tmpValue = this.getY_withDecimals((xRadius - marginSize - no2 + 1),xRadius,1/factorX);								
								blendMode = 1 - (1 - (tmpValue - (yRadius - no))) * (1 - (savedRestValue - foregroundSize)) /2;							
								break;
							default:			
								var tmpValue2 = this.getY_withDecimals((xRadius - marginSize - no2),xRadius,1/factorX);
								var tmpValue = this.getY_withDecimals((xRadius - marginSize - no2 + 1),xRadius,1/factorX);		
								blendMode = ((tmpValue + tmpValue2) / 2) - (yRadius - no);							
						}
						
						el.style.backgroundColor = this.__blendColors(backgroundColor,color,blendMode);
						
						if(y==bottomBar_container)arrayOfDivs[arrayOfDivs.length] = el;
						
						try{	// Need to look closer at this problem which occures in Opera.
							var firstChild = y.getElementsByTagName('DIV')[0];
							y.insertBefore(el,y.firstChild);
						}catch(e){
							y.appendChild(el);							
							errorOccured = true;
						}
						y = el;
						
						var el = document.createElement('DIV');
						el.style.height = '1px';	
						el.style.overflow='hidden';
						if(cornerArray['bottom_left'])el.style.marginLeft = '1px';
						if(cornerArray['bottom_right'])el.style.marginRight = '1px';    						
										
					}
					
					if(errorOccured){	// Opera fix
						for(var divCounter=arrayOfDivs.length-1;divCounter>=0;divCounter--){
							bottomBar_container.appendChild(arrayOfDivs[divCounter]);
						}
					}
					
					el.style.backgroundColor=color;	
					y.appendChild(el);				
					savedRestValue = restValue;
				}
	
			}			
		}
	}		
	// }}}
	,		
	// {{{ getY()
    /**
     *
	 *
     *  Add rounded corners to an element
     *
     *	@param Int x = x Coordinate
     *	@param Int maxX = Size of rounded corners
	 *
     * 
     * @private
     */		
	getY : function(x,maxX,factorX){
		// y = sqrt(100 - x^2)			
		// Y = 0.5 * ((100 - x^2)^0.5);			
		return Math.max(0,Math.ceil(factorX * Math.sqrt( (maxX * maxX) - (x*x)) ));
		
	}	
	// }}}
	,		
	// {{{ getY_withDecimals()
    /**
     *
	 *
     *  Add rounded corners to an element
     *
     *	@param Int x = x Coordinate
     *	@param Int maxX = Size of rounded corners
	 *
     * 
     * @private
     */		
	getY_withDecimals : function(x,maxX,factorX){
		// y = sqrt(100 - x^2)			
		// Y = 0.5 * ((100 - x^2)^0.5);			
		return Math.max(0,factorX * Math.sqrt( (maxX * maxX) - (x*x)) );
		
	}
	

	,

	// {{{ __blendColors()
    /**
     *
	 *
     *  Simply blending two colors by extracting red, green and blue and subtracting difference between colors from them.
     * 	Finally, we multiply it with the blendMode value
     *
     *	@param String colorA = RGB color
     *	@param String colorB = RGB color
     *	@param Float blendMode 
	 *
     * 
     * @private
     */		
	__blendColors : function (colorA, colorB, blendMode) {
		if(colorA.length=='4'){	// In case we are dealing with colors like #FFF
			colorA = '#' + colorA.substring(1,1) + colorA.substring(1,1) + colorA.substring(2,1) + colorA.substring(2,1) + colorA.substring(3,1) + colorA.substring(3,1);
		}	
		if(colorB.length=='4'){	// In case we are dealing with colors like #FFF
			colorB = '#' + colorB.substring(1,1) + colorB.substring(1,1) + colorB.substring(2,1) + colorB.substring(2,1) + colorB.substring(3,1) + colorB.substring(3,1);
		}
		var colorArrayA = [parseInt('0x' + colorA.substring(1,3)), parseInt('0x' + colorA.substring(3, 5)), parseInt('0x' + colorA.substring(5, 7))];	// Create array of Red, Green and Blue ( 0-255)
		var colorArrayB = [parseInt('0x' + colorB.substring(1,3)), parseInt('0x' + colorB.substring(3, 5)), parseInt('0x' + colorB.substring(5, 7))];	// Create array of Red, Green and Blue ( 0-255)		
		var red = Math.round(colorArrayA[0] + (colorArrayB[0] - colorArrayA[0])*blendMode).toString(16);	// Create new Red color ( Hex )
		var green = Math.round(colorArrayA[1] + (colorArrayB[1] - colorArrayA[1])*blendMode).toString(16);	// Create new Green color ( Hex )
		var blue = Math.round(colorArrayA[2] + (colorArrayB[2] - colorArrayA[2])*blendMode).toString(16);	// Create new Blue color ( Hex )
		
		if(red.length==1)red = '0' + red;
		if(green.length==1)green = '0' + green;
		if(blue.length==1)blue = '0' + blue;
			
		return '#' + red + green+ blue;	// Return new RGB color
	}
}				


// -------------------------------------------------------------------
// DHTML Window Widget- By Dynamic Drive, available at: http://www.dynamicdrive.com
// v1.0: Script created Feb 15th, 07'
// v1.01: Feb 21th, 07' (see changelog.txt)
// v1.02: March 26th, 07' (see changelog.txt)
// v1.03: May 5th, 07' (see changelog.txt)
// v1.1:  Oct 29th, 07' (see changelog.txt)
// -------------------------------------------------------------------

var dhtmlwindow={
imagefiles:['windowfiles/min.gif', '/repository/images/layerClose.gif', 'windowfiles/restore.gif', 'windowfiles/resize.gif'], //Path to 4 images used by script, in that order
ajaxbustcache: true, //Bust caching when fetching a file via Ajax?
ajaxloadinghtml: '<b>Loading Page. Please wait...</b>', //HTML to show while window fetches Ajax Content?

minimizeorder: 0,
zIndexvalue:100,
tobjects: [], //object to contain references to dhtml window divs, for cleanup purposes
lastactivet: {}, //reference to last active DHTML window

init:function(t){
	var domwindow=document.createElement("div") //create dhtml window div
	domwindow.id=t
	domwindow.className="dhtmlwindow"
	var domwindowdata=''
	domwindowdata='<div class="drag-handle">'
	domwindowdata+='DHTML Window <div class="drag-controls"><img src="'+this.imagefiles[0]+'" title="Minimize" /><img src="'+this.imagefiles[1]+'" title="Close" /></div>'
	domwindowdata+='</div>'
	domwindowdata+='<div class="drag-contentarea"></div>'
	domwindowdata+='<div class="drag-statusarea"><div class="drag-resizearea" style="background: transparent url('+this.imagefiles[3]+') top right no-repeat;">&nbsp;</div></div>'
	domwindowdata+='</div>'
	domwindow.innerHTML=domwindowdata
	document.getElementById("dhtmlwindowholder").appendChild(domwindow)
	//this.zIndexvalue=(this.zIndexvalue)? this.zIndexvalue+1 : 100 //z-index value for DHTML window: starts at 0, increments whenever a window has focus
	var t=document.getElementById(t)
	var divs=t.getElementsByTagName("div")
	for (var i=0; i<divs.length; i++){ //go through divs inside dhtml window and extract all those with class="drag-" prefix
		if (/drag-/.test(divs[i].className))
			t[divs[i].className.replace(/drag-/, "")]=divs[i] //take out the "drag-" prefix for shorter access by name
	}
	//t.style.zIndex=this.zIndexvalue //set z-index of this dhtml window
	t.handle._parent=t //store back reference to dhtml window
	t.resizearea._parent=t //same
	t.controls._parent=t //same
	t.onclose=function(){return true} //custom event handler "onclose"
	t.onmousedown=function(){dhtmlwindow.setfocus(this)} //Increase z-index of window when focus is on it
	t.handle.onmousedown=dhtmlwindow.setupdrag //set up drag behavior when mouse down on handle div
	t.resizearea.onmousedown=dhtmlwindow.setupdrag //set up drag behavior when mouse down on resize div
	t.controls.onclick=dhtmlwindow.enablecontrols
	t.show=function(){dhtmlwindow.show(this)} //public function for showing dhtml window
	t.hide=function(){dhtmlwindow.hide(this)} //public function for hiding dhtml window
	t.close=function(){dhtmlwindow.close(this)} //public function for closing dhtml window (also empties DHTML window content)
	t.setSize=function(w, h){dhtmlwindow.setSize(this, w, h)} //public function for setting window dimensions
	t.moveTo=function(x, y){dhtmlwindow.moveTo(this, x, y)} //public function for moving dhtml window (relative to viewpoint)
	t.isResize=function(bol){dhtmlwindow.isResize(this, bol)} //public function for specifying if window is resizable
	t.isScrolling=function(bol){dhtmlwindow.isScrolling(this, bol)} //public function for specifying if window content contains scrollbars
	t.load=function(contenttype, contentsource, title){dhtmlwindow.load(this, contenttype, contentsource, title)} //public function for loading content into window
	this.tobjects[this.tobjects.length]=t
	return t //return reference to dhtml window div
},

open:function(t, contenttype, contentsource, title, attr, recalonload){
	var d=dhtmlwindow //reference dhtml window object
	function getValue(Name){
		var config=new RegExp(Name+"=([^,]+)", "i") //get name/value config pair (ie: width=400px,)
		return (config.test(attr))? parseInt(RegExp.$1) : 0 //return value portion (int), or 0 (false) if none found
	}
	if (document.getElementById(t)==null) //if window doesn't exist yet, create it
		t=this.init(t) //return reference to dhtml window div
	else
		t=document.getElementById(t)
	this.setfocus(t)
	t.setSize(getValue(("width")), (getValue("height"))) //Set dimensions of window
	var xpos=getValue("center")? "middle" : getValue("left") //Get x coord of window
	var ypos=getValue("center")? "middle" : getValue("top") //Get y coord of window
	//t.moveTo(xpos, ypos) //Position window
	if (typeof recalonload!="undefined" && recalonload=="recal" && this.scroll_top==0){ //reposition window when page fully loads with updated window viewpoints?
		if (window.attachEvent && !window.opera) //In IE, add another 400 milisecs on page load (viewpoint properties may return 0 b4 then)
			this.addEvent(window, function(){setTimeout(function(){t.moveTo(xpos, ypos)}, 400)}, "load")
		else
			this.addEvent(window, function(){t.moveTo(xpos, ypos)}, "load")
	}
	t.isResize(getValue("resize")) //Set whether window is resizable
	t.isScrolling(getValue("scrolling")) //Set whether window should contain scrollbars
	t.style.visibility="visible"
	t.style.display="block"
	t.contentarea.style.display="block"
	t.moveTo(xpos, ypos) //Position window
	t.load(contenttype, contentsource, title)
	if (t.state=="minimized" && t.controls.firstChild.title=="Restore"){ //If window exists and is currently minimized?
		t.controls.firstChild.setAttribute("src", dhtmlwindow.imagefiles[0]) //Change "restore" icon within window interface to "minimize" icon
		t.controls.firstChild.setAttribute("title", "Minimize")
		t.state="fullview" //indicate the state of the window as being "fullview"
	}
	return t
},

setSize:function(t, w, h){ //set window size (min is 150px wide by 100px tall)
	t.style.width=Math.max(parseInt(w), 150)+"px"
	t.contentarea.style.height=Math.max(parseInt(h), 100)+"px"
},

moveTo:function(t, x, y){ //move window. Position includes current viewpoint of document
	this.getviewpoint() //Get current viewpoint numbers
	t.style.left=(x=="middle")? this.scroll_left+(this.docwidth-t.offsetWidth)/2+"px" : this.scroll_left+parseInt(x)+"px"
	t.style.top=(y=="middle")? this.scroll_top+(this.docheight-t.offsetHeight)/2+"px" : this.scroll_top+parseInt(y)+"px"
},

isResize:function(t, bol){ //show or hide resize inteface (part of the status bar)
	t.statusarea.style.display=(bol)? "block" : "none"
	t.resizeBool=(bol)? 1 : 0
},

isScrolling:function(t, bol){ //set whether loaded content contains scrollbars
	t.contentarea.style.overflow=(bol)? "auto" : "hidden"
},

load:function(t, contenttype, contentsource, title){ //loads content into window plus set its title (3 content types: "inline", "iframe", or "ajax")
	if (t.isClosed){
		alert("DHTML Window has been closed, so no window to load contents into. Open/Create the window again.")
		return
	}
	var contenttype=contenttype.toLowerCase() //convert string to lower case
	if (typeof title!="undefined")
		t.handle.firstChild.nodeValue=title
	if (contenttype=="inline")
		t.contentarea.innerHTML=contentsource
	else if (contenttype=="div"){
		var inlinedivref=document.getElementById(contentsource)
		t.contentarea.innerHTML=(inlinedivref.defaultHTML || inlinedivref.innerHTML) //Populate window with contents of inline div on page
		if (!inlinedivref.defaultHTML)
			inlinedivref.defaultHTML=inlinedivref.innerHTML //save HTML within inline DIV
		inlinedivref.innerHTML="" //then, remove HTML within inline DIV (to prevent duplicate IDs, NAME attributes etc in contents of DHTML window
		inlinedivref.style.display="none" //hide that div
	}
	else if (contenttype=="iframe"){
		t.contentarea.style.overflow="hidden" //disable window scrollbars, as iframe already contains scrollbars
		if (!t.contentarea.firstChild || t.contentarea.firstChild.tagName!="IFRAME") //If iframe tag doesn't exist already, create it first
			t.contentarea.innerHTML='<iframe src="" frameborder=0 style="margin:0; padding:0; width:100%; height: 100%" name="_iframe-'+t.id+'"></iframe>'
		window.frames["_iframe-"+t.id].location.replace(contentsource) //set location of iframe window to specified URL
		}
	else if (contenttype=="ajax"){
		this.ajax_connect(contentsource, t) //populate window with external contents fetched via Ajax
	}
	t.contentarea.datatype=contenttype //store contenttype of current window for future reference
},

setupdrag:function(e){
	var d=dhtmlwindow //reference dhtml window object
	var t=this._parent //reference dhtml window div
	d.etarget=this //remember div mouse is currently held down on ("handle" or "resize" div)
	var e=window.event || e
	d.initmousex=e.clientX //store x position of mouse onmousedown
	d.initmousey=e.clientY
	d.initx=parseInt(t.offsetLeft) //store offset x of window div onmousedown
	d.inity=parseInt(t.offsetTop)
	d.width=parseInt(t.offsetWidth) //store width of window div
	d.contentheight=parseInt(t.contentarea.offsetHeight) //store height of window div's content div
	if (t.contentarea.datatype=="iframe"){ //if content of this window div is "iframe"
		t.style.backgroundColor="#F8F8F8" //colorize and hide content div (while window is being dragged)
		t.contentarea.style.visibility="hidden"
	}
	document.onmousemove=d.getdistance //get distance travelled by mouse as it moves
	document.onmouseup=function(){
		if (t.contentarea.datatype=="iframe"){ //restore color and visibility of content div onmouseup
			t.contentarea.style.backgroundColor="white"
			t.contentarea.style.visibility="visible"
		}
		d.stop()
	}
	return false
},

getdistance:function(e){
	var d=dhtmlwindow
	var etarget=d.etarget
	var e=window.event || e
	d.distancex=e.clientX-d.initmousex //horizontal distance travelled relative to starting point
	d.distancey=e.clientY-d.initmousey
	if (etarget.className=="drag-handle") //if target element is "handle" div
		d.move(etarget._parent, e)
	else if (etarget.className=="drag-resizearea") //if target element is "resize" div
		d.resize(etarget._parent, e)
	return false //cancel default dragging behavior
},

getviewpoint:function(){ //get window viewpoint numbers
	var ie=document.all && !window.opera
	var domclientWidth=document.documentElement && parseInt(document.documentElement.clientWidth) || 100000 //Preliminary doc width in non IE browsers
	this.standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body //create reference to common "body" across doctypes
	this.scroll_top=(ie)? this.standardbody.scrollTop : window.pageYOffset
	this.scroll_left=(ie)? this.standardbody.scrollLeft : window.pageXOffset
	this.docwidth=(ie)? this.standardbody.clientWidth : (/Safari/i.test(navigator.userAgent))? window.innerWidth : Math.min(domclientWidth, window.innerWidth-16)
	this.docheight=(ie)? this.standardbody.clientHeight: window.innerHeight
},

rememberattrs:function(t){ //remember certain attributes of the window when it's minimized or closed, such as dimensions, position on page
	this.getviewpoint() //Get current window viewpoint numbers
	t.lastx=parseInt((t.style.left || t.offsetLeft))-dhtmlwindow.scroll_left //store last known x coord of window just before minimizing
	t.lasty=parseInt((t.style.top || t.offsetTop))-dhtmlwindow.scroll_top
	t.lastwidth=parseInt(t.style.width) //store last known width of window just before minimizing/ closing
},

move:function(t, e){
	t.style.left=dhtmlwindow.distancex+dhtmlwindow.initx+"px"
	t.style.top=dhtmlwindow.distancey+dhtmlwindow.inity+"px"
},

resize:function(t, e){
	t.style.width=Math.max(dhtmlwindow.width+dhtmlwindow.distancex, 150)+"px"
	t.contentarea.style.height=Math.max(dhtmlwindow.contentheight+dhtmlwindow.distancey, 100)+"px"
},

enablecontrols:function(e){
	var d=dhtmlwindow
	var sourceobj=window.event? window.event.srcElement : e.target //Get element within "handle" div mouse is currently on (the controls)
	if (/Minimize/i.test(sourceobj.getAttribute("title"))) //if this is the "minimize" control
		d.minimize(sourceobj, this._parent)
	else if (/Restore/i.test(sourceobj.getAttribute("title"))) //if this is the "restore" control
		d.restore(sourceobj, this._parent)
	else if (/Close/i.test(sourceobj.getAttribute("title"))) //if this is the "close" control
		d.close(this._parent)
	return false
},

minimize:function(button, t){
	dhtmlwindow.rememberattrs(t)
	button.setAttribute("src", dhtmlwindow.imagefiles[2])
	button.setAttribute("title", "Restore")
	t.state="minimized" //indicate the state of the window as being "minimized"
	t.contentarea.style.display="none"
	t.statusarea.style.display="none"
	if (typeof t.minimizeorder=="undefined"){ //stack order of minmized window on screen relative to any other minimized windows
		dhtmlwindow.minimizeorder++ //increment order
		t.minimizeorder=dhtmlwindow.minimizeorder
	}
	t.style.left="10px" //left coord of minmized window
	t.style.width="200px"
	var windowspacing=t.minimizeorder*10 //spacing (gap) between each minmized window(s)
	t.style.top=dhtmlwindow.scroll_top+dhtmlwindow.docheight-(t.handle.offsetHeight*t.minimizeorder)-windowspacing+"px"
},

restore:function(button, t){
	dhtmlwindow.getviewpoint()
	button.setAttribute("src", dhtmlwindow.imagefiles[0])
	button.setAttribute("title", "Minimize")
	t.state="fullview" //indicate the state of the window as being "fullview"
	t.style.display="block"
	t.contentarea.style.display="block"
	if (t.resizeBool) //if this window is resizable, enable the resize icon
		t.statusarea.style.display="block"
	t.style.left=parseInt(t.lastx)+dhtmlwindow.scroll_left+"px" //position window to last known x coord just before minimizing
	t.style.top=parseInt(t.lasty)+dhtmlwindow.scroll_top+"px"
	t.style.width=parseInt(t.lastwidth)+"px"
},


close:function(t){
	try{
		qsValue = GetQueryString("qsValue", window.frames["_iframe-"+t.id].location);		
		
		if ( qsValue.indexOf("WishList") != -1 )
			parent.location.reload();
		
		var closewinbol=t.onclose()
	}
	catch(err){ //In non IE browsers, all errors are caught, so just run the below
		var closewinbol=true
 }
	finally{ //In IE, not all errors are caught, so check if variable isn't defined in IE in those cases
		if (typeof closewinbol=="undefined"){
			alert("An error has occured somwhere inside your \"onclose\" event handler")
			var closewinbol=true
		}
	}
	if (closewinbol){ //if custom event handler function returns true
		if (t.state!="minimized") //if this window isn't currently minimized
			dhtmlwindow.rememberattrs(t) //remember window's dimensions/position on the page before closing
		if (window.frames["_iframe-"+t.id]) //if this is an IFRAME DHTML window
			window.frames["_iframe-"+t.id].location.replace("about:blank")
		else
			t.contentarea.innerHTML=""
		t.style.display="none"
		t.isClosed=true //tell script this window is closed (for detection in t.show())
	}
	return closewinbol
},


setopacity:function(targetobject, value){ //Sets the opacity of targetobject based on the passed in value setting (0 to 1 and in between)
	if (!targetobject)
		return
	if (targetobject.filters && targetobject.filters[0]){ //IE syntax
		if (typeof targetobject.filters[0].opacity=="number") //IE6
			targetobject.filters[0].opacity=value*100
		else //IE 5.5
			targetobject.style.filter="alpha(opacity="+value*100+")"
		}
	else if (typeof targetobject.style.MozOpacity!="undefined") //Old Mozilla syntax
		targetobject.style.MozOpacity=value
	else if (typeof targetobject.style.opacity!="undefined") //Standard opacity syntax
		targetobject.style.opacity=value
},

setfocus:function(t){ //Sets focus to the currently active window
	this.zIndexvalue++
	t.style.zIndex=this.zIndexvalue
	t.isClosed=false //tell script this window isn't closed (for detection in t.show())
	this.setopacity(this.lastactivet.handle, 0.5) //unfocus last active window
	this.setopacity(t.handle, 1) //focus currently active window
	this.lastactivet=t //remember last active window
},


show:function(t){
	if (t.isClosed){
		alert("DHTML Window has been closed, so nothing to show. Open/Create the window again.")
		return
	}
	if (t.lastx) //If there exists previously stored information such as last x position on window attributes (meaning it's been minimized or closed)
		dhtmlwindow.restore(t.controls.firstChild, t) //restore the window using that info
	else
		t.style.display="block"
	this.setfocus(t)
	t.state="fullview" //indicate the state of the window as being "fullview"
},

hide:function(t){
	t.style.display="none"
},

ajax_connect:function(url, t){
	var page_request = false
	var bustcacheparameter=""
	if (window.XMLHttpRequest) // if Mozilla, IE7, Safari etc
		page_request = new XMLHttpRequest()
	else if (window.ActiveXObject){ // if IE6 or below
		try {
		page_request = new ActiveXObject("Msxml2.XMLHTTP")
		} 
		catch (e){
			try{
			page_request = new ActiveXObject("Microsoft.XMLHTTP")
			}
			catch (e){}
		}
	}
	else
		return false
	t.contentarea.innerHTML=this.ajaxloadinghtml
	page_request.onreadystatechange=function(){dhtmlwindow.ajax_loadpage(page_request, t)}
	if (this.ajaxbustcache) //if bust caching of external page
		bustcacheparameter=(url.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime()
	page_request.open('GET', url+bustcacheparameter, true)
	page_request.send(null)
},

ajax_loadpage:function(page_request, t){
	if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1)){
	t.contentarea.innerHTML=page_request.responseText
	}
},


stop:function(){
	dhtmlwindow.etarget=null //clean up
	document.onmousemove=null
	document.onmouseup=null
},

addEvent:function(target, functionref, tasktype){ //assign a function to execute to an event handler (ie: onunload)
	var tasktype=(window.addEventListener)? tasktype : "on"+tasktype
	if (target.addEventListener)
		target.addEventListener(tasktype, functionref, false)
	else if (target.attachEvent)
		target.attachEvent(tasktype, functionref)
},

cleanup:function(){
	for (var i=0; i<dhtmlwindow.tobjects.length; i++){
		dhtmlwindow.tobjects[i].handle._parent=dhtmlwindow.tobjects[i].resizearea._parent=dhtmlwindow.tobjects[i].controls._parent=null
	}
	window.onload=null
}

} //End dhtmlwindow object

document.write('<div id="dhtmlwindowholder"><span style="display:none">.</span></div>') //container that holds all dhtml window divs on page
window.onunload=dhtmlwindow.cleanup


// -------------------------------------------------------------------
// DHTML Modal window- By Dynamic Drive, available at: http://www.dynamicdrive.com
// v1.0: Script created Feb 27th, 07'
// v1.01 May 5th, 07' Minor change to modal window positioning behavior (not a bug fix)
// v1.1: April 16th, 08' Brings it in sync with DHTML Window widget. See changelog.txt for the later for changes.
// REQUIRES: DHTML Window Widget (v1.01 or higher): http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow/
// -------------------------------------------------------------------

if (typeof dhtmlwindow=="undefined")
alert('ERROR: Modal Window script requires all files from "DHTML Window widget" in order to work!')

var dhtmlmodal={
veilstack: 0,
open:function(t, contenttype, contentsource, title, attr, recalonload){
	var d=dhtmlwindow //reference dhtmlwindow object
	this.interVeil=document.getElementById("interVeil") //Reference "veil" div
	this.veilstack++ //var to keep track of how many modal windows are open right now
	this.loadveil()
	if (recalonload=="recal" && d.scroll_top==0)
		d.addEvent(window, function(){dhtmlmodal.adjustveil()}, "load")
	var t=d.open(t, contenttype, contentsource, title, attr, recalonload)
	t.controls.firstChild.style.display="none" //Disable "minimize" button
	t.controls.onclick=function(){dhtmlmodal.close(this._parent, true)} //OVERWRITE default control action with new one
	t.show=function(){dhtmlmodal.show(this)} //OVERWRITE default t.show() method with new one
	t.hide=function(){dhtmlmodal.close(this)} //OVERWRITE default t.hide() method with new one
return t
},


loadveil:function(){
	var d=dhtmlwindow
	d.getviewpoint()
	this.docheightcomplete=(d.standardbody.offsetHeight>d.standardbody.scrollHeight)? d.standardbody.offsetHeight : d.standardbody.scrollHeight
	this.interVeil.style.width=d.docwidth+"px" //set up veil over page
	this.interVeil.style.height=this.docheightcomplete+"px" //set up veil over page
	this.interVeil.style.left=0 //Position veil over page
	this.interVeil.style.top=0 //Position veil over page
	this.interVeil.style.visibility="visible" //Show veil over page
	this.interVeil.style.display="block" //Show veil over page
},

adjustveil:function(){ //function to adjust veil when window is resized
	if (this.interVeil && this.interVeil.style.display=="block") //If veil is currently visible on the screen
		this.loadveil() //readjust veil
},

closeveil:function(){ //function to close veil
	this.veilstack--
	if (this.veilstack==0) //if this is the only modal window visible on the screen, and being closed
		this.interVeil.style.display="none"
},


close:function(t, forceclose){ //DHTML modal close function
	t.contentDoc=(t.contentarea.datatype=="iframe")? window.frames["_iframe-"+t.id].document : t.contentarea //return reference to modal window DIV (or document object in the case of iframe
	if (typeof forceclose!="undefined")
		t.onclose=function(){return true}
	if (dhtmlwindow.close(t)) //if close() returns true
		this.closeveil()
},


show:function(t){
	dhtmlmodal.veilstack++
	dhtmlmodal.loadveil()
	dhtmlwindow.show(t)
}
} //END object declaration


document.write('<div id="interVeil"></div>')
dhtmlwindow.addEvent(window, function(){if (typeof dhtmlmodal!="undefined") dhtmlmodal.adjustveil()}, "resize")


//Used to set the hiddenfield 'hidCurrentFlyOutId' value to current menu item collectionID.
function MenuItemsMouseOver(id) {
    document.getElementById(hidCurrentFlyOutId).value = id;
}


var initLiveBasket = false;
//This variable is used to enable and disable the live basket
var liveBasketEnabled = true;

/*Live Basket*/
function aspxCustomPagerClickPrevious() {
    var inputElement = dv.GetPageIndexInputElement();
    //Previous Button
    if (inputElement.value != 0) {
        aspxDVPagerClick(ASPxDataView1, 'PBP');

        if (basketCarousel.cpPageCount <= (parseInt(inputElement.value)))
            document.getElementById('basketNextBtn').setAttribute('src', '../modules/moduleHeaderNew1980/images/NextBtnDisabled.gif');
        else
            document.getElementById('basketNextBtn').setAttribute('src', '../modules/moduleHeaderNew1980/images/NextBtn.gif');
        if ((parseInt(inputElement.value) - 1) == 0)
            document.getElementById('basketPrevBtn').setAttribute('src', '../modules/moduleHeaderNew1980/images/PrevBtnDisabled.gif');
        else
            document.getElementById('basketPrevBtn').setAttribute('src', '../modules/moduleHeaderNew1980/images/PrevBtn.gif');
    }

}

function aspxCustomPagerClickNext() {
    var inputElement = dv.GetPageIndexInputElement();
    //Next Button
    if (basketCarousel.cpPageCount != (parseInt(inputElement.value) + 1)) {
        aspxDVPagerClick(ASPxDataView1, 'PBN');

        if (basketCarousel.cpPageCount <= (parseInt(inputElement.value) + 2))
            document.getElementById('basketNextBtn').setAttribute('src', '../modules/moduleHeaderNew1980/images/NextBtnDisabled.gif');
        else
            document.getElementById('basketNextBtn').setAttribute('src', '../modules/moduleHeaderNew1980/images/NextBtn.gif');
        if ((parseInt(inputElement.value) + 1) == 0)
            document.getElementById('basketPrevBtn').setAttribute('src', '../modules/moduleHeaderNew1980/images/PrevBtnDisabled.gif');
        else
            document.getElementById('basketPrevBtn').setAttribute('src', '../modules/moduleHeaderNew1980/images/PrevBtn.gif');
    }
}

//Performs panel callback inorder to remove an item from cart
function RemoveItemFromCart(productRef, productSize, quantity) {
    if (liveBasketEnabled) {
        if (!initLiveBasket)
            initLiveBasket = true;
        cartPanel.PerformCallback("Remove;" + productRef + ";" + productSize);
        //-- Update the No of Items in Cart (top of page) --//
        var spanItemsInCart = document.getElementById('spanItemsInCart');
        if (spanItemsInCart == null)
            spanItemsInCart = parent.document.getElementById('spanItemsInCart');

        var noOfItemsInCart = parseInt(spanItemsInCart.innerHTML) - parseInt(quantity);
        spanItemsInCart.innerHTML = noOfItemsInCart;

        var dv = aspxGetControlCollection().Get(ASPxDataView1);
        var inputElement = dv.GetPageIndexInputElement();

        removeItem = true;
    }
}

//Checks whether a variable is defined
function isdefined(variable) {
    return (typeof (window[variable]) == "undefined") ? false : true;
}

//Updates live cart with the newly added product
function AddToLiveCart() {
    if (liveBasketEnabled) {
        if (!initLiveBasket)
            initLiveBasket = true;
        if (isdefined('cartPanel')) {
            if (cartPanel != null)
                cartPanel.PerformCallback('Add;');
        }
    }
}

//Checks the visibilty of div 'BasketContent'. If visibility is 'hidden', hide Cart.
function CheckVisibility(BasketContent) {
    if (document.getElementById(BasketContent).style.visibility == 'hidden')
        setTimeout('cartPopup.Hide()', 500);
}

//Called on ASPxDataView Init event
function ASPxDataView_Init() {
    var dv = aspxGetControlCollection().Get(ASPxDataView1);
    var inputElement = dv.GetPageIndexInputElement();

    /*Check Previous Button*/
    if (inputElement != null) {
        if (inputElement.value != 0)
            document.getElementById('basketPrevBtn').setAttribute('src', '../modules/moduleHeaderNew1980/images/PrevBtn.gif');
        else
            document.getElementById('basketPrevBtn').setAttribute('src', '../modules/moduleHeaderNew1980/images/PrevBtnDisabled.gif');

        /*Check Next Button*/
        if (basketCarousel.cpPageCount != (parseInt(inputElement.value) + 1))
            document.getElementById('basketNextBtn').setAttribute('src', '../modules/moduleHeaderNew1980/images/NextBtn.gif');
        else
            document.getElementById('basketNextBtn').setAttribute('src', '../modules/moduleHeaderNew1980/images/NextBtnDisabled.gif');

        if (parseInt(basketCarousel.cpItemCount) >= 3) {
            document.getElementById(ASPxDataView1).style.height = '310px';
        }
    }

}
/*Live Basket*/


function ModuleNoFlashScrollSetTimer(onOrOff, imgID)
{

	$.imgpreload(['http://media.theseus.cataloguesolutions.com/Repository/1821191991/repository/1.jpg','http://media.theseus.cataloguesolutions.com/Repository/1821191991/repository/2.jpg','http://media.theseus.cataloguesolutions.com/Repository/1821191991/repository/3.jpg','http://media.theseus.cataloguesolutions.com/Repository/1821191991/repository/4.jpg','http://media.theseus.cataloguesolutions.com/Repository/1821191991/repository/5.jpg'],function()
	{
		if (onOrOff == "true")
		{
			startTimer = 'true';
			ModuleNoFlashScrollStartTimer(imgID);		
		}	
	});
		
}


function ModuleNoFlashScrollStartTimer(imgID)
{

	if (startTimer == "true")
	{
		ModuleNoFlashScrollShowNext(imgID, true);
		timerModuleNoFlashScroll = setTimeout("ModuleNoFlashScrollStartTimer('" + imgID + "');", 4000);
	}
	else
		clearTimeout(timerModuleNoFlashScroll);
		
}


function ModuleNoFlashScrollChangeClass(which, divID)
{
	if (which == "on")
		$("#" + divID).attr("class", "divNumberOn");
	else
		$("#" + divID).attr("class", "divNumber");
}


function ModuleNoFlashScrollShow(whichOne, imgID)
{

	startTimer = 'false';
	startLeft = 200;

	if (whichOne > noFlashScrollPointer)
		startLeft = 200;
	else if (whichOne < noFlashScrollPointer)
		startLeft = -200;

    $("#" + imgID).ImageSwitch({ Type: "FlyIn", Speed: 500, StartLeft: startLeft, NewImage: noFlashScrollArray[whichOne] });
	
	/*Fix for IE7 - BUG INFO - cannot re-set usemap attribute for img tag*/
	if (getInternetExplorerVersion() == 7)
	    document.getElementById("aNoFlashScrollLink").innerHTML = "<img src=\"" + noFlashScrollArray[whichOne] + "\" id=\"imgNoFlashScroll_NOFL\" usemap=\"#imgMapNoFlashScroll1980-" + noFlashScrollArrayIDs[whichOne] + "\">";
	else
	    $("#" + imgID).attr("usemap", "#imgMapNoFlashScroll1980-" + noFlashScrollArrayIDs[whichOne]);
	    
	noFlashScrollPointer = whichOne;
	
	if (parseInt(noFlashScrollPointer) + 1 == noFlashScrollLength)
		noFlashScrollPointer = -1;

}


function ModuleNoFlashScrollShowPrev(imgID)
{

	startTimer = 'false';
	startLeft = -200;

	if (noFlashScrollPointer == -1)
		noFlashScrollPointer = noFlashScrollLength - 2;
	else if (noFlashScrollPointer == 0)
	{
		startLeft = 200;
		noFlashScrollPointer = noFlashScrollLength - 1;
	}
	else
		noFlashScrollPointer--;

	$("#" + imgID).ImageSwitch({Type:"FlyIn", Speed:500, StartLeft: startLeft, NewImage:noFlashScrollArray[noFlashScrollPointer]});
	$("#aNoFlashScrollLink").attr("href", noFlashScrollArrayLinks[noFlashScrollPointer]);

	/*Fix for IE7 - BUG INFO - cannot re-set usemap attribute for img tag*/
	if (getInternetExplorerVersion() == 7)
	    document.getElementById("aNoFlashScrollLink").innerHTML = "<img src=\"" + noFlashScrollArray[noFlashScrollPointer] + "\" id=\"imgNoFlashScroll_NOFL\" usemap=\"#imgMapNoFlashScroll1980-" + noFlashScrollArrayIDs[noFlashScrollPointer] + "\">";
	else
	    $("#" + imgID).attr("usemap", "#imgMapNoFlashScroll1980-" + noFlashScrollArrayIDs[noFlashScrollPointer]);

	if ((noFlashScrollPointer + 1) == noFlashScrollLength)
		noFlashScrollPointer = -1;
		
}


function ModuleNoFlashScrollShowNext(imgID, automatic)
{

	if (noFlashScrollIsStart != "1")
	{		
	
		if (!automatic)
			startTimer = 'false';		
		
		startLeft = 200;
		
		if (noFlashScrollPointer == -1)
			startLeft = -200;
		
		noFlashScrollPointer++;
		
		$("#" + imgID).ImageSwitch({Type:"FlyIn", Speed:500, StartLeft: startLeft, NewImage:noFlashScrollArray[noFlashScrollPointer]});
		$("#aNoFlashScrollLink").attr("href", noFlashScrollArrayLinks[noFlashScrollPointer]);

		/*Fix for IE7 - BUG INFO - cannot re-set usemap attribute for img tag*/
		if (getInternetExplorerVersion() == 7)
	        document.getElementById("aNoFlashScrollLink").innerHTML = "<img src=\"" + noFlashScrollArray[noFlashScrollPointer] + "\" id=\"imgNoFlashScroll_NOFL\" usemap=\"#imgMapNoFlashScroll1980-" + noFlashScrollArrayIDs[noFlashScrollPointer] + "\">";
		else
		    $("#" + imgID).attr("usemap", "#imgMapNoFlashScroll1980-" + noFlashScrollArrayIDs[noFlashScrollPointer]);
		
		if ((noFlashScrollPointer + 1) == noFlashScrollLength)
			noFlashScrollPointer = -1;
			
	}
	else
		noFlashScrollIsStart = "0";
			
}

function getInternetExplorerVersion()
{

	var rv = -1; // Return value assumes failure.

	if (navigator.appName == 'Microsoft Internet Explorer')
	{

		var ua = navigator.userAgent;
		var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");

		if (re.exec(ua) != null)
			rv = parseFloat(RegExp.$1);
    }
    
    return rv;

}



/*

Copyright (c) 2009 Dimas Begunoff, http://www.farinspace.com

Licensed under the MIT license
http://en.wikipedia.org/wiki/MIT_License

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

*/

function imgpreload(imgs,settings)
{
	// settings = { each:Function, all:Function }
	if (settings instanceof Function) { settings = {all:settings}; }

	// use of typeof required
	// https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Operators/Special_Operators/Instanceof_Operator#Description
	if (typeof imgs == "string") { imgs = [imgs]; }

	var loaded = [];
	var t = imgs.length;
	var i = 0;

	for (i; i<t; i++)
	{
		var img = new Image();
		$(img).bind("load", null, function()
		{
			loaded.push(this);
			if (settings.each instanceof Function) { settings.each.call(this); }
			if (loaded.length>=t && settings.all instanceof Function) { settings.all.call(loaded); }
		});
		img.src = imgs[i];
	}
}

if (typeof jQuery != "undefined")
{
	(function($){

		// extend jquery (because i love jQuery)
		$.imgpreload = imgpreload;

		// public
		$.fn.imgpreload = function(settings)
		{
			settings = $.extend({},$.fn.imgpreload.defaults,(settings instanceof Function)?{all:settings}:settings);

			this.each(function()
			{
				var elem = this;

				imgpreload($(this).attr('src'),function()
				{
					if (settings.each instanceof Function) { settings.each.call(elem); }
				});
			});

			// declare urls and loop here (loop a second time) to prevent
			// pollution of above closure with unnecessary variables

			var urls = [];

			this.each(function()
			{
				urls.push($(this).attr('src'));
			});

			var selection = this;

			imgpreload(urls,function()
			{
				if (settings.all instanceof Function) { settings.all.call(selection); }
			});

			return this;
		};

		// public
		$.fn.imgpreload.defaults =
		{
			each: null // callback invoked when each image in a group loads
			, all: null // callback invoked when when the entire group of images has loaded
		};

	})(jQuery);
}


function StickyBarShow(type)
{

	//-- If the tab is closed, increase bar height --//
	if ($("#liSticky" + type).attr("class") == "tabClose")
	{

		$(".LastSeenStickyLayer").animate
		(
			{
			   height: '115px'
			}, 700
		);

		$("#imgStickyArrow").attr("src", "/repository/stickyDown.gif");

	}

	//-- If the tab is open, increase bar height is this item is switched off, decrease it if it's on --//
	else
	{

		if ($(".LastSeenStickyLayer").css("height") == "21px")
		{
		
			$(".LastSeenStickyLayer").animate
			(
				{
				   height: '115px'
				}, 700
			);

			$("#imgStickyArrow").attr("src", "/repository/stickyDown.gif");

		}
		else
		{

			$(".LastSeenStickyLayer").animate
			(
				{
				   height: '21px'
				}, 700
			);

			$("#imgStickyArrow").attr("src", "/repository/stickyUp.gif");

		}

	}

	if (type == "LastViewed")
	{
		$("#liStickyLastViewed").removeClass("tabClose");
		$("#liStickyLastViewed").addClass("tabOpen");
		$("#liStickyCart").removeClass("tabOpen");
		$("#liStickyCart").addClass("tabClose");
		$("#divStickyLastViewed").show();
		$("#divStickyCart").hide();
	}
	else
	{
		$("#liStickyCart").removeClass("tabClose");
		$("#liStickyCart").addClass("tabOpen");
		$("#liStickyLastViewed").removeClass("tabOpen");
		$("#liStickyLastViewed").addClass("tabClose");
		$("#divStickyLastViewed").hide();
		$("#divStickyCart").show();
	}

}


function ShowHideStickyBar()
{

	if ($(".LastSeenStickyLayer").css("height") == "21px")
	{
		
		$(".LastSeenStickyLayer").animate
		(
			{
				height: '115px'
			}, 700
		);

		$("#imgStickyArrow").attr("src", "/repository/stickyDown.gif");

	}
	else
	{

		$(".LastSeenStickyLayer").animate
		(
			{
				height: '21px'
			}, 700
		);

		$("#imgStickyArrow").attr("src", "/repository/stickyUp.gif");

	}

	if ($("#liStickyLastViewed").attr("class") == "tabOpen")
	{
		$("#liStickyLastViewed").removeClass("tabClose");
		$("#liStickyLastViewed").addClass("tabOpen");
		$("#liStickyCart").removeClass("tabOpen");
		$("#liStickyCart").addClass("tabClose");
		$("#divStickyLastViewed").show();
		$("#divStickyCart").hide();
	}
	else
	{
		$("#liStickyCart").removeClass("tabClose");
		$("#liStickyCart").addClass("tabOpen");
		$("#liStickyLastViewed").removeClass("tabOpen");
		$("#liStickyLastViewed").addClass("tabClose");
		$("#divStickyLastViewed").hide();
		$("#divStickyCart").show();
	}

}
