var info = new Object()

var gApplication	= getApplication()
var gCurrentBaseId	= ''

window.onresize=redoOverflow
var gDivOverflow = ''

function redoOverflow() {
	if (is_opera || is_nav) {
		try {
			if (gDivOverflow!='') {
				document.getElementById(gDivOverflow).style.display='none'
				reloadOverflowNN (gDivOverflow)
			}
		} catch (e) {}
	}
}

String.prototype.trim = function() {return this.replace(/(^\s*)|(\s*$)/g, "");}
String.prototype.quotapos = function() {return this.replace(/\'/g,"&#39;").replace(/\"/g,'&#34;')}

function GetTime()
{
	var Digital=new Date();
	return Digital.getHours() + ':' + Digital.getMinutes();
}

function Trim(inputString) 
{
   // Removes leading and trailing spaces from the passed string. Also removes
   // consecutive spaces and replaces it with one space. If something besides
   // a string is passed in (null, custom object, etc.) then return the input.
   if (typeof inputString != "string") { return inputString; }
   var retValue = inputString;
   var ch = retValue.substring(0, 1);
   while (ch == " ") { // Check for spaces at the beginning of the string
      retValue = retValue.substring(1, retValue.length);
      ch = retValue.substring(0, 1);
   }
   ch = retValue.substring(retValue.length-1, retValue.length);
   while (ch == " ") { // Check for spaces at the end of the string
      retValue = retValue.substring(0, retValue.length-1);
      ch = retValue.substring(retValue.length-1, retValue.length);
   }
   while (retValue.indexOf("  ") != -1) { // Note that there are two spaces in the string - look for multiple spaces within the string
      retValue = retValue.substring(0, retValue.indexOf("  ")) + retValue.substring(retValue.indexOf("  ")+1, retValue.length); // Again, there are two spaces in each of the strings
   }
   return retValue; // Return the trimmed string back to the user
}

window.offscreenBuffering=true	
// ==========================================================	
// Trouve le Navigator START
// ==========================================================	
    var agt	= navigator.userAgent.toLowerCase();
    var appVer 	= navigator.appVersion.toLowerCase();
    
    var is_konq = false;
    var kqPos   = agt.indexOf('konqueror');
    if (kqPos !=-1) {                 
       is_konq  = true;
       is_minor = parseFloat(agt.substring(kqPos+10,agt.indexOf(';',kqPos)));
       is_major = parseInt(is_minor);
    }                                 

    var is_safari = ((agt.indexOf('safari')!=-1)&&(agt.indexOf('mac')!=-1))?true:false;
    var is_khtml  = (is_safari || is_konq);

    var is_gecko = ((!is_khtml)&&(navigator.product)&&(navigator.product.toLowerCase()=="gecko"))?true:false;
    var is_gver  = 0;
    if (is_gecko) is_gver=navigator.productSub;

    var is_moz   = ((agt.indexOf('mozilla/5')!=-1) && (agt.indexOf('spoofer')==-1) &&
                    (agt.indexOf('compatible')==-1) && (agt.indexOf('opera')==-1)  &&
                    (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1)     &&
                    (is_gecko) && 
                    ((navigator.vendor=="")||(navigator.vendor=="Mozilla")));

    var is_opera = (agt.indexOf("opera") != -1);

    var iePos  = appVer.indexOf('msie');
    var is_ie   = ((iePos!=-1) && (!is_opera) && (!is_khtml));
    var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
                && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1)
                && (!is_khtml) && (!(is_moz)));
	


    var is_ff = (agt.toUpperCase().indexOf('FIREFOX')!=-1)
    if (is_ff) is_nav = false

	var gVersion = 0
	if (is_nav) {
		ls = agt.indexOf("netscape")
		if (ls!=-1) {
			le = agt.indexOf(" ",ls+8)
			gVersion = (le==-1) ? agt.substr(ls+9) : agt.substring(ls+9,le)
			gVersion = returnNo(gVersion)
		}
		if (gVersion >= 8) {
			is_ff = true
			is_nav = false
		}
	}
	
	function returnNo(pVersion) {
		var z = pVersion.trim()
		var xp = z.indexOf('.')
		if (xp!=-1)
			z = z.substr(0,xp+1) + z.substr(xp+1).replace(/\./g,'')
		try {z = Math.abs(z)} catch(e) {z = 0}
		if (isNaN(z)) z = 0
		return z
	}

// ==========================================================	
// Trouve le Navigator END
// ==========================================================	

function reloadOverflowNN (pID) {
	gDivOverflow = pID
	try {
		var oOverflow = document.getElementById(pID)
		oOverflow.style.display = ''
		
		if (is_nav) {
			oOverflow.innerHTML = oOverflow.innerHTML;
		}
		if ((is_moz) || (is_ff)) {
			oOverflow.style.height=1
			var height = oOverflow.offsetParent.offsetHeight
			oOverflow.style.height=height-20
			oOverflow.innerHTML = oOverflow.innerHTML;		
		}
		if (is_opera) {
			var zParentHeight = oOverflow.offsetParent.offsetHeight-80
			var zParentWidth = oOverflow.offsetParent.offsetWidth

			oOverflow.style.height='0'
			//oOverflow.style.width='0'
			
			zHeight = oOverflow.offsetParent.offsetHeight			
			zWidth = oOverflow.offsetParent.offsetWidth			
			
			if (zWidth < 500) zWidth=zParentWidth
			
			if (zHeight<200) {
				o = oOverflow
				zSubtract = o.offsetParent.offsetParent.offsetHeight
				while ((o.parentElement) && (zHeight < 200)) { 
					o = o.parentElement
					zHeight = o.clientHeight
				}
				zHeight = zHeight-zSubtract
			}
			
			if (zHeight< 200) zHeight=200
			if (zWidth < 500) zWidth=500
			
			oOverflow.style.height=zHeight
			// oOverflow.style.width=zWidth
		}

	} catch(e) {}
}
function getWindowDetails(pWindow) {
	var win = pWindow
	var obj = new Object()
	
	obj.left	= 0
	obj.top		= 0
	obj.height	= 500
	obj.width	= 750

	if (is_ie) {
		try {obj.left	= win.screenLeft} catch (e) {}
		try {obj.top	= win.screenTop} catch (e) {}
		try {obj.height	= win.document.body.clientHeight} catch (e) {}
		try {obj.width	= win.document.body.clientWidth} catch (e) {}
	} else {
		try {obj.left	= win.screenX+(win.outerWidth-win.innerWidth)-4;} catch (e) {}
		try {obj.top	= win.screenY+(win.outerHeight-24-win.innerHeight)+2;} catch (e) {}
		try {obj.height	= win.innerHeight-0} catch (e) {}
		try {obj.width	= win.innerWidth-0} catch (e) {}
	}
	return obj
}
function encodeUtf8(pText) {
	var zRes   = ''	
	var zInput = pText

	for (var i=0; i < zInput.length;i++) {
		var zChar = zInput.substr(i,1)
		var c = zChar.charCodeAt(0)
		if (c <= 0x7F) {
			zRes += zChar
		} else {
			if (c <= 0x7FF) {
				// Had used escape(String.fromCharCode()), but escape wouldn't translate ABC to % equiv
				zRes += translateToHex(0xC0 | (c >> 6))
				zRes += translateToHex(0x80 | (c & 0x3F))
			} else {
				zRes += translateToHex(0xE0 | (c >> 12))
				zRes += translateToHex(0x80 | ((c >> 6) & 0x3F))
				zRes += translateToHex(0x80 | (c & 0x3F))
			}
		}			
	}
	return zRes;
}
function translateToHex(pInt) {
	var nos = new Array(pInt >> 4,pInt & 15)	// Left and right bits
	for (var i=0;i<nos.length;i++) if (nos[i] >= 10) nos[i] = String.fromCharCode(nos[i]+55);
	return "%" + nos[0] + nos[1]
}



function encode64(input) {
   var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
   var output = "";
   var chr1, chr2, chr3;
   var enc1, enc2, enc3, enc4;
   var i = 0;

   do {
      chr1 = input.charCodeAt(i++);
      chr2 = input.charCodeAt(i++);
      chr3 = input.charCodeAt(i++);

      enc1 = chr1 >> 2;
      enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
      enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
      enc4 = chr3 & 63;

      if (isNaN(chr2)) {
         enc3 = enc4 = 64;
      } else if (isNaN(chr3)) {
         enc4 = 64;
      }

      output = output + keyStr.charAt(enc1) + keyStr.charAt(enc2) + 
         keyStr.charAt(enc3) + keyStr.charAt(enc4);
   } while (i < input.length);
   
   return output;
}

function decode64(input) {
   var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
   var output = "";
   var chr1, chr2, chr3;
   var enc1, enc2, enc3, enc4;
   var i = 0;

   // remove all characters that are not A-Z, a-z, 0-9, +, /, or =
   input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");

   do {
      enc1 = keyStr.indexOf(input.charAt(i++));
      enc2 = keyStr.indexOf(input.charAt(i++));
      enc3 = keyStr.indexOf(input.charAt(i++));
      enc4 = keyStr.indexOf(input.charAt(i++));

      chr1 = (enc1 << 2) | (enc2 >> 4);
      chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
      chr3 = ((enc3 & 3) << 6) | enc4;

      output = output + String.fromCharCode(chr1);

      if (enc3 != 64) {
         output = output + String.fromCharCode(chr2);
      }
      if (enc4 != 64) {
         output = output + String.fromCharCode(chr3);
      }
   } while (i < input.length);

   return output;
}

function debugToWindow(pText) {
	var z = window.open("")
	z.document.write(pText)
}

function RecordISOImportFrame() {
	var oProfCmd = window.external.PopIntf('ProfCmd')
	var o = frmISO.document.body

	try {
		var oPre = o.getElementsByTagName('PRE')
		zUnimarc = oPre[0].innerText
	} catch (e) {
		var zUnimarc = o.innerText
	}
	if (zUnimarc.substr(0,13)=='base64Binary:') {
  		zUnimarc = decode64(zUnimarc.substr(13))
	}
	oProfCmd.Push('UNIMARC',zUnimarc)
	
	if (PaprikaMenu.authority=='T') oProfCmd.Call('IMPORTAUTH')
	else oProfCmd.Call('IMPORT')
}
/* Si on peut utiliser HttpRequest - Tester et ça marche bien! */
/*
function RecordISOImportHttpReq(pURL) {
	var zUnimarc = ''
	var oProfCmd = window.external.PopIntf('ProfCmd')

	zUnimarc = xmlHttpCallSync(pURL)
	if (zUnimarc.substr(0,13)=='base64Binary:') {
  		zUnimarc = decode64(zUnimarc.substr(13))
	}
	oProfCmd.Push('UNIMARC',zUnimarc)
	
	if (PaprikaMenu.authority=='T') oProfCmd.Call('IMPORTAUTH')
	else oProfCmd.Call('IMPORT')
}
*/
function ProfCmd(pFunction,pNN) {
	var oProfCmd = window.external.PopIntf('ProfCmd')
	
	switch (pFunction) {
	case 'Import':
		date = new Date();
		if (PaprikaMenu.authority=='T') {
			zURL = 	'RecordAuthISO?XFile=Record' +
					'&Original=T'+
					'&Authority=T'+
					'&Keys1='+PaprikaMenu.documentID+
					'&Use1='+PaprikaMenu.use+
					'&DataBaseNames='+PaprikaMenu.databaseName+
					'&DataBaseID='+PaprikaMenu.databaseID+
					'&Time='+date.getTime()+
					'&Encoding=base64Binary'
		} else {
			zURL = 	'RecordIso?XFile=Record' +
					'&ResultSetName='+PaprikaMenu.resultSetName+
					'&ResultSetType='+PaprikaMenu.resultSetType+
					'&Original=T'+
					'&Index='+PaprikaMenu.index+
					'&LastNN='+pNN+
					'&NN='+pNN+
					'&Time='+date.getTime()+
					'&Encoding=base64Binary'
		}
		/* Use either the RecordISOImportHttpReq OR IFrame onload() */
		//RecordISOImportHttpReq(zURL)
		var oDIV = document.getElementById('RecordISO')
		oDIV.innerHTML = '<iframe onload="RecordISOImportFrame()" name="frmISO" id="frmISO" src="'+zURL+'"></iframe>'
	
		break;
	default:	
		if (pNN!='') oProfCmd.Push('NN',pNN)
		var oFunction = oProfCmd.Call(pFunction.toUpperCase())
	
		try {
			if (window.parent.fraCenter.XW_GlobalVar_RecordDetail=='T') 
				window.parent.fraCenter.Refresh();		
		} catch (e) {}
		break;
	}
}

function getStyleValue(pClass, pAttribute) {
    var zRetValue = '';
    try {
		if (document.styleSheets.length == 0) return zRetValue;

		var zClass = pClass.toUpperCase();
		var zRules = 'rules';
		if (document.styleSheets[0].cssRules) zRules = 'cssRules';

    
		for(var j=0;j< document.styleSheets.length;j++)
		{
			var objStyle = document.styleSheets[j];
			for(var i=0;i< eval('objStyle.' + zRules + '.length');i++)
			{
				var zStyleClass = eval('objStyle.' + zRules + '[' + i + '].selectorText');
				var zTest = zStyleClass.toUpperCase()
				if (zTest == zClass) {
					var zAttrValue = eval('objStyle.' + zRules + '[' + i + '].style.' + pAttribute)
					if (zAttrValue) {if (zAttrValue != '') zRetValue = zAttrValue;}
				}
			}
		}
    } catch (e) {}
    return zRetValue;
}

var gButtonType = "FirstTime"
function getButtonType() {
	// We create an extra layer, so that getButtonTypeA is always called in the same
	// way - directly or with re-passed arguments
	
	return getButtonTypeA(getButtonType.arguments) 
	
}
function getButtonTypeA() {
	var args = getButtonTypeA.arguments[0]

	// Get from Variable
	// -----------------
	var zButtonType = ""
	if (gButtonType!='FirstTime') return gButtonType
	
	// Get from Skin Name
	// ------------------
	for (var i=0;i<args.length;i++) {
		if (args[i].substr(0,3)=='BTT') {
			zButtonType = args[i].substr(3)
			break;
		}
	}
	gButtonType = zButtonType.toUpperCase().substr(3,3)
	if (gButtonType=='STD') return gButtonType

	// Get from CSS
	// ------------
	try {gButtonType = eval(getStyleValue('DKButtonType','content'))} catch (e) {}
	//try {gButtonType = eval(parent.parent.getStyleValue('DKButtonType','content'))} catch (e) {}
	//try {gButtonType = eval(opener.parent.parent.getStyleValue('DKButtonType','content'))} catch (e) {}
	return gButtonType
}

var gNumberOfButtons = 0
function buttonTopCreate() {

	var args = buttonTopCreate.arguments
	zButtonType = getButtonTypeA(args)

	switch (zButtonType) {
	case 'STD':	
		buttonCreateSTD(args)
		break;
	default:
		buttonCreateImg(args)
		break;
	}
}
function buttonCreateImg() {
	var zHint			= ''
	var zAction			= ''
	var zID				= ''
	var zTSE			= ''
	var zOnMouseOut		= ''
	var zOnMouseOver	= ''
	var zImagesPath		= ''
	var zImageName		= ''
	var zLang			= ''
	var zStyle			= ''
	var zHTML			= ''
				 
	var args=buttonCreateImg.arguments[0]
	for (var i=0;i<args.length;i++) {
		var z = args[i]
		zName = z.substr(0,3)
		zValue = z.substr(3)
		if (zValue!='') {
			switch(zName) {
			case 'ACT'	:	zAction		= zValue; break;
			case 'TSE'	:	zTSE		= zValue; break;
			case 'HNT'	:	zHint		= zValue; break;
			case 'NAM'	:	zID			= zValue; break;
			case 'MOV'	:	zOnMouseOver= zValue; break;
			case 'MOU'	:	zOnMouseOut	= zValue; break;
			case 'IMG'	:	zImagesPath	= zValue; break;
			case 'IMN'	:	zImageName	= zValue; break;
			case 'LNG'	:	zLang		= zValue; break;
			case 'CSS'	:	zStyle		= zValue; break;
			default: break;
			} 
		}
	}
	if (zLang!='') {
		zHTML += '<A href="'+zAction+'" title="'+zHint+'" id="'+zID+'"'
		if (zTSE!='T') {
			zHTML += ' onmouseout="'+zOnMouseOut+'" onmouseover="'+zOnMouseOver+'window.status=\' \';return true"' 
		}
		zHTML += '>'
		zHTML +=	'<IMG style="'+zStyle+'" border="0" src="'+zImagesPath+zLang+'/'+zImageName+'"/>'
		zHTML += '</A>'
	} else {
		zHTML += '<A href="'+zAction+'" title="'+zHint+'" id="'+zID+'" xonmouseout="'+zOnMouseOut+'" xonmouseover="'+zOnMouseOver+'window.status=\' \';return true">'
		zHTML += '<IMG style="'+zStyle+'" border="0" src="'+zImagesPath+zImageName+'"/>'
		zHTML += '</A>'
	}
	document.write(zHTML)
}
function buttonCreate() {
	// 	Button Path			BTN	Images/Button
	// 	Button Type			BTT	PPK
	//	Status				STA	Dis, Hidd, 
	//	Effect				EFF	T, F
	//	TSE					TSE T, F
	//	Image Before		IMB	a1.gif
	//	Image Before		IMB	a2.gif
	//	.
	//	Caption				CAP	some text
	//	Hint				HNT	a hint
	//	Image After			IMA	a1.gif
	//	Image After			IMA	a2.gif
	//	.
	//	Width				WID	345
	//	Action				ACT	DoSomething()

	var args = buttonCreate.arguments

	zButtonType = getButtonTypeA(args)

	switch (zButtonType) {
	case 'STD':	
		buttonCreateSTD(args)
		break;
	default:
		buttonCreateDefault(args)
		break;
	}
}
function buttonCreateDefault() {
	var zButtonType		= 'PPK'
	var zButtonPath		= ''
	var zButton			= ''
	var zImagesPath		= ''
	var zID				= ''
	var zLabel			= ''
	var zStatus			= ''
	var zEffect			= 'T'
	var zImagesBefore 	= new Array
	var zImagesAfter	= new Array
	var zCaption		= ''
	var zTSE			= 'F'
	var zHint			= ''
	var zWidth			= 1
	var zHeight			= 27
	var zAction			= ''
	var zClass			= ''
	var zStyle			= ''
				 
	var args=buttonCreateDefault.arguments[0]
	for (var i=0;i<args.length;i++) {
		var z = args[i]
		zName = z.substr(0,3)
		zValue = z.substr(3)
		if (zValue!='') {
			switch(zName) {
			case 'BTN': zButton		= zValue; break;
			case 'NAM': zID			= zValue; break;
			case 'TSE': zTSE		= zValue; break;
			case 'LAB': zLabel		= zValue; break;
			case 'IMG': zImagesPath	= zValue; break;
			case 'STA': zStatus		= zValue; break;
			case 'EFF': zEffect		= zValue; break;
			case 'CAP': zCaption	= zValue; break;
			case 'HNT': zHint		= zValue; break;
			case 'WID': zWidth		= zValue; break;
			case 'HGT': zHeight		= zValue; break;
			case 'ACT': zAction		= zValue; break;
			case 'CSS': zStyle		= zValue; break;
			case 'IMB': zImagesBefore[zImagesBefore.length] = zValue; break;
			case 'IMA': zImagesAfter[zImagesAfter.length] 	= zValue; break;
			default: break;
			} 
		}
	}
	zButtonPath = zButton
	if (zButton.substr(zButton.length-1,1)!='/')
		zButtonPath += "/"

	var zHTML = ""
	// Draw the button now
	if (document.BTT) zButtonType=document.BTT; 

	if (zTSE=='T') zEffect='F'

	var zBAction = ""
	var zBTitle = ""
	var zBMouseAction = ''
	var zBLeft = ''
	var zBRight = ''
	var zBackGround = ''
	var zBCaption = ''
	var zBImagesBefore = ''
	var zBImagesAfter = ''
	var zBClass = ''
					
	switch (zStatus) {
	case 'Dis':
		zBClass = "btn_dis"
		zBTitle =' title="'+zHint.quotapos()+'"'
		zBLeft = '<IMG border="0" id="BtnLeft" src="'+zImagesPath+zButtonPath+'btnl_dis.gif"/>'
		zBRight = '<IMG border="0" id="BtnLeft" src="'+zImagesPath+zButtonPath+'btnr_dis.gif"/>'
		zBackGround=' background="'+zImagesPath+zButtonPath+'btnc_dis.gif"'
		zBCaption = '<span class="btnTxt_dis">'+zCaption.quotapos()+'</span>'
		for (var i=0;i<zImagesBefore.length;i++) {
			zBImagesBefore += '<img align="absmiddle" border="0" src="'+zImagesPath+zImagesBefore[i]+'"/>'
		}
		for (var i=0;i<zImagesAfter.length;i++) {
			zBImagesAfter += '<img align="absmiddle" border="0" src="'+zImagesPath+zImagesAfter[i]+'"/>'
		}
		break;
	case 'Hidd':
		zBClass = "btn_hidd"
		break;
	default:
		zBClass = "btn"
		zBAction = ' onClick="'+zAction.quotapos()+'"'
		zBTitle=' title="'+zHint.quotapos()+'"'
		if (zEffect=='T') {
			var zOnMouseOver	= "BtnChange(this,'"+zImagesPath+zButtonPath+"','over')"
			var zOnMouseOut		= "BtnChange(this,'"+zImagesPath+zButtonPath+"','')"
			var zOnMouseDown	= "BtnChange(this,'"+zImagesPath+zButtonPath+"','down')"
			var zOnMouseUp		= "BtnChange(this,'"+zImagesPath+zButtonPath+"','over')"
			if (is_ie) {
				zBMouseAction = ' onmouseup="'+zOnMouseUp+'" onmouseleave="'+zOnMouseOut+'" onmouseenter="'+zOnMouseOver+'" onmousedown="'+zOnMouseDown + '"'
			} else {
				zBMouseAction = ' onmouseup="'+zOnMouseUp+'" onmouseout="'+zOnMouseOut+'" onmouseover="'+zOnMouseOver+'" onmousedown="'+zOnMouseDown + '"'
			}
		}
		zBLeft += '<img border="0" src="'+zImagesPath+zButtonPath+'btnl.gif"/>'
		zBRight = '<img border="0" src="'+zImagesPath+zButtonPath+'btnr.gif"/>'
		zBCaption = '<span id="'+zLabel+'" class="btnTxt">'+zCaption.quotapos()+'</span>'
		zBackGround=' background="'+zImagesPath+zButtonPath+'btnc.gif"'
		for (var i=0;i<zImagesBefore.length;i++) {
			zBImagesBefore += '<img align="absmiddle" border="0" src="'+zImagesPath+zImagesBefore[i]+'"/>'
		}
		for (var i=0;i<zImagesAfter.length;i++) {
			zBImagesAfter += '<img align="absmiddle" border="0" src="'+zImagesPath+zImagesAfter[i]+'"/>'
		}
		break;
	}
		
	zHTML += '<table name="'+zID+'" id="'+zID+'" '+zBTitle+' width="'+zWidth+'" style="'+zStyle+'" class="'+zBClass+'" '+zBAction+'>'
					
	zHTML += '<tr' + zBMouseAction + '>'
					
	zHTML += '<td class="btn">'+zBLeft+'</td>'

	zHTML += '<td '+zBackGround+' class="btnc" id="BtnMain" nowrap="">'					
	zHTML += zBImagesBefore
	zHTML += zBCaption					
	zHTML += zBImagesAfter					
	zHTML += '</td>'

	zHTML += '<td class="btn">'+zBRight+'</td>'
					
	zHTML += '</tr></table>'

	document.write(zHTML)
	gNumberOfButtons++

}		
function buttonCreateSTD() {
	var zAction			= ''
	var	zClass			= 'btnN0'
	var zCaption		= ''
	var zHint			= ''
	var zWidth			= '100%'
	var zHeight			= '100%'
	var zId				= ''
	var zImagesBefore	= new Array
	var zImagesAfter	= new Array
	var zWrapText		= 'T'
	var zStatus			= ''
	var zMouseOver		= ''
	var zMouseOut		= ''
	var zVertical		= 'F'
	var zLabel			= ''
	var zEffect			= ''
	var zTSE			= 'F'

	var args=buttonCreateSTD.arguments[0]
	for (var i=0;i<args.length;i++) {
		var z = args[i]
		zName = z.substr(0,3)
		zValue = z.substr(3)
		if (zValue!='') {
			switch(zName) {
			case 'BTN'	:	zClass		= 'btnN' + zValue.substr(6); break;
			case 'EFF'	:	zEffect		= zValue; break;
			case 'TSE'	:	zTSE		= zValue; break;
			case 'IMG'	:	zImagesPath	= zValue; break;
			case 'LAB'	:	zLabel		= zValue; break;
			case 'ACT'	:	zAction		= zValue; break;
			case 'MOV'	:	zMouseOver	= zValue; break;
			case 'MOU'	:	zMouseOut	= zValue; break;
			case 'CAP'	:	zCaption	= zValue; break;
			case 'LAB'	:	zLabel		= zValue; break;
			case 'HNT'	:	zHint		= zValue; break;
			case 'WID'	:	zWidth		= zValue; break;
			case 'HGT'	:	zHeight		= zValue; break;
			case 'NAM'	:	zId			= zValue; break;
			case 'IMB'	:	zImagesBefore[zImagesBefore.length] = zValue; break;
			case 'IMA'	:	zImagesAfter[zImagesAfter.length] = zValue; break;
			case 'WRP'	:	zWrapText	= zValue; break;
			case 'STA'	:	zStatus		= zValue; break;
			case 'VER'	:	zVertical	= zValue; break;
			default		:	break;
			}
		}
	}
	zAction += ';return false;'	

	var z = ''
	var zNav  = (document.all) ? 'ie' : 'netscape'
	if (navigator.userAgent.toLowerCase().indexOf('opera') !=-1) zNav = 'opera'

	var zDim = ' height="'+zHeight+'" width="'+zWidth+'" '

	if (zWidth=='100%') zWrapText='F'

	if (zCaption!='') {
		zCaption = '<span class="'+zClass+'Text1st">'+zCaption.substr(0,1)+'</span>'+zCaption.substr(1).quotapos()
		if (zWrapText=='F') zCaption = '<nobr>' + zCaption + '</nobr>'
	}
	if (zStatus=='Dis') var zCursor=';cursor:default;'
	else var zCursor=';cursor:pointer;cursor:hand;' 

	z = '<table cellpadding="0" cellspacing="0" border="0"'
	z += ' title="'+zHint.quotapos()+'"'
	if (zId!='')
		z += ' id="'+zId+'" name="'+zId+'"'
	if (zTSE!='T') {
		if (zMouseOver!='') z += ' onmouseover="'+zMouseOver+'"'
		if (zMouseOut!='') z += ' onmouseout="'+zMouseOut+'"'
	}
	z += '>'
	z += '<tr><td valign="center"><button onclick="'+zAction+'"'
	z +=	' style="width:100%;height:100%;padding:0px;'+zCursor+'"'
	z +=	' class="'+zClass+'"'
	if (zId!='')
		z += ' id="BUTTON'+zId+'" '

	// No mouse over for TSE skins
	if (zTSE!='T') {
		if (is_ie) {
			z +=	' onmouseleave="this.className=\''+zClass+'\'"' 
			z +=	' onmouseenter="this.className=\''+zClass+'over\'"' 
		} else {
			z +=	' onmouseout="this.className=\''+zClass+'\'"' 
			z +=	' onmouseover="this.className=\''+zClass+'over\'"' 
		}
		z +=	' onmousedown="this.className=\''+zClass+'down\'"' 
		z +=	' onmouseup="this.className=\''+zClass+'over\'"' 
	}
	
	if (zStatus=='Dis') z+= ' disabled '
	z +=	'>'
	z +=	'<table style="padding:0px 6px 0px 6px" cellspacing="0" cellpadding="0" border="0"'
	z +=	' class="btn'+zNav+'" '
	z +=		zDim
	z +=	'>'
	z += '<tr><td><table border="0" width="100%" height="100%" cellspacing="0" cellpadding="0" class="'+zClass+'Tab">'	
	if (zVertical!='T') z += '<tr>'
	for (var i=0;i<zImagesBefore.length;i++) {
		if (zVertical=='T') z+= '<tr>'		
		z +=	'<td align="center" valign="center" style="padding:0px 2px 0px 2px">'
		z +=		'<img border="0" src="'+zImagesPath+zImagesBefore[i]+'"/>'
		z +=	'</td>'
		if (zVertical=='T') z+= '</tr>'		
	}
	if (zCaption!='') {
		if (zVertical=='T') z+= '<tr>'		
		z +=	'<td style="padding:0px 2px 0px 2px" class="'+zClass+'Text" valign="center" width="100%" xheight="100%">'
		z +=		'<span id="'+zLabel+'" class="'+zClass+'Text">'+zCaption+'</span>'
		z +=	'</td>'
		if (zVertical=='T') z+= '</tr>'		
	}
	for (var i=0;i<zImagesAfter.length;i++) {
		if (zVertical=='T') z+= '<tr>'		
		z +=	'<td align="center" valign="center" style="padding:0px 2px 0px 2px">'
		z +=		'<img border="0" src="'+zImagesPath+zImagesAfter[i]+'"/>'
		z +=	'</td>'
		if (zVertical=='T') z+= '</tr>'		
	}
	if (zVertical!='T') z += '</tr>'
	z += '</table></td></tr>'
	z +=	'</table></button></td></tr></table>'
	document.write(z)
}
	
function BtnChange(Row,SkinPath,Action) {
	var zAction = Action
	if (zAction != '') zAction = "_"+zAction; 
	var alltags = Row.getElementsByTagName("*")
	for (var i=0; i < alltags.length; i++) {
		var obj = alltags[i]
		if (obj.tagName=="IMG") {
			var zSRC = obj.src
			var zPos  = zSRC.lastIndexOf(".")
			
			var zSuff = zSRC.substr(zPos+1)
			var zSRC = zSRC.substr(0,zPos)
			
			switch (zSRC.substr(zSRC.length-5).toUpperCase()) {
			case '_DOWN':
				obj.src = zSRC.substr(0,zSRC.length-5) + zAction + "." + zSuff
				break;
			case '_OVER':
				obj.src = zSRC.substr(0,zSRC.length-5) + zAction + "." + zSuff
				break;
			default:
				obj.src = zSRC + zAction + "." + zSuff
				break;
			}
		} else {
			if (obj.id == 'BtnMain') 
				obj.style.background = "url(" + SkinPath+'btnc'+zAction+'.gif' + ")"; 
		}
	}
}
function MM_preloadImages() {
	var d=document; 
	if(d.images) { 
		if(!d.MM_p) d.MM_p=new Array();
	
		var i,j=d.MM_p.length,a=MM_preloadImages.arguments; 
		for(i=0; i<a.length; i++)
			if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];
		}
	}
}
function preloadButton(pButton) {
	try {if (getButtonType('BTT'+gSkin)=='STD') return} catch (e) {}
	var zPath = gImagesPath + pButton + '/'
	MM_preloadImages(	zPath + 'btnl.gif',
				zPath + 'btnl_over.gif',
				zPath + 'btnl_down.gif',
				zPath + 'btnl_dis.gif',
				zPath + 'btnc.gif',
				zPath + 'btnc_over.gif',
				zPath + 'btnc_down.gif',
				zPath + 'btnc_dis.gif',
				zPath + 'btnr.gif',
				zPath + 'btnr_over.gif',
				zPath + 'btnr_down.gif',
				zPath + 'btnr_dis.gif')
}   				
function preloadSpecImages() {
	try {if (getButtonType('BTT'+gSkin)=='STD') return} catch (e) {}

	MM_preloadImages(	gImagesPath + 'Authority_down.gif',
				gImagesPath + 'Authority_over.gif',
				gImagesPath + 'Begin_down.gif',
				gImagesPath + 'Begin_over.gif',
				gImagesPath + 'Boxes_down.gif',
				gImagesPath + 'Boxes_over.gif',
				gImagesPath + 'Close_down.gif',
				gImagesPath + 'Close_over.gif',
				gImagesPath + 'Cross_down.gif',
				gImagesPath + 'Cross_over.gif',
				gImagesPath + 'DictConsult_down.gif',
				gImagesPath + 'DictConsult_over.gif',
				gImagesPath + 'End_down.gif',
				gImagesPath + 'End_over.gif',
				gImagesPath + 'Eraser_down.gif',
				gImagesPath + 'Eraser_over.gif',
				gImagesPath + 'ExtractDict_down.gif',
				gImagesPath + 'ExtractDict_over.gif',
				gImagesPath + 'ExtractList_down.gif',
				gImagesPath + 'ExtractList_over.gif',
				gImagesPath + 'Goto_down.gif',
				gImagesPath + 'Goto_over.gif',
				gImagesPath + 'Info_down.gif',
				gImagesPath + 'Info_over.gif',
				gImagesPath + 'ListFilter_down.gif',
				gImagesPath + 'ListFilter_over.gif',
				gImagesPath + 'Minus_down.gif',
				gImagesPath + 'Minus_over.gif',
				gImagesPath + 'Next_down.gif',
				gImagesPath + 'Next_over.gif',
				gImagesPath + 'PageArrowGreen_down.gif',
				gImagesPath + 'PageArrowGreen_over.gif',
				gImagesPath + 'PageArrowRed_down.gif',
				gImagesPath + 'PageArrowRed_over.gif',
				gImagesPath + 'Phonetic_down.gif',
				gImagesPath + 'Phonetic_over.gif',
				gImagesPath + 'PhoneticDis_down.gif',
				gImagesPath + 'PhoneticDis_over.gif',
				gImagesPath + 'Previous_down.gif',
				gImagesPath + 'Previous_over.gif',
				gImagesPath + 'Plural_down.gif',
				gImagesPath + 'Plural_over.gif',
				gImagesPath + 'PluralDis_down.gif',
				gImagesPath + 'PluralDis_over.gif',
				gImagesPath + 'Restr_down.gif',
				gImagesPath + 'Restr_over.gif',
				gImagesPath + 'Restriction_down.gif',
				gImagesPath + 'Restriction_over.gif',
				gImagesPath + 'Search_down.gif',
				gImagesPath + 'Search_over.gif',
				gImagesPath + 'Show_down.gif',
				gImagesPath + 'Show_over.gif',
				gImagesLangPath + 'Nav_Account_over.gif',
				gImagesLangPath + 'NavBasket_over.gif',
				gImagesLangPath + 'NavHisto_over.gif',
				gImagesLangPath + 'NavHome_over.gif',
				gImagesLangPath + 'NavSummary_over.gif')
}

function SayLoading()
{
	document.getElementById('Loading').style.display = "block";
	document.getElementById('Loaded').style.display = "none";
	if (document.getElementById('TopListLoaded') != null)
		document.getElementById('TopListLoaded').style.display = "none";
	if (document.getElementById('BottomListLoaded') != null)
		document.getElementById('BottomListLoaded').style.display = "none";	
	if (document.getElementById('BottomLoading') != null)
		document.getElementById('BottomLoading').style.display = "block";
	if (document.getElementById('BottomLoaded') != null)
		document.getElementById('BottomLoaded').style.display = "none";
}


function getPosition(pTag,pMinWidth) {
	var c=new Object();						
	var o=document.getElementById(pTag);	
	
	if (isIE) {
		c.availHeight= document.body.clientHeight
		c.availWidth= document.body.clientWidth
	} else {
		c.availHeight = window.innerHeight
		c.availWidth = window.innerWidth
	}
	c.height=o.offsetHeight; c.width=o.offsetWidth	
	c.x=o.offsetLeft; c.y=o.offsetTop;
	while ((o=o.offsetParent) != null) { c.x += o.offsetLeft; c.y += o.offsetTop; }						
	c.maxWidth = c.availWidth - c.x + 1
	if (c.maxWidth < pMinWidth) c.x = c.availWidth - pMinWidth;
	if (c.x < 0) c.x = 0;
	return c;
}
var configWin
function configStart() {
	document.onmousedown=configClick
	document.onmouseup  =configCancel
	document.onclick    =configCancel
	document.body.oncontextmenu=function() {try {if (event.ctrlKey){event.cancelBubble=true;return false;}} catch (e) {} }
}			
function configClick(){
	if ((event.ctrlKey) && (event.button==2)){
		showConfigWin();
		event.cancelBubble = true
		return false;
	}
}
function configCancel(){
	if ((event.ctrlKey) && (event.button==2)) {
		event.cancelBubble = true
		return false;
	}
}
function hideConfigWin() {
	try {configWin.close()} catch (e) {}
}
var configObj
var configHelp = new Object()
function focusConfigWin() {
	try {configWin.focus()} catch (e) {}
}
function showConfigWin() {
	configObj = window.event.srcElement
	try {configWin.close()} catch (e) {}

	var zWidth =550
	var zHeight=450
	var zTop = (screen.height-zHeight)/2
	var zLeft = (screen.width-zWidth)/2
	if (zTop < 0) zTop=0
	if (zLeft < 0) zLeft=0
	if (screen.height-zHeight > 70) zTop=70

	configWin = window.open("../../Tools/skinobject.htm","config","status,scrollbars=1, title=CSS, width="+zWidth+", height="+zHeight+", top="+zTop+", left="+zLeft)	
	setTimeout("focusConfigWin()",300)
	return
}

/* ==================================== */
/* Font Sizing START ...                */
/* ==================================== */
try {document.captureEvents(Event.KEYDOWN)} catch (e) {}
try {document.captureEvents(Event.MOUSEWHEEL)} catch (e) {}
document.onkeydown=KeyCache
document.onmousewheel=trapRoller
function KeyCache(e) {
	var keycode = (e) ? e.which : window.event.keyCode;

	var sk = (e) ? (e.altKey) : event.altKey
	if (sk) {
		switch (keycode) {
		case 117: css('D'); break;
		case 118: css('-'); break;
		case 119: css('+'); break;
		}
	} else {
		try {
			switch (keycode) {
			case 35: ScreenEnd();	break;	// End
			case 36: ScreenStart();	break;	// Start
			case 37: ScreenLeft();	break;	// Left
			case 38: ScreenUp();	break;	// Up
			case 39: ScreenRight();	break;	// Right
			case 40: ScreenDown();	break;	// Down
			default: break;
			}
		} catch (e) {}
	}
}
function ScreenUp() {	
	var ov = document.getElementById(gDivOverflow)
	ov.focus()
	return true
}
function ScreenDown() {
	var ov = document.getElementById(gDivOverflow)
	ov.focus()
	return true
}
function trapRoller(e) {
	var keycode = (e) ? e.which : window.event.keyCode;
	var ctrl = (e) ? (e.ctrlKey) : event.ctrlKey
	var delta = (e) ? (e.wheelDelta) : event.wheelDelta

	if (ctrl) {
		if (delta >= 0) css('+')
		else css('-')
		event.cancelBubble = true
		return false;
	}
}
function css(pType) {
	if (document.ppkFontSize.Inc==0) return
	var zUpdate = false
	try {if (window.parent.fraTop.document) zUpdate=true} catch (e) {}

	switch (pType) {
	case '+':
		document.ppkFontSize.Curr += Number(document.ppkFontSize.Inc)
		document.ppkFontSize.Curr = Math.min(document.ppkFontSize.Curr, document.ppkFontSize.Max);
		break;
	case '-':
		document.ppkFontSize.Curr -= Number(document.ppkFontSize.Inc)
		document.ppkFontSize.Curr = Math.max(document.ppkFontSize.Curr, document.ppkFontSize.Min);
		break;
	case 'D':
		document.ppkFontSize.Curr = document.ppkFontSize.Def
		break;
	}
	if (zUpdate==false) {
		try {updateSS(parent.document)} catch (e) {}
		updateSS(self.document)
	} else {
		try {updateSS(window.parent.parent.document)} catch (e) {}
		updateSS(window.parent.fraTop.document)
		updateSS(window.parent.fraCenter.document)
    }
    // setCookie( "fontSize", document.ppkFontSize.Curr, 180, "/" );
    setCookie( "fontSize", document.ppkFontSize.Curr, 0, '/');
}
function updateSS(pFrame) {
	try {pFrame.ppkFontSize.Curr = document.ppkFontSize.Curr} catch (e) {}
	var ss = pFrame.styleSheets[pFrame.styleSheets.length-1]
	var rules = (ss.cssRules) ? ss.cssRules : ss.rules;
	for (var i=0;i<rules.length;i++) {
		var st = String(rules[i].selectorText).toUpperCase()
		if ((st=='BODY') || (st=='TD'))
			rules[i].style.fontSize = Number(document.ppkFontSize.Curr)+document.ppkFontSize.Type
	}
}
function getPpkFontSize() {
	document.ppkFontSize = new Object()
	document.ppkFontSize.Min	= 9
	document.ppkFontSize.Def	= 13
	document.ppkFontSize.Max	= 20
	document.ppkFontSize.Type	= 'px'
	document.ppkFontSize.Inc	= 0
	
	for(var j=0;j< document.styleSheets.length;j++)
	{
		var ss = document.styleSheets[j]
		var rules = (ss.cssRules) ? ss.cssRules : ss.rules;
		for (var i=0;i<rules.length;i++) {
			var st = String(rules[i].selectorText).toUpperCase()
			switch (st) {
			case 'PPKFONTSIZEMIN' : 
				document.ppkFontSize.Min = returnFontSize(rules[i].style.fontSize)
				break;		
			case 'PPKFONTSIZEMAX' : 
				document.ppkFontSize.Max = returnFontSize(rules[i].style.fontSize)
				break;		
			case 'PPKFONTSIZEDEF' : 
				document.ppkFontSize.Def = returnFontSize(rules[i].style.fontSize)
				break;		
			case 'PPKFONTSIZEINC' : 
				document.ppkFontSize.Inc = returnFontSize(rules[i].style.fontSize)
				break;		
			}
		}
	}
}
function returnFontSize(pFontSize) {
	if (pFontSize.substr(pFontSize.length-1,1)=='%') {
		document.ppkFontSize.Type = '%'
		return Number(pFontSize.substr(0,pFontSize.length-1))
	}
	var z = '/px/em/pt/'
	if (z.indexOf('/'+pFontSize.substr(pFontSize.length-2,2)+'/')!=-1) {
		document.ppkFontSize.Type = pFontSize.substr(pFontSize.length-2,2)
		return Number(pFontSize.substr(0,pFontSize.length-2))
	}
	document.ppkFontSize.Type = ''
	return Number(pFontSize)
}
function accessStyle() {
	getPpkFontSize()
	if (document.ppkFontSize.Inc==0) return

    document.ppkFontSize.Curr = (getCookie("fontSize")) ? Number(getCookie("fontSize")) : 0
    if (document.ppkFontSize.Curr==0) document.ppkFontSize.Curr = document.ppkFontSize.Def
	var z = ''
	z += '<style>'
	z += 'BODY	{font-size: '+document.ppkFontSize.Curr+document.ppkFontSize.Type+'}'
	z += 'TD 	{font-size: '+document.ppkFontSize.Curr+document.ppkFontSize.Type+'}'
	z += 'TABLE	{font-size: 100%}'
	z += 'TR	{font-size: 100%}'
	z += '</style>'
	document.write(z)
}
function createFontSizeButtons() {
	if (document.ppkFontSize.Inc==0) return
	zHTML = ''
	zHTML += '<TD>'
	zHTML += '<table border="0" cellpadding="0" cellspacing="0">'
	zHTML += '<tr>'
	zHTML += '	<td><button class="btnNSimple" onClick="css(\'+\')"><img alt="Zoom +\n(Alt+F8)" border="0" src="'+gImagesPath+'zoomin.gif"></button></td>'
	zHTML += '</tr>'
	zHTML += '<tr>'
	zHTML += '	<td><button class="btnNSimple" onClick="css(\'-\')"><img alt="Zoom -\n(Alt+F7)" border="0" src="'+gImagesPath+'zoomout.gif"></button></td>'
	zHTML += '	<td></td>'
	zHTML += '</tr>'
	zHTML += '</table>'
	zHTML += '</TD>'
	document.write(zHTML)
}
try {accessStyle()} catch (e) {}
/* ==================================== */
/* Font Sizing END                      */
/* ==================================== */
function setCookie(name,value,days,path,domain,secure) {
  var expires, date;
  if (typeof days == "number") {
	if (days!=0) {
		date = new Date();
		date.setTime( date.getTime() + (days*24*60*60*1000) );
			expires = date.toGMTString();
	}
  }
  document.cookie = name + "=" + escape(value) +
    ((expires) ? "; expires=" + expires : "") +
    ((path) ? "; path=" + path : "") +
    ((domain) ? "; domain=" + domain : "") +
    ((secure) ? "; secure" : "");
}

function getCookie(name) {
  var nameq = name + "=";
  var c_ar = document.cookie.split(';');
  for (var i=0; i<c_ar.length; i++) {
    var c = c_ar[i];
    while (c.charAt(0)==' ') c = c.substring(1,c.length);
    if (c.indexOf(nameq) == 0) return unescape( c.substring(nameq.length, c.length) );
  }
  return null;
}
function deleteCookie(name,path,domain) {
  if (getCookie(name)) {
    document.cookie = name + "=" +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      "; expires=Thu, 01-Jan-70 00:00:01 GMT";
  }
}
function MSXMLDomObj() {
	try {return new ActiveXObject("Msxml2.DomDocument") } catch (e) {
		try {return new ActiveXObject("Msxml.DomDocument") } catch (e) {}
	}
}


/* ******************************************************* */
/* * Section to get Carthame parameters - START   * */
/* ******************************************************* */
function getApplication() {
	var zApplication = ""
		
	try {
		zApplication = window.external.Pop('APPID')
	} catch (e) {}

	return zApplication
}
function getOpacParams() {
	var zURL = ''
	var opac = new Object()

	opac.Application	= gApplication
	opac.URL			= ''
	opac.PrintButton	= ''
	opac.WorkStation	= ''
	opac.OperatorCode	= ''
	opac.CurrentBaseId	= ''
	opac.Professional	= ''
	opac.profCmd		= ''

	switch (gApplication) {
	//CB : On peut tre appel  depuis Paprika pour les rservoirs distants
	case 'Paprika': ;
	case 'Carthame': getOpacParamsCarthame(opac); break;
	default: 
		return ''
		break;
	}
	
	zURL += opac.profCmd
	zURL += "&XP_WorkStation=" 	+ opac.WorkStation
	zURL += "&XP_OperatorCode=" + opac.OperatorCode
	zURL += "&XP_PrintButton=" 	+ opac.PrintButton
	zURL += "&XP_Application=" 	+ opac.Application
	zURL += "&XP_DataBaseID=" 	+ opac.CurrentBaseId
	zURL += "&XP_Professional=" + opac.Professional
	if (opac.Application=='') zURL = '';

	gCurrentBaseId = opac.CurrentBaseId

	return zURL
}
function getOpacParamsCarthame(opac) {
	
	try {
		opac.Professional	= window.external.Pop('PROFESSIONAL')
		
		oProfCmd			= window.external.PopIntf('ProfCmd')
		oSession			= window.external.PopIntf('AppSession')
		
		oPpkGetIdentValue	= window.external.PopIntf('ppkGetIdentValue')
		oGetLocalBrowserCmd	= window.external.PopIntf('GetLocalBrowserCmd')	
	} catch (e) {}
	
	try {opac.CurrentBaseId	= oSession.Pop('CURRENTBASEID')} catch (e) {}

	try {					
		try {opac.WorkStation	= oSession.Pop('CURRENTSTATIONID');	} catch(e) {} 
		try {opac.OperatorCode	= oSession.Pop('CURRENTOPERATOR'); 	} catch(e) {} 

		var zProfCmd = ''
		try {zProfCmd += "&XP_CatalogEnabled="				+ oProfCmd.Pop('CATALOGENABLED');			} catch(e) {} 
		try {zProfCmd += "&XP_CurrentInfoEnabled="			+ oProfCmd.Pop('CURRENTINFOENABLED');		} catch(e) {} 
		try {zProfCmd += "&XP_PendingReservationsEnabled="	+ oProfCmd.Pop('PENDINGRESERVATIONSENABLED');} catch(e) {} 
		try {zProfCmd += "&XP_OrdersEnabled="				+ oProfCmd.Pop('ORDERSENABLED');				} catch(e) {} 
		try {zProfCmd += "&XP_ReserveEnabled="				+ oProfCmd.Pop('RESERVEENABLED');			} catch(e) {} 
		try {zProfCmd += "&XP_AccountEnabled="				+ oProfCmd.Pop('ACCOUNTENABLED');			} catch(e) {} 
		try {zProfCmd += "&XP_ImportEnabled="				+ oProfCmd.Pop('IMPORTENABLED');				} catch(e) {} 
		try {zProfCmd += "&XP_ImportAuthEnabled="			+ oProfCmd.Pop('IMPORTAUTHENABLED');				} catch(e) {} 
			
		opac.profCmd = zProfCmd
				
	} catch (e) {}				


	try {opac.PrintButton = (oGetLocalBrowserCmd.Pop('PrintButton')==true) ? "T" : "F"; } catch(e) {} 

}
/* ******************************************************* */
/* * Section to get Carthame parameters - END     * */
/* ******************************************************* */


function GetNodeText(Xml,XPath,Default) {
	var result;
	try {
		result = Xml.selectSingleNode(XPath).text;
		if (typeof(result) == "undefined")
		result = Default;
	} catch (e) {
		if (typeof(Default)!="undefined") result = Default;
		else result = '';
	}
	return result;
}


