/*
 * Copyright (c) 1996-2007 Aplus.Net Internet Services
 * All rights reserved.
 * Reproduction or transmission in whole or in part,
 * in any form or by any means, electronic, mechanical
 * or otherwise, is prohibited without the prior written
 * consent of the copyright owner.
 */
/* Including: core/AjaxRequest.js, $Id: AjaxRequest.js,v 1.2 2007/05/03 16:54:48 andrei Exp $ */

function AjaxRequest() {
var req = new Object();
req.timeout = null;
req.generateUniqueUrl = true;
req.url = window.location.href;
req.method = "GET";
req.async = true;
req.username = null;
req.password = null;
req.parameters = new Object();
req.requestIndex = AjaxRequest.numAjaxRequests++;
req.responseReceived = false;
req.groupName = null;
req.queryString = "";
req.responseText = null;
req.responseXML = null;
req.status = null;
req.statusText = null;
req.aborted = false;
req.xmlHttpRequest = null;
req.onTimeout = null; 
req.onLoading = null;
req.onLoaded = null;
req.onInteractive = null;
req.onComplete = null;
req.onSuccess = null;
req.onError = null;
req.onGroupBegin = null;
req.onGroupEnd = null;
req.xmlHttpRequest = AjaxRequest.getXmlHttpRequest();
if (req.xmlHttpRequest==null) { return null; }
req.xmlHttpRequest.onreadystatechange = 
function() {
try {
if (req==null || req.xmlHttpRequest==null) { return; }
if (req.xmlHttpRequest.readyState==1) { req.onLoadingInternal(req); }
if (req.xmlHttpRequest.readyState==2) { req.onLoadedInternal(req); }
if (req.xmlHttpRequest.readyState==3) { req.onInteractiveInternal(req); }
if (req.xmlHttpRequest.readyState==4) { req.onCompleteInternal(req); }
} catch (e) { return; }
};
req.onLoadingInternalHandled = false;
req.onLoadedInternalHandled = false;
req.onInteractiveInternalHandled = false;
req.onCompleteInternalHandled = false;
req.onLoadingInternal = 
function() {
if (req.onLoadingInternalHandled) { return; }
AjaxRequest.numActiveAjaxRequests++;
if (AjaxRequest.numActiveAjaxRequests==1 && typeof(window['AjaxRequestBegin'])=="function") {
AjaxRequestBegin();
}
if (req.groupName!=null) {
if (typeof(AjaxRequest.numActiveAjaxGroupRequests[req.groupName])=="undefined") {
AjaxRequest.numActiveAjaxGroupRequests[req.groupName] = 0;
}
AjaxRequest.numActiveAjaxGroupRequests[req.groupName]++;
if (AjaxRequest.numActiveAjaxGroupRequests[req.groupName]==1 && typeof(req.onGroupBegin)=="function") {
req.onGroupBegin(req.groupName);
}
}
if (typeof(req.onLoading)=="function") {
req.onLoading(req);
}
req.onLoadingInternalHandled = true;
};
req.onLoadedInternal = 
function() {
if (req.onLoadedInternalHandled) { return; }
if (typeof(req.onLoaded)=="function") {
req.onLoaded(req);
}
req.onLoadedInternalHandled = true;
};
req.onInteractiveInternal = 
function() {
if (req.onInteractiveInternalHandled) { return; }
if (typeof(req.onInteractive)=="function") {
req.onInteractive(req);
}
req.onInteractiveInternalHandled = true;
};
req.onCompleteInternal = 
function() {
if (req.onCompleteInternalHandled || req.aborted) { return; }
req.onCompleteInternalHandled = true;
AjaxRequest.numActiveAjaxRequests--;
if (AjaxRequest.numActiveAjaxRequests==0 && typeof(window['AjaxRequestEnd'])=="function") {
AjaxRequestEnd(req.groupName);
}
if (req.groupName!=null) {
AjaxRequest.numActiveAjaxGroupRequests[req.groupName]--;
if (AjaxRequest.numActiveAjaxGroupRequests[req.groupName]==0 && typeof(req.onGroupEnd)=="function") {
req.onGroupEnd(req.groupName);
}
}
req.responseReceived = true;
req.status = req.xmlHttpRequest.status;
req.statusText = req.xmlHttpRequest.statusText;
req.responseText = req.xmlHttpRequest.responseText;
req.responseXML = req.xmlHttpRequest.responseXML;
if (typeof(req.onComplete)=="function") {
req.onComplete(req);
}
if (req.xmlHttpRequest.status==200 && typeof(req.onSuccess)=="function") {
req.onSuccess(req);
}
else if (typeof(req.onError)=="function") {
req.onError(req);
}
delete req.xmlHttpRequest['onreadystatechange'];
req.xmlHttpRequest = null;
};
req.onTimeoutInternal = 
function() {
if (req!=null && req.xmlHttpRequest!=null && !req.onCompleteInternalHandled) {
req.aborted = true;
req.xmlHttpRequest.abort();
AjaxRequest.numActiveAjaxRequests--;
if (AjaxRequest.numActiveAjaxRequests==0 && typeof(window['AjaxRequestEnd'])=="function") {
AjaxRequestEnd(req.groupName);
}
if (req.groupName!=null) {
AjaxRequest.numActiveAjaxGroupRequests[req.groupName]--;
if (AjaxRequest.numActiveAjaxGroupRequests[req.groupName]==0 && typeof(req.onGroupEnd)=="function") {
req.onGroupEnd(req.groupName);
}
}
if (typeof(req.onTimeout)=="function") {
req.onTimeout(req);
}
delete req.xmlHttpRequest['onreadystatechange'];
req.xmlHttpRequest = null;
}
};
req.process = 
function() {
if (req.xmlHttpRequest!=null) {
if (req.generateUniqueUrl && req.method=="GET") {
req.parameters["AjaxRequestUniqueId"] = new Date().getTime() + "" + req.requestIndex;
}
var content = null; 
for (var i in req.parameters) {
if (req.queryString.length>0) { req.queryString += "&"; }
req.queryString += encodeURIComponent(i) + "=" + encodeURIComponent(req.parameters[i]);
}
if (req.method=="GET") {
if (req.queryString.length>0) {
req.url += ((req.url.indexOf("?")>-1)?"&":"?") + req.queryString;
}
}
req.xmlHttpRequest.open(req.method,req.url,req.async,req.username,req.password);
if (req.method=="POST") {
if (typeof(req.xmlHttpRequest.setRequestHeader)!="undefined") {
req.xmlHttpRequest.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
}
content = req.queryString;
}
if (req.timeout>0) {
setTimeout(req.onTimeoutInternal,req.timeout);
}
req.xmlHttpRequest.send(content);
}
};
req.handleArguments = 
function(args) {
for (var i in args) {
if (typeof(req[i])=="undefined") {
req.parameters[i] = args[i];
}
else {
req[i] = args[i];
}
}
};
req.getAllResponseHeaders =
function() {
if (req.xmlHttpRequest!=null) {
if (req.responseReceived) {
return req.xmlHttpRequest.getAllResponseHeaders();
}
alert("Cannot getAllResponseHeaders because a response has not yet been received");
}
};
req.getResponseHeader =
function(headerName) {
if (req.xmlHttpRequest!=null) {
if (req.responseReceived) {
return req.xmlHttpRequest.getResponseHeader(headerName);
}
alert("Cannot getResponseHeader because a response has not yet been received");
}
};
return req;
}
AjaxRequest.getXmlHttpRequest = function() {
if (window.XMLHttpRequest) {
return new XMLHttpRequest();
}
else if (window.ActiveXObject) {
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
try {
return new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
return new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
return null;
}
}
@end @*/
}
else {
return null;
}
};
AjaxRequest.isActive = function() {
return (AjaxRequest.numActiveAjaxRequests>0);
};
AjaxRequest.get = function(args) {
AjaxRequest.doRequest("GET",args);
};
AjaxRequest.post = function(args) {
AjaxRequest.doRequest("POST",args);
};
AjaxRequest.doRequest = function(method,args) {
if (typeof(args)!="undefined" && args!=null) {
var myRequest = new AjaxRequest();
myRequest.method = method;
myRequest.handleArguments(args);
myRequest.process();
}
}	;
AjaxRequest.submit = function(theform, args) {
var myRequest = new AjaxRequest();
if (myRequest==null) { return false; }
var serializedForm = AjaxRequest.serializeForm(theform);
myRequest.method = theform.method.toUpperCase();
myRequest.url = theform.action;
myRequest.handleArguments(args);
myRequest.queryString = serializedForm;
myRequest.process();
return true;
};
AjaxRequest.serializeForm = function(theform) {
var els = theform.elements;
var len = els.length;
var queryString = "";
this.addField = 
function(name,value) { 
if (queryString.length>0) { 
queryString += "&";
}
queryString += encodeURIComponent(name) + "=" + encodeURIComponent(value);
};
for (var i=0; i<len; i++) {
var el = els[i];
if (!el.disabled) {
switch(el.type) {
case 'text': case 'password': case 'hidden': case 'textarea': 
this.addField(el.name,el.value);
break;
case 'select-one':
if (el.selectedIndex>=0) {
this.addField(el.name,el.options[el.selectedIndex].value);
}
break;
case 'select-multiple':
for (var j=0; j<el.options.length; j++) {
if (el.options[j].selected) {
this.addField(el.name,el.options[j].value);
}
}
break;
case 'checkbox': case 'radio':
if (el.checked) {
this.addField(el.name,el.value);
}
break;
}
}
}
return queryString;
};
AjaxRequest.numActiveAjaxRequests = 0;
AjaxRequest.numActiveAjaxGroupRequests = new Object();
AjaxRequest.numAjaxRequests = 0;
/* Including: core/DisableDialog.js, $Id: DisableDialog.js,v 1.8.2.1 2008/02/25 18:32:03 assent Exp $ */

var DisableDialog = function()
{
this.ID = 'GlobPopupID';
this.ContentID = 'GlobPopupContentID';
this.ContentWrappedID = 'GlobPopupContentWrappedID';
var $$ = function ( Element ) { return document.getElementById( Element ); };
this.MSIE = navigator.userAgent.indexOf( 'MSIE' ) >= 0 ? true : false;
this.Content = '';
this.Height = 200;
this.Width = 400;
this.setHtmlContent = function ( Content ) {
this.Content = Content;
};
this.setSource = function ( URL ) {
};
this.setSize = function ( Width, Height ) {
this.Height = Height;
this.Width = Width;
};
this.display = function () {
GlobWaitShowSticky();
var tmpWidth = this.Width / 2;
var tmpHeight = this.Height / 2;
var Content = '<div style="width:'+this.Width+'px; height:'+this.Height+'px; 			position:absolute; top:-'+tmpHeight+'px; left:-'+tmpWidth+'px; 			background-color:#fff; border:1px solid #ccc; overflow:auto;		" id="'+this.ContentWrappedID+'">'+this.Content+'</div>';
$$( this.ID ).style.display = 'block';
$$( this.ContentID ).innerHTML = Content;
};
this.close = function () {
$$( this.ID ).style.display = 'none';
GlobWaitHide();
$$( this.ContentID ).innerHTML = '';
};
};
/* Including: status.js, $Id: status.js,v 1.4 2007/06/19 08:09:15 assen Exp $ */

var GlobPanelCurrentBaseUrl;
var nGlobStatus    = null;
var nGlobStatusErr = -1; 
var bRunning       = false;
function _StatusParseResponse( req ) {
var myResp  = req.responseText;
var oRegExp = new RegExp("\r?\n", "g");
var lines   = myResp.split( oRegExp );
var myArray = new Object;
if ( typeof( lines ) == 'object' ) {
oRegExp = new RegExp("^([^=]{1,})=(.*)$", "");
for ( var i in lines ) {
var oMatch	= oRegExp.exec( lines[ i ] );
if ( oMatch && oMatch.length > 2 ) {
myArray[ oMatch[ 1 ] ] = oMatch[ 2 ];
}
}
}
return myArray;
}
function _StatusOnSuccess( req ) {
var p = _StatusParseResponse(req);
var myStatus = p['Status'];
if ( typeof(myStatus) != 'undefined' && ( myStatus != null ) && (myStatus != 0) ) {
nGlobStatus = myStatus;
} 
bRunning = false;
return myStatus;
}
function _StatusOnError () {
myStatus = nGlobStatusErr;
bRunning = false;
}
function GlobCheckStatus( StatusName ) {
if ( nGlobStatus != null ) {
return nGlobStatus;
}
if ( bRunning ) {
return false;
}
bRunning = true;
var myP  = new Object;
myP[ 'Status|Name' ]      = 'CustomerLoaded';
myP[ 'Status|Status_cb' ] = 1;
AjaxRequest.get(
{
'url'         : GlobPanelCurrentBaseUrl + '/dev/null.mhtml'
,'parameters' : myP
,'onSuccess'  : _StatusOnSuccess
,'onError'    : _StatusOnError
}
);
return nGlobStatus;
}
/* Including: wait.js, $Id: wait.js,v 1.2.2.1 2008/04/02 08:58:59 andreik Exp $ */

var GlobPanelCurrentBaseUrl;
var GlobWaitTimeoutID;
var nLoopCount = 0;
var bGlobAbort = false;
var nGlobCustomerLoaded = 0;
function GlobMkNavi( theElement ) {
GlobWaitShow();
}
function GlobMkSubmit ( formName ) {
GlobDisableSubmitButton( formName );
GlobWaitShow();
}
function GlobWaitShow () {
GlobWait.Trigger(1,0,1);
}
function GlobWaitHide () {
GlobWait.Trigger(0);
}
function GlobWaitStop () {
if ( GlobWaitTimeoutID ) {
clearTimeout( GlobWaitTimeoutID );
GlobWaitTimeoutID = null;
}
}
function GlobWaitShowForce () {
GlobWait.Trigger(1);
}
function GlobWaitShowSticky () {
GlobWait.Trigger(1,1);
}
var GlobWait = new function ()
{
this.ID = 'GlobWaitID';
this.CoverID = 'GlobWaitCoverID';
this.ContentID = 'GlobWaitContentID';
this.Trigger = function ( Context, HideLabel, WithoutCover )
{
var $$ = function ( Element ) { return document.getElementById( Element ); };
if ( ! $$( this.ID ) ) return false;
$$( this.ID ).style.display = ( ( Context && ! HideLabel ) ? 'block' : 'none' );
$$( this.CoverID ).style.display = ( Context && ! WithoutCover ? 'block' : 'none' );
var Agent = window.navigator.userAgent.toLowerCase();
if ( Agent.indexOf( 'msie' ) != -1 && Agent.indexOf( 'opera' ) == -1 ) this.IESelect( ! Context );
};
this.IESelect = function ( Context )
{
var IsDefined = function ( Object ) { return typeof( Object ) != 'undefined' && Object != null; };
var Element = document;
var Selects = Element.getElementsByTagName( 'select' );
for ( var i = 0; i < Selects.length; i++ ) {
var Select = Selects[ i ];
if ( ! IsDefined( Select.__Visibility ) ) Select.__Visibility = ( Select.style.visibility ? Select.style.visibility : 'visible' );
Select.style.visibility = ( Context ? Select.__Visibility : 'hidden' );
}
};
}();
GlobAttachEvent( window, 'scroll', function () {
var objContent = GlobGetBlock( GlobWait.ContentID );
if ( ! objContent ) return false;
var objPosition = objContent.parentNode.parentNode;
if ( ! objPosition ) return false;
objPosition.style.top = GlobWindowScroll().top + 'px';
objPosition.style.right = '0px';
return true;
} );
function GlobQueueCheckStatus() {
if ( bGlobAbort ) {
GlobWaitHide();
return false;
}
GlobWaitShow();
var strBailOutUrl = GlobPanelCurrentBaseUrl + '/logout.mhtml';
var nTimeOutPeriod = 1000 * 2;
var nMaxTries = 200;
var nMyStatus  = GlobCheckStatus();
nLoopCount++;
if ( (nLoopCount > nMaxTries) || (nMyStatus < 0) ) {
alert('Sorry, there was an error loading your inventory.' + "\n" + 'Please try logging in again.');
GlobChangeLocation( strBailOutUrl );
return nMyStatus;
} else if ( nMyStatus > 0 ) {
nGlobCustomerLoaded = nMyStatus;
return nMyStatus;
}
setTimeout( 'GlobQueueCheckStatus();', nTimeOutPeriod );
return false;
}
/* Including: coolmenu.js, $Id: coolmenu.js,v 1.12 2008/02/21 17:23:50 assent Exp $ */

window.CMenus = [];
window.CMenuHideTimers = [];
var BLANK_IMAGE = "/spacer.gif";
function bw_check()
{
var is_major = parseInt( navigator.appVersion );
this.nver = is_major;
this.ver = navigator.appVersion;
this.agent = navigator.userAgent;
this.dom = document.getElementById ? 1 : 0;
this.opera = window.opera ? 1 : 0;
this.ie5 = ( this.ver.indexOf( "MSIE 5" ) >- 1 && this.dom && ! this.opera ) ? 1 : 0;
this.ie6 = ( this.ver.indexOf( "MSIE 6" ) >- 1 && this.dom && ! this.opera ) ? 1 : 0;
this.ie4 = ( document.all && ! this.dom && ! this.opera ) ? 1 : 0;
this.ie = this.ie4 || this.ie5 || this.ie6;
this.mac = this.agent.indexOf( "Mac" ) >- 1;
this.ns6 = ( this.dom && parseInt( this.ver ) >= 5 ) ? 1 : 0;
this.ie3 = ( this.ver.indexOf( "MSIE" ) && ( is_major < 4 ) );
this.hotjava = ( this.agent.toLowerCase().indexOf( 'hotjava' ) !=-1 ) ? 1 : 0;
this.ns4 = ( document.layers && ! this.dom && ! this.hotjava ) ? 1 : 0;
this.bw = ( this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera );
this.ver3 = ( this.hotjava || this.ie3 );
this.opera7 = ( ( this.agent.toLowerCase().indexOf( 'opera 7' ) >- 1 ) || ( this.agent.toLowerCase().indexOf( 'opera/7' ) >- 1 ) );
this.operaOld = this.opera && ! this.opera7;
return this;
}
function nn( val )
{
return val != null;
}
function und( val )
{
return typeof( val ) == 'undefined';
}
function COOLjsMenu( name, items, baseUrl )
{
if ( ! get_div( name ) ) return;
this.bw = new bw_check();
this.bi = new Image();
this.bi.src = baseUrl + BLANK_IMAGE;
if ( !window.CMenus ) 
{
window.CMenus=[];
}
window.CMenus[ name ] = this;
if ( !window.CMenuHideTimers ) 
{
window.CMenuHideTimers=[];
}
window.CMenuHideTimers[ name ] = null;
this.name = name;
this.root = [];
this.root.par = null;
this.root.cd = [];
this.root.fmt = items[ 0 ];
this.items = [];
this.root.frameoff = items[ 0 ].pos ? items[ 0 ].pos : [ 0, 0 ];
this.root.lvl = new CMenuLevel( this, this.root );
for ( var i = 1; i < items.length; i++) 
{
if ( !und( items[ i ] ) ) 
{
new CMenuItem( this, this.root, items[ i ], und( items[ i ].format ) ? items[ 0 ] : items[ i ].format );
}
}
this.wm_get_pos = function()
{
if( this.bw.ns4 ) return; 
var ml = 99999; 
var mt = 0; 
var c = this.root.cd;
for ( var i = 0; i < c.length; i++ )
{
if ( c[ i ].pos[ 0 ] < ml ) ml = c[ i ].pos[ 0 ];
if ( c[ i ].pos[ 1 ] > mt ) mt = c[ i ].pos[ 1 ];
}
var fn = this.root.cd[ 0 ];
if(fn)
{	
return [ parseInt( ml ), parseInt( mt + fn.size[ 0 ] + fn.style.shadow ) ];
}
else
{
return [ 0,0 ];
}
}
this.wm_show = function()
{
if( this.bw.ns4 ) return; 
var div = get_div( this.name + '_wm' );
div.style.visibility = 'visible';
}
this.wm_move = function()
{
if( this.bw.ns4 ) return; 
var p = this.wm_get_pos();
var div = get_div( this.name + '_wm' );
if ( this.bw.ns4 ) div.moveTo( p[ 0 ], p[ 1 ] ); 
else{
div.style.left = p[ 0 ]; 
div.style.top = p[ 1 ];
}
}
this.wm_draw = function(x,y)
{
if( this.bw.ns4 ) return; 
var p = this.wm_get_pos();
return adiv( this.bw, this.name + '_wm', 0, p[ 0 ], p[ 1 ], 0, 0, '', '' );
}
this.draw = function()
{ 
var strItems = '';
for ( var i = 0; i < this.items.length; i++ ) {
strItems += this.items[ i ].draw();
}
strItems += this.wm_draw();
var mainDiv = get_div(this.name);
if ( mainDiv ) {
mainDiv.innerHTML = strItems;
}
}
this.hide = function()
{
if ( this.root.fmt.popup )
{ 
this.root.lvl.vis( 0 );
}
else {
for ( var i = 0; i < this.root.cd.length; i++ ) 
{
if ( this.root.cd[ i ].lvl )
{
this.root.cd[ i ].lvl.vis( 0 );
}
}
this.root.lvl.a = null;
this.root.lvl.draw();
if ( this.root.fmt.hidden_top ) 
{
this.root.lvl.vis( 0 );
}
}
}
this.mpopup = function( ev, offX, offY )
{
var x = ev.pageX ? ev.pageX : ( this.bw.opera ? ev.clientX : this.bw.ie4 ? ev.clientX + document.body.scrollLeft : ev.x + document.body.scrollLeft );
var y = ev.pageY ? ev.pageY : ( this.bw.opera ? ev.clientY : this.bw.ie4 ? ev.clientY + document.body.scrollTop : ev.y + document.body.scrollTop );
var po = this.root.fmt.popupoff;
y += offY ? offY : po ? po[ 0 ] : 0;
x += offX ? offX : po ? po[ 1 ] : 0;
this.popup( x, y );
}
this.popup = function( x, y )
{
this.move( x, y );
this.root.lvl.a = null;
this.root.lvl.vis( 1 );
mEvent( this.name, 0, 't' );
mEvent( this.name, 0, '0' );
}
this.move = function( x, y )
{
if ( !this.root.pos || this.root.pos[ 0 ] != x || this.root.pos[ 1 ] != y ) 
{
this.root.pos = [ x, y ];
this.root.loff = [ 0, 0 ];
this.root.ioff = [ 0, 0 ];
for ( var i = 0; i < this.items.length; i++ )
{
this.items[ i ].setPosFromParent();
this.items[ i ].move( this.items[ i ].pos[ 0 ], this.items[ i ].pos[ 1 ] );
}	
this.wm_move();
}
}
this.draw();
this.wm_show();
if ( !this.root.fmt.popup && !this.root.fmt.hidden_top )
{
this.root.lvl.vis( 1 );
}
else 
{
this.root.lvl.vis( 0 );
}
}
function CMenuLevel( menu, par )
{
this.menu = menu;
this.par = par;
this.v = 0;
this.vis = function( s )
{
var ss = this.v;
this.v = s;
var l = this.par.cd.length;
for ( var i = 0; i < l; i++ )
{
var n = this.par.cd[ i ];
if ( n.hc() && n.lvl.v && !s )
{
n.lvl.vis( s );
}
n.vis( s );
}
if ( !s ) this.a = null;
if ( this.v != ss && this.menu.onlevelshow ) this.menu.onlevelshow( this );
}
this.setA = function( idx, s )
{
var n = this.menu.items[ idx ];
if ( nn( this.a ) && n.par.lvl != this.a.par.lvl ) return;
if( s && n.hc() ) n.lvl.vis( 1 );
if( s && n != this.a && nn( this.a ) && this.a.hc() && this.a.lvl.v ) this.a.lvl.vis( 0 );
this.a = n;
this.draw();
}
this.draw = function()
{
if ( this.menu.root.lvl == this && this.menu.root.fmt.hidden_top ) return;
for ( var i = 0; i < this.par.cd.length; i++ )
{
if ( this.par.cd[ i ] == this.a )
{
this.par.cd[ i ].setVis( 'o' );
}
else
{
this.par.cd[ i ].setVis( 'n' );
}
}
}
}
function CMenuItem( menu, par, item, format )
{
if ( und( item ) ) return;
this.lvl = null;
this.par = par;
this.code = item.code;
this.ocode = item.ocode ? item.ocode : item.code;
this.targ = und( item.target ) ? "" : 'target="' + item.target + '" ';
this.url = und( item.url ) ? "javascript:none()" : item.url;
this.onclick = und( item.onclick ) ? null : item.onclick;
this.fmt = format;
this.menu = menu;
this.bw = menu.bw;
this.cd = [];
this.divs = [];
this.index = menu.items.length;
menu.items[ menu.items.length ] = this;
this.pindex = par.cd.length;
par.cd[ par.cd.length ] = this;
this.id = "cmi" + this.menu.name + "_" + this.index;
this.v = 0;
this.state = 'n';
this.diva = [ "b","s","o","n","e" ];
this.hc = function()
{ 
return this.cd.length > 0;
}
this.div = function( n )
{
return und( this.divs[ n ] ) ? this.divs[ n ] = get_div( this.id + n ) : this.divs[ n ];
}
this.draw = function ()
{	
var b = this.style.border;
var s = this.style.shadow;
if(this.url){
return( !this.style.shadow ? "" : adiv( this.menu.bw, this.id + "s", parseInt( this.z ) + 1, this.pos[ 0 ] + s, this.pos[ 1 ] + s, this.size[ 1 ], this.size[ 0 ], this.style.color.shadow, "", "" ) ) + 
( !this.style.border ? "" : adiv( this.menu.bw, this.id + "b", parseInt( this.z ) + 2, this.pos[ 0 ], this.pos[ 1 ], this.size[ 1 ], this.size[ 0 ], this.style.color.border, "", "" ) ) + 
adiv( this.menu.bw, this.id + "o", parseInt( this.z ) + 3, this.pos[ 0 ] + b, this.pos[ 1 ] + b, this.size[ 1 ] - b * 2, this.size[ 0 ] - b * 2, this.style.color.bgOVER, '<div class="' + this.style.css.OVER + '">' + this.ocode + '</div>', "" ) + 
adiv( this.menu.bw, this.id + "n", parseInt( this.z ) + 4, this.pos[ 0 ] + b, this.pos[ 1 ] + b, this.size[ 1 ] - b * 2, this.size[ 0 ] - b * 2, this.style.color.bgON, '<div class="' + this.style.css.ON + '">' + this.code + '</div>', "" ) +	
adiv( this.menu.bw, this.id + "e", parseInt( this.z ) + 5, this.pos[ 0 ] + b, this.pos[ 1 ] + b, this.size[ 1 ] - b * 2, this.size[ 0 ] - b * 2, "", '<a href="' + this.url + '" ' + this.targ + 'onclick="return mEvent(\'' + this.menu.name + '\',' + this.index + ',\'c\');"  onmouseover="mEvent(\'' + this.menu.name + '\',' + this.index + ',\'o\');" onmouseout="mEvent(\'' + this.menu.name + '\',' + this.index + ',\'t\');">' + '<img src="' + this.menu.bi.src + '" width="' + this.size[ 1 ] + '" height="' + this.size[ 0 ] + '" border="0"></a>', "", '' ); 
}else{
return ( !this.style.shadow ? "" : adiv( this.menu.bw, this.id + "s", parseInt( this.z ) + 1, this.pos[ 0 ] + s, this.pos[ 1 ] + s, this.size[ 1 ], this.size[ 0 ], this.style.color.shadow, "", "" ) ) + 
( !this.style.border ? "" : adiv( this.menu.bw, this.id + "b", parseInt( this.z ) + 2, this.pos[ 0 ], this.pos[ 1 ], this.size[ 1 ], this.size[ 0 ], this.style.color.border, "", "" ) ) + 
adiv( this.menu.bw, this.id + "o", parseInt( this.z ) + 3, this.pos[ 0 ] + b, this.pos[ 1 ] + b, this.size[ 1 ] - b * 2, this.size[ 0 ] - b * 2, this.style.color.bgOVER, '<div class="' + this.style.css.OVER + '">' + this.ocode + '</div>', "" ) + 
adiv( this.menu.bw, this.id + "n", parseInt( this.z ) + 4, this.pos[ 0 ] + b, this.pos[ 1 ] + b, this.size[ 1 ] - b * 2, this.size[ 0 ] - b * 2, this.style.color.bgON, '<div class="' + this.style.css.ON + '">' + this.code + '</div>', "" ) +	
adiv( this.menu.bw, this.id + "e", parseInt( this.z ) + 5, this.pos[ 0 ] + b, this.pos[ 1 ] + b, this.size[ 1 ] - b * 2, this.size[ 0 ] - b * 2, "", '<img src="' + this.menu.bi.src + '" width="' + this.size[ 1 ] + '" height="' + this.size[ 0 ] + '" border="0">', "", '' ); 
}
}
this.vis = function( s )
{
if ( this.style.shadow ) this.visDiv( "s", s );
if ( this.style.border ) this.visDiv( "b", s );
if ( !s ) {
this.visDiv( "o", 0 );
this.visDiv( "n", 0 );
this.state = "n";
}
else if ( this.state == "n" )
this.visDiv( "n", 1 );
else
this.visDiv( "o", 1 );
this.visDiv( "e", s );
}
this.setVis = function ( n )
{
if ( this.state != n )
switch ( n ){
case "n":
this.visDiv( "n", 1 );
this.visDiv( "o", 0 );
break;
case "o":
this.visDiv( "n", 0 );
this.visDiv( "o", 1 );
break;
}
this.state = n;
}
this.visDiv = this.bw.ns4 ? visDivNS : visDivDom;
this.getf = function( obj, name )
{
if ( !und( obj ) && nn( obj ) && !und( obj.fmt ) ) 
{
if ( !und( obj.fmt[ name ] ) )
return obj.fmt[ name ]; 
if ( obj.par != this.menu.root && obj.par && obj.par.sub && obj.par.sub[ 0 ][ name ] ) 
return obj.par.sub[ 0 ][ name ]; 
return this.getf( obj.par, name );
}
return;
}
this.ioff = this.getf( this, "itemoff" );
this.loff = this.getf( this, "leveloff" );
this.style = this.getf( this, "style" );
this.size = this.getf( this, "size" );
this.prev = this.pindex == 0 ? null : this.par.cd[ this.pindex - 1 ];
this.setPos = function()
{
if ( this.prev == null )
{
this.z = this.par == this.menu.root ? 0 : parseInt( this.par.z ) + 10;
this.pos = und( this.fmt.pos ) ? ( this.par == this.menu.root ? this.menu.root.fmt.pos : this.pos = [ this.par.pos[ 0 ] + this.loff[ 1 ], this.par.pos[ 1 ] + this.loff[ 0 ] ] ) : this.fmt.pos;
}
else
{
this.prev.next = this;
this.z = this.prev.z;
this.pos = [ this.prev.pos[ 0 ] + this.ioff[ 1 ], this.prev.pos[ 1 ] + this.ioff[ 0 ] ];
}
}
this.setPos();
this.sub = item.sub;
if ( !und( this.sub ) && !und( this.sub.length ) && this.sub.length > 0 )
{
this.lvl = new CMenuLevel( menu, this );
for ( var i = 1; i < this.sub.length; i++)
{
if ( !und( this.sub[ i ] ) )
{
new CMenuItem( this.menu, this, this.sub[ i ], und( this.sub[ i ].format ) ? this.sub[ 0 ] : this.sub[ i ].format );
}
}
}
this.setPosFromParent = function()
{
if ( this.index == 0 ) 
{
this.pos = [ this.menu.root.pos[ 0 ], this.menu.root.pos[ 1 ] ];
} else 
if ( this.prev == null ){
this.pos = [ this.par.pos[ 0 ] + this.loff[ 1 ], this.par.pos[ 1 ] + this.loff[ 0 ] ];
}else{
this.pos = [ this.prev.pos[ 0 ] + this.ioff[ 1 ], this.prev.pos[ 1 ] + this.ioff[ 0 ] ];
}
}
this.move = function( x, y )
{
var bl = bt = this.style.border;
if ( this.style.shadow ) this.moveTo( x + parseInt( this.style.shadow ), y + parseInt( this.style.shadow ), "s" );
if ( this.style.border ) this.moveTo( x, y, "b" );
this.moveTo( x + bl, y + bt, "o" );
this.moveTo( x + bl, y + bt, "n" );
this.moveTo( x + bl, y + bt, "e" );
}
this.moveTo = function( x, y, b )
{
if ( this.bw.ns4 )
{
this.div( b ).moveTo( x, y );
}
else
{
this.div( b ).style.left = x;
this.div( b ).style.top = y;
}
}
return this;
}
function adiv( bw, name, z, left, top, width, height, bgc, code, otherCSS, otherDIV )
{
if ( typeof( otherCSS ) == 'undefined' || otherCSS == null ) otherCSS = '';
if ( typeof( otherDIV ) == 'undefined' || otherDIV == null ) otherDIV = '';
return '<div id="' + name + '" style="position:absolute;z-index:' + z + ';left:' + left + 'px;top:' + top + 'px;width:' + width + 'px;height:' + height + 'px;visibility:hidden;' + otherCSS + ';" class="' + bgc + '" ' + otherDIV + '>' + code + '</div>';
}
function get_div( name )
{
return new bw_check().ns4 ? document.layers[ name ] : document.all ? document.all[ name ] : document.getElementById( name );
}
function visDivNS( d, s )
{
this.div( d ).visibility = s ? 'show' : 'hide';
}
function visDivDom( d, s )
{
this.div( d ).style.visibility = s ? 'visible' : 'hidden';
}
function mEvent( m, node_index, e ) 
{
if ( !window.CMenuHideTimers ) window.CMenuHideTimers = [];
if ( !window.CMenus ) window.CMenus = [];
if ( und( window.CMenus[ m ] ) || ! nn( window.CMenus[ m ] ) ) return true; 
if ( nn( window.CMenuHideTimers[ m ] ) ) 
{
window.clearTimeout( window.CMenuHideTimers[ m ] );
window.CMenuHideTimers[ m ] = null;
}
switch ( e )
{
case "o": 
window.CMenus[ m ].items[ node_index ].par.lvl.setA( node_index, 1 );
if (window.CMenus[ m ].onmouseover) window.CMenus[ m ].onmouseover( window.CMenus[ m ].items[ node_index ] );
break;
case "c":
if ( window.CMenus[ m ].items[ node_index ].hc() ) {
var vv1 = window.CMenus[ m ].items[ node_index ].lvl.v;
window.CMenus[ m ].items[ node_index ].lvl.vis( !vv1 );
} else {
for ( var i = 0; i < window.CMenus[ m ].root.cd.length; i++ ) {
if ( nn( window.CMenus[ m ].root.cd[ i ].lvl ) ) {
window.CMenus[ m ].root.cd[ i ].lvl.vis( 0 );
}
}
}
if (window.CMenus[m].onclick) window.CMenus[m].onclick(window.CMenus[m].items[node_index]);
var onClickVal = window.CMenus[ m ].items[ node_index ].onclick;
if ( typeof( onClickVal ) != 'undefined' && ( onClickVal != null ) ) {
try { return eval (onClickVal); } catch (e) {}
}
break;
case "t": 
window.CMenuHideTimers[ m ] = setTimeout( 'window.CMenus["' + m + '"].hide()', und( window.CMenus[ m ].root.fmt.delay ) ? 600 : window.CMenus[ m ].root.fmt.delay );
if ( window.CMenus[ m ].onmouseout ) window.CMenus[ m ].onmouseout( window.CMenus[ m ].items[ node_index ] );
break;
}
return true;
}
function CMOnLoad()
{
var bw = new bw_check();
if ( bw.operaOld ) window.operaResizeTimer = setTimeout( 'resizeHandler()', 1000 );
if ( typeof( window.oldCMOnLoad ) == 'function' ) window.oldCMOnLoad();
if ( bw.ns4 ) window.onresize = resizeHandler;
}
function resizeHandler() 
{
if ( window.reloading ) return;
if ( !window.origWidth ) 
{
window.origWidth = window.innerWidth;
window.origHeight = window.innerHeight;
}
var reload = window.innerWidth != window.origWidth || window.innerHeight != window.origHeight;
window.origWidth = window.innerWidth;
window.origHeight = window.innerHeight;
if ( window.operaResizeTimer ) clearTimeout( window.operaResizeTimer );
if ( reload ) 
{
window.reloading = 1;
document.location.reload();
return;
};
if ( new bw_check().operaOld )
{
window.operaResizeTimer = setTimeout( 'resizeHandler()', 500 ); 
}
}
function CMenuPopUp( menu, evn, offX, offY )
{
window.CMenus[ menu ].mpopup( evn, offX, offY );
}
function CMenuPopUpXY( menu, x, y )
{
window.CMenus[ menu ].popup( x, y );
}
/* Including: topmenu.js, $Id: topmenu.js,v 1.20 2008/02/21 17:23:50 assent Exp $ */

var MenuConfig = function ( ID, ImageUrl, bIsHorizontal ) {
this.ID = ID;
this.MenuItems  = [];
this.MenuConfig = [];
this.SetHorizontal( bIsHorizontal );
this.MenuStyleTopLevel = {'border':0,'shadow':0,'color':{'bgON':this.ID+'_'+'color_TopLevel_bgON','bgOVER':this.ID+'_'+'color_TopLevel_bgOVER','border':this.ID+'_'+'color_TopLevel_border','shadow':this.ID+'_'+'color_TopLevel_shadow'},'css':{'ON':this.ID+'_'+'MainMenuLink',  'OVER':this.ID+'_'+'MainMenuLink'}};
this.MenuStyleCurrent  = {'border':1,'shadow':0,'color':{'bgON':this.ID+'_'+'color_Current_bgON', 'bgOVER':this.ID+'_'+'color_Current_bgOVER', 'border':this.ID+'_'+'color_Current_border', 'shadow':this.ID+'_'+'color_Current_shadow'}, 'css':{'ON':this.ID+'_'+'LinkActiveMenu','OVER':this.ID+'_'+'LinkActiveMenu'}};
this.MenuStyleActive   = {'border':1,'shadow':0,'color':{'bgON':this.ID+'_'+'color_Active_bgON',  'bgOVER':this.ID+'_'+'color_Active_bgOVER',  'border':this.ID+'_'+'color_Active_border',  'shadow':this.ID+'_'+'color_Active_shadow'},  'css':{'ON':this.ID+'_'+'LinkMenu',      'OVER':this.ID+'_'+'LinkMenu'}};
this.MenuStyleInactive = {'border':1,'shadow':0,'color':{'bgON':this.ID+'_'+'color_Inactive_bgON','bgOVER':this.ID+'_'+'color_Inactive_bgOVER','border':this.ID+'_'+'color_Inactive_border','shadow':this.ID+'_'+'color_Inactive_shadow'},'css':{'ON':this.ID+'_'+'DisabledMenu',  'OVER':this.ID+'_'+'DisabledMenu'}};
this.Styles = [];
this.Styles[0] = this.CreateStyleEntry();
this.Styles[1] = this.MenuStyleTopLevel;
this.Styles[2] = this.MenuStyleActive;
this.Styles[3] = this.MenuStyleActive;
this.Styles[4] = this.MenuStyleActive;
this.StyleInactive = this.MenuStyleInactive;
this.StyleSelected = this.MenuStyleCurrent;
this.DefaultHeight = 20;
this.DefaultWidth  = 160;
this.DefaultRootWidth  = this.DefaultWidth;
this.DefaultRootHeight = this.DefaultHeight;
this.ArrowRightImage = 'arrow_right.gif';
this.ArrowDownImage  = 'arrow_down.gif';
this.ImageUrl = ImageUrl;
}
MenuConfig.prototype.SetHorizontal = function ( bHorizontal ) {
this.isHorizontal = bHorizontal;
this.VERTICAL   = 'vertical';
this.HORIZONTAL = 'horizontal';
this.DropDown = [];
this.DropDown[0] = '';
this.DropDown[1] = this.isHorizontal ? this.HORIZONTAL : this.VERTICAL;
this.DropDown[2] = this.VERTICAL;
this.DropDown[3] = this.VERTICAL;
this.DropDown[4] = this.VERTICAL;
}
MenuConfig.prototype.Position = function () {
var menu_ieMac     = ( navigator.userAgent.indexOf( "Mac" ) > -1 ) ? true : false;
var menu_top_pos_0 = parseInt( GlobGetLeft( GlobGetBlock( this.ID ) ) );
var menu_top_pos_1 = parseInt( GlobGetTop(  GlobGetBlock( this.ID ) ) );
var menu_hasToolTip = false;
if ( menu_ieMac && ( menu_hasToolTip == true || menu_hasToolTip == 1 ) ) {
menu_top_pos_1 = 0;
}
this.MenuItems[ 0 ] = this.CreateFormatEntry();
this.MenuItems[ 0 ].pos = [ menu_top_pos_0, menu_top_pos_1 ];
}
MenuConfig.prototype.CreateMenuEntry = function () {
return {'code':'','url':'','format':this.CreateFormatEntry(),'sub':[],'ocode':'','target':''};
}
MenuConfig.prototype.CreateFormatEntry = function () {
return {'style':this.CreateStyleEntry(),'size':[0,0],'leveloff':[0,0],'itemoff':[0,0],'popup':0,'hidden_top':0,'popupoff':[0,0]};
}
MenuConfig.prototype.CreateStyleEntry = function () {
return {'border':0,'shadow':0,'color':{'bgON':'','bgOVER':'','border':'','shadow':''},'css':{'ON':'','OVER':''}}
}
MenuConfig.prototype.AddMenuEntry = function ( Link, Name, bIsActive, bIsCurrent, indexes, menus, OnClick ) {
if ( typeof( menus ) == 'undefined' || menus == null ) {
menus = this.MenuConfig;
}
if ( indexes.length == 0 ) return;
var index = indexes.shift();
if ( ! menus[ index ] ) {
menus[ index ] = {'link':'','name':'','MenuConfig':[],'inactive':0,'current':0,'onclick':OnClick};
}
if ( indexes.length == 0 ) {
menus[ index ].link    = Link;
menus[ index ].name    = Name;
menus[ index ].onclick = OnClick;
menus[ index ].inactive = bIsActive  ? 0 : 1;
menus[ index ].current  = bIsCurrent ? 1 : 0;
return;
}
return this.AddMenuEntry( Link, Name, bIsActive, bIsCurrent, indexes, menus[ index ].MenuConfig, OnClick );
}
MenuConfig.prototype.InitDeclaration = function ( Depth, CurrentMenu, CurrentMenuConfig, PreviousMenu ) {
if ( typeof( Depth ) == 'undefined' || Depth == null ) {
Depth = 1;
}
if ( typeof( CurrentMenu ) == 'undefined' || CurrentMenu == null ) {
CurrentMenu = this.MenuItems;
}
if ( typeof( CurrentMenuConfig ) == 'undefined' || CurrentMenuConfig == null ) {
CurrentMenuConfig = this.MenuConfig;
}
if ( typeof( PreviousMenu ) == 'undefined' || PreviousMenu == null ) {
PreviousMenu = {};
}
CurrentMenu[ 0 ] = this.CreateFormatEntry();
var objContainer = document.getElementById( this.ID );
for( var i = 1; i < CurrentMenuConfig.length; i++ ) {
CurrentMenu[ i ] = this.CreateMenuEntry();
CurrentMenu[ i ].url  = CurrentMenuConfig[ i ].link;
CurrentMenu[ i ].code = CurrentMenuConfig[ i ].name;
CurrentMenu[ i ].onclick = CurrentMenuConfig[ i ].onclick;
CurrentMenu[ i ].format.style = this.Styles[ Depth ];
CurrentMenu[ i ].format.size[0] = this.DefaultHeight;
CurrentMenu[ i ].format.size[1] = this.DefaultWidth;
if ( Depth == 1 ) CurrentMenu[ i ].format.size[1] = this.DefaultRootWidth;
if ( Depth == 1 && this.DropDown[ Depth ] == this.HORIZONTAL ) {
var tmpObj = document.createElement( 'span' );
tmpObj.style.visibility = 'hidden';
tmpObj.innerHTML = CurrentMenu[ i ].code;
tmpObj.className = this.ID+'_'+'MainMenuLink';
objContainer.appendChild( tmpObj );
var offset = 3 + tmpObj.offsetWidth + 3;
objContainer.removeChild( tmpObj );
CurrentMenu[ i ].format.size[1] = offset;
} else {
if ( CurrentMenuConfig[ i ].MenuConfig.length > 0 && ! CurrentMenuConfig[ i ].inactive ) {
if ( this.DropDown[ Depth ] == this.VERTICAL ) {
CurrentMenu[ i ].code += '<img src="' + this.ImageUrl + '/' + this.ArrowRightImage + '" width="10" height="7" vspace="0" hspace="4" border="0" align="absmiddle">';
} else {
CurrentMenu[ i ].code += '<img src="' + this.ImageUrl + '/' + this.ArrowDownImage + '" width="10" height="7" vspace="0" hspace="4" border="0" align="absmiddle">';
}
}
CurrentMenu[ i ].format.size[1] += 10;
}
if ( this.DropDown[ Depth ] == this.HORIZONTAL ) {
CurrentMenu[ i ].format.itemoff  = [ 0, CurrentMenu[ i ].format.size[1] ];
CurrentMenu[ i ].format.leveloff = [ CurrentMenu[ i ].format.size[0], 0 ];
if ( this.DropDown[ Depth - 1 ] == this.VERTICAL ) {
CurrentMenu[ i ].format.itemoff  = [ 0, CurrentMenu[ i ].format.size[1] ];
CurrentMenu[ i ].format.leveloff = [ 0, PreviousMenu.format.size[1] ];
} else {
if ( Depth == 1 && i > 1 ) {
CurrentMenu[ i ].format.itemoff  = [ 0, CurrentMenu[ i - 1 ].format.size[1] ];
CurrentMenu[ i ].format.leveloff = [ CurrentMenu[ i - 1 ].format.size[0], 0 ];
}
}
} else {
CurrentMenu[ i ].format.itemoff  = [ CurrentMenu[ i ].format.size[0], 0 ];
CurrentMenu[ i ].format.leveloff = [ 0, CurrentMenu[ i ].format.size[1] ];
if ( this.DropDown[ Depth - 1 ] == this.HORIZONTAL ) {
CurrentMenu[ i ].format.itemoff  = [ PreviousMenu.format.size[0], 0 ];
CurrentMenu[ i ].format.leveloff = [ PreviousMenu.format.size[0], 0 ];
} else {
if ( Depth != 1 ) {
CurrentMenu[ i ].format.itemoff  = [ PreviousMenu.format.size[0], 0 ];
CurrentMenu[ i ].format.leveloff = [ 0, PreviousMenu.format.size[1] ];
}
}
}
if ( Depth == 1 ) {
if( CurrentMenuConfig[ i ].inactive ) {
CurrentMenu[ i ].format.style = this.StyleInactive;
CurrentMenu[ i ].url = '';
}
if( CurrentMenuConfig[ i ].current ) {
CurrentMenu[ i ].format.style = this.StyleSelected;
}
}
this.InitDeclaration( Depth + 1, CurrentMenu[ i ].sub, CurrentMenuConfig[ i ].MenuConfig, CurrentMenu[ i ] );
}
}
MenuConfig.prototype.Compile = function () {
this.InitDeclaration();
this.Position();
}
MenuConfig.prototype.ScaleContainer = function () {
var menuContainer = GlobGetBlock( this.ID );
var numMenus = this.MenuItems.length - 1;
var numHeight;
var numWidth;
if ( this.isHorizontal ) {
numHeight = this.DefaultRootHeight;
var drw = 0;
for( var i = 1; i <= numMenus; i++ ){
drw += this.MenuItems[ i ].format.size[1];
}
numWidth  = drw;
} else {
numHeight = numMenus * this.DefaultRootHeight;
numWidth  = this.DefaultRootWidth;
}
menuContainer.style.height = numHeight + 'px';
menuContainer.style.width  = numWidth  + 'px';
}
function MenuCreateMenu( MenuConfig ) {
MenuConfig.Compile();
new COOLjsMenu( MenuConfig.ID, MenuConfig.MenuItems, MenuConfig.ImageUrl );
}
/* Including: punycode.js, $Id: clean-js-sources.pl,v 1.6.2.1 2008/04/02 09:02:00 andreik Exp $ */

var outMain = '';
var input = new Array();
var case_flags = new Array();
var output = new Array();
var base = 36;
var tmin = 1;
var tmax = 26;
var skew = 38;
var damp = 700;
var initial_bias = 72;
var initial_n	 = 0x80;
var delimiter	 = 0x41;
var punycode_success    = 0;
var punycode_bad_input  = 1;
var punycode_big_output = 2;
var punycode_overflow   = 3;
function flagged(bcp){ return((bcp) - 65 < 26); }
var maxint = parseInt( 0x0ffffffff );
function basic(cp){ return ((cp) < 0x80); }
function delim(cp){ return ((cp) == delimiter);}
function decode_digit( cp)
{
return  parseInt( cp - 48 < 10 ? cp - 22 :  cp - 65 < 26 ? cp - 65 : cp - 97 < 26 ? cp - 97 :  base );
}
function encode_digit(d, flag)
{
return parseInt( d + 22 + 75 * (d < 26) - ((flag != 0) << 5) );
}
function encode_basic(bcp, flag)
{
bcp -= parseInt( (bcp - 97 < 26) << 5 );
return parseInt( bcp + ((!flag && (bcp - 65 < 26)) << 5) );
}
function hasMultiByte ( inString ) {
var hasMultiByte = 0;
for ( var i = 0; i <= inString.length; i++ ) {
if ( inString.charCodeAt( i ) > 255 ) {
hasMultiByte = 1;
}
}
return hasMultiByte;
}
function adapt(delta, numpoints, firsttime )
{
var k;
delta = firsttime ? delta / damp : delta >> 1;
delta += delta / numpoints;
for (k = 0;  delta > ((base - tmin) * tmax) / 2;  k += base) {
delta /= base - tmin;
}
return k + (base - tmin + 1) * delta / (delta + skew);
}
function punycode_encode(input_length, input, case_flags, output_length, output )
{
for(j = 0 ; j<255; j++){ output[j] = 0 ;}
var n, delta, h, b, out, max_out, bias, j, m, q, k, t;
var tld, domainPart, domainCut, tmpHolder;
outMain = '';
n = initial_n;
delta = out = 0;
max_out = output_length;
bias = initial_bias;
var input1  = input.split('@');
if(input1[1]){
tmpHolder = input1[0];
domainPart = input1[1];
domainCut = domainPart.split('.');
if( domainCut )
{
tld = domainCut.pop();
input = domainCut.join('.');
}
else
{
return 'error';
}
input_length = input.length;
}
else
{
input1 = input.split('.');
if( input1.length > 1 )
{
tld   = input1.pop();
input = input1.join('.');
}
else
{
input = input1[0];
}
input_length = input.length;
}
var re = new RegExp("[a-zA-Z0-9-_\.@]+");
var alphaOnly = new RegExp("[A-Za-z0-9]");
for (j = 0;  j < input_length;  ++j) {
if (basic(input.charCodeAt(j)) ) {
if ( !re.test(input[j]) ){ return("error");}
if (max_out - out < 2) return punycode_big_output;
if( !alphaOnly.test( input.charAt(j)))
{
output[out++] = delimiter;
output[out++] = delimiter;
output[out++] = input.charCodeAt(j);
output[out++] = delimiter;
}
else
{
output[out++] = input.charCodeAt(j);
}
}
}
h = b = out;
if (b > 0) output[out++] = delimiter;
while (h < input_length) {
for (m = maxint, j = 0;  j < input_length;  ++j) {
if (input.charCodeAt(j) >= n && input.charCodeAt(j) < m) m = input.charCodeAt(j);
}
if ((m - n) > ((maxint - delta) / (h + 1))) { return punycode_overflow;}
delta += (m - n) * (h + 1);
n = m;
for (j = 0;  j < input_length;  ++j) {
if (input.charCodeAt(j) < n  ) {
if (++delta == 0) { return punycode_overflow;}
}
if (input.charCodeAt(j) == n) {
for (q = delta, k = base;  ;  k += base) {
if (out >= max_out) return punycode_big_output;
t = k <= bias  ? tmin :	k >= bias + tmax ? tmax : k - bias;
if (q < t) break;
output[out++] = encode_digit(t + (q - t) % (base - t), 0);
q = (q - t) / (base - t);
}
output[out++] = encode_digit(q, case_flags && case_flags[j]);
bias = adapt(delta, h + 1, h == b);
delta = 0;
++h;
}
}
++delta, ++n;
}
for(j = 0; output[j] != 0 ; j++){
if(( output[j] > 0x20 ) && ( output[j] < 0x7f ) )
{	
outMain += String.fromCharCode(output[j]);
}
else
{
outMain += output[j];
}
}
if(tmpHolder){ outMain = tmpHolder + '@' + outMain;}
if(tld){ outMain += '.' +  tld;}
output_length = out;
return outMain;
}
/* Including: tools/sticky-note.js, $Id: sticky-note.js,v 1.4 2008/02/21 17:23:57 assent Exp $ */

function Note_NewInstance ( id )
{
var Note_This = new Object();
Note_This.ID     = id;
Note_This.ContID = 'fadeinbox';
Note_This.Position = 'center-center';
Note_This.Shown = false;
Note_This.DisplayFadeBox = function () {
Note_This.StaticFadeBox();
Note_This.Shown = true;
};
Note_This.HideFadeBox = function () {
var objref = GlobGetBlock( Note_This.ContID );
objref.style.visibility = 'hidden';
objref.style.display    = 'none';
Note_This.Shown = false;
};
Note_This.StaticFadeBox = function () {
var objref = GlobGetBlock( Note_This.ContID );
if ( ! objref ) return false;
objref.style.display    = 'block';
objref.style.position   = 'absolute';
var windowScroll = GlobWindowScroll();
var pageSize     = GlobPageSize();
var bodyWidth    = pageSize.windowWidth;
var bodyHeight   = pageSize.windowHeight;
var ie     = document.all && ! window.opera;
var iebody = document.compatMode == 'CSS1Compat' ? document.documentElement : document.body;
var scroll_top    = ie ? iebody.scrollTop : window.pageYOffset;
var scroll_bottom = 0 - scroll_top;
if ( ! Note_This.Position ) Note_This.Position = 'center-center';
if ( Note_This.Position == 'top-right' || Note_This.Position == 'bottom-right' || Note_This.Position == 'center-right' ) objref.style.right = 0 + 'px';
if ( Note_This.Position == 'top-left'  || Note_This.Position == 'bottom-left'  || Note_This.Position == 'center-left'  ) objref.style.left  = 0 + 'px';
if ( Note_This.Position == 'top-center'   || Note_This.Position == 'bottom-center' || Note_This.Position == 'center-center' ) objref.style.left = ( bodyWidth  - objref.clientWidth  ) / 2 + windowScroll.left + 'px';
if ( Note_This.Position == 'center-right' || Note_This.Position == 'center-left'   || Note_This.Position == 'center-center' ) objref.style.top  = ( bodyHeight - objref.clientHeight ) / 2 + windowScroll.top  + 'px';
if ( Note_This.Position == 'top-right'    || Note_This.Position == 'top-left'    || Note_This.Position == 'top-center'    ) objref.style.top    = scroll_top    + 'px';
if ( Note_This.Position == 'bottom-right' || Note_This.Position == 'bottom-left' || Note_This.Position == 'bottom-center' ) objref.style.bottom = scroll_bottom + 'px';
objref.style.visibility = 'visible';
};
return Note_This;
};
function Note_ProxyWrapper ( name, args ) {
var id = args[0];
var str = ''
for ( var i = 1; i < args.length; i++ ) {
str += 'args['+i+'],';
}
str = str.replace( /\,$/, '' );
var call = 'Note_Glob_InstanceObjects[ id ].'+name+'('+str+');';
var res = eval( call );
return res;
}
function Note_DisplayFadeBox_Wrapper () {
return Note_ProxyWrapper( 'DisplayFadeBox', arguments );
}
function Note_HideFadeBox_Wrapper () {
return Note_ProxyWrapper( 'HideFadeBox', arguments );
}
var Note_Glob_InstanceObjects = new Array();
function Note_InitInstance ( id, position )
{
var index = Note_Glob_InstanceObjects.length;
Note_Glob_InstanceObjects[ index ] = Note_NewInstance( index );
Note_Glob_InstanceObjects[ index ].ContID   = id;
Note_Glob_InstanceObjects[ index ].Position = position;
Note_Glob_InstanceObjects[ index ].DisplayFadeBox();
GlobAttachEvent( window, 'scroll', function () { if ( Note_Glob_InstanceObjects[ index ].Shown ) Note_DisplayFadeBox_Wrapper( index ); } );
GlobAttachEvent( window, 'resize', function () { if ( Note_Glob_InstanceObjects[ index ].Shown ) Note_DisplayFadeBox_Wrapper( index ); } );
return index;
}
/* Including: tools/sticky-tooltip.js, $Id: sticky-tooltip.js,v 1.15.2.1 2008/06/04 14:34:43 assent Exp $ */

var GlobPanelCurrentBaseUrl;
var StickyTooltip_LastShownTipID  = false;
var StickyTooltip_LastOpenedTipID = false;
var StickyTooltip_AppendNodes = false;
function StickyTooltip_OnMouseOver ( target, event, contentID ) {
var content = '';
var contentObject = GlobGetBlock( contentID );
if ( contentObject ) {
content = StickyTooltip_AppendNodes ? contentObject : contentObject.innerHTML;
} else if ( contentID ) {
content = contentID;
} else {
return makeFalse();
}
if ( StickyTooltip_AppendNodes ) {
if ( contentObject ) {
contentObject.style.visibility = 'visible';
contentObject.style.display    = 'block';
}
}
StickyTooltip_LastShownTipID = domTT_activate( 
target, event, 
'content', content, 
'styleClass', 'domTTOverlib',
'direction', 'south',
'closeAction', StickyTooltip_AppendNodes ? 'hide' : 'destroy'
);
return makeFalse();
}
function StickyTooltip_OnClick ( target, event, captionID, contentID ) {
if ( StickyTooltip_LastOpenedTipID ) {
domTT_close( StickyTooltip_LastOpenedTipID );
}
var caption = '';
var content = '';
var captionObject = GlobGetBlock( captionID );
if ( captionObject ) {
caption = StickyTooltip_AppendNodes ? captionObject : captionObject.innerHTML;
} else if ( captionID ) {
caption = captionID;
} else {
return makeFalse();
}
var contentObject = GlobGetBlock( contentID );
if ( contentObject ) {
content = StickyTooltip_AppendNodes ? contentObject : contentObject.innerHTML;
} else if ( contentID ) {
content = contentID;
} else {
return makeFalse();
}
if ( StickyTooltip_AppendNodes ) {
if ( captionObject ) {
captionObject.style.visibility = 'visible';
captionObject.style.display    = 'block';
}
if ( contentObject ) {
contentObject.style.visibility = 'visible';
contentObject.style.display    = 'block';
}
}
StickyTooltip_LastOpenedTipID = domTT_activate(
target, event, 
'caption', caption, 
'content', content, 
'type', 'sticky', 
'closeLink', '[X]', 
'draggable', false,
'styleClass', 'domTTOverlib',
'direction', 'southeast',
'closeAction', StickyTooltip_AppendNodes ? 'hide' : 'destroy',
true
);
return makeFalse();
}
function StickyTooltip_Hide ( target, event ) {
if ( StickyTooltip_LastShownTipID ) {
domTT_close( StickyTooltip_LastShownTipID );
}
if ( StickyTooltip_LastOpenedTipID ) {
domTT_close( StickyTooltip_LastOpenedTipID );
}
return makeFalse();
}
function StickyTooltip_UpdateContent ( content ) {
domTT_update( StickyTooltip_LastOpenedTipID, content );
return true;
}
function StickyTooltip_AttachEvent ( myObject, myEvent, myFunc )
{
if ( myObject.addEventListener ) {
myObject.addEventListener( myEvent, myFunc, false ); 
} else if ( myObject.attachEvent ) {
myObject.attachEvent( 'on' + myEvent, myFunc );
} else {
try {
var funcRef = eval( 'myObject.on' + myEvent );
var callRef = myFunc;
var newRef;
if ( typeof( funcRef ) != 'undefined' && funcRef != null ) {
newRef = function ( event ) { eval( funcRef )( event ); eval( callRef )( event ); };
} else {
newRef = callRef;
}
eval( 'myObject.on' + myEvent + ' = newRef;' );
} catch (e) {}
}
return true;
}
StickyTooltip_AttachEvent( window, 'resize', function () { StickyTooltip_Hide(); } );
var StickyTooltip_PopupMode    = true;
var StickyTooltip_DialogObject = null;
function StickyTooltip_Display( Content, URL, Witdh, Height )
{
if ( ! StickyTooltip_DialogObject ) {
StickyTooltip_DialogObject = new DisableDialog();
}
if ( Content ) StickyTooltip_DialogObject.setHtmlContent( Content );
if ( URL ) StickyTooltip_DialogObject.setSource( URL );
StickyTooltip_DialogObject.setSize(Witdh,Height);
StickyTooltip_DialogObject.display();
return false;
}
function StickyTooltip_Open( target, event, caption, content, width, height ) {
if ( StickyTooltip_PopupMode ) {
var Content = '';
var frameName = ( caption ? caption : 'Default' ) + '_name';
var nCaptionHeight = 20;
var nInfoID = 'StickyTooltip_Info_' + (new Date()).getTime();
caption = '<div>' + 
'<span style="float:left;" id="'+ nInfoID +'"><img src="'+GlobPanelCurrentBaseUrl+'/accessories/images/misc/loading.gif" border="0" /></span>' + 
'<span style="float:left;">' + ( caption ? caption : '&nbsp;' ) + '</span>' + 
'<span style="float:right; cursor:pointer;" onClick="return StickyTooltip_Close( this, event );">[X]</span>' + 
'<div class="globalSpacerFloat"></div>' + 
'</div>'
;
Content += '<div style="width:100%;height:100%;">';
Content += '<div style="width:100%;height:'+nCaptionHeight+'px;margin:0px;padding:0px;">';
Content += '<table border="0 cellpadding="0" cellspacing="0" class="globalWidth100" height="100%"><tr class="listHeadAcc"><td valign="middle" align="left" style="padding-top:0px;padding-bottom:0px;vertical-align:middle;">' + caption + '</td></tr></table>';
Content += '</div>';
Content += '<div style="width:100%;height:' + ( height - nCaptionHeight ) + 'px;margin:0px;padding:0px;">';
Content += '<iframe name="'+frameName+'" src="'+content+'" width="100%" height="100%" scrolling="auto" frameborder="0" onLoad="return StickyTooltip_OnLoadFrame( this, event, \''+nInfoID+'\' );"></iframe>';
Content += '</div>';
Content += '</div>';
StickyTooltip_Display( Content, null, width, height );
} else {
GlobNewExtWindow( content, width, height, 'status=no,titlebar=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes' );
}
return false;
}
function StickyTooltip_Close( target, event ) {
if ( StickyTooltip_PopupMode ) {
if ( StickyTooltip_DialogObject ) {
StickyTooltip_DialogObject.close();
StickyTooltip_DialogObject = null;
}
} else {
window.close();
}
return false;
}
function StickyTooltip_CloseWrapper( target, event, skipFallbackClose ) {
if ( window.opener ) {
window.close();
} else if ( window.parent && window.parent != window ) {
try {
window.parent.StickyTooltip_Close( target, event );
} catch (e) {
if ( ! skipFallbackClose ) {
GlobMkNavi( target );
var stickyCloseURL = 
( window.location.protocol == 'https:' ? GlobPanelPlainBaseUrl : GlobPanelSecureBaseUrl ) + 
'/accessories/static/common/sticky-close.html'
;
GlobChangeLocation( stickyCloseURL );
}
};
} else {
StickyTooltip_Close( target, event );
}
return false;
}
function StickyTooltip_OpenURLWrapper( target, event, URL ) {
if ( window.opener ) {
try {
window.opener.GlobMkNavi( target );
} catch (e) {};
try {
window.opener.StickyTooltip_RedirectToLocation( target, event, URL, arguments[3] );
} catch (e) {
window.GlobMkNavi( target );
window.opener.location = URL;
};
window.StickyTooltip_CloseWrapper( target, event, 1 );
} else if ( window.parent && window.parent != window ) {
try {
window.parent.GlobMkNavi( target );
} catch (e) {};
try {
window.parent.StickyTooltip_RedirectToLocation( target, event, URL, arguments[3] );
} catch (e) {
window.GlobMkNavi( target );
window.parent.location = URL;
}
window.StickyTooltip_CloseWrapper( target, event, 1 );
} else {
window.GlobMkNavi( target );
window.StickyTooltip_RedirectToLocation( target, event, URL, arguments[3] );
}
return false;
}
function StickyTooltip_RedirectToLocation( target, event, URL, bForceReferer ) {
if ( bForceReferer ) {
try {
var objForm = document.createElement( 'form' );
objForm.name   = 'DummayRedirectForm';
objForm.id     = 'DummayRedirectForm_ID';
objForm.action = URL;
objForm.method = 'POST';
document.body.appendChild( objForm );
setTimeout( function () { GlobMkSubmit( objForm.name ); }, 0 );
objForm.submit();
return false;
} catch (e) {};
}
GlobChangeLocation( URL );
return false;
}
function StickyTooltip_OnLoadFrame ( target, event, InfoID ) {
var objDiv = GlobGetBlock( InfoID );
if ( ! objDiv ) return false;
objDiv.style.display = 'none';
objDiv.style.visibility = 'hidden';
return true;
}
function StickyTooltip_Dialog( target, event, Content, Witdh, Height )
{
return StickyTooltip_Display( Content, null, Witdh, Height );
}
function DetailTooltip_OnClickLink ( target, event, ToolTipID, ToolTipCaption, ToolTipURL, ForceLoading ) {
var tValue = StickyTooltip_AppendNodes;
var ToolTipContent = ToolTipID;
if ( ForceLoading ) {
ToolTipContent = '			<div style="position:relative; visibility:hidden; display:none;" name="Info_'+ToolTipID+'">				<div style="position:absolute; top:0px; width:100%; height:100%; text-align:center;">					<br /><br /><br /><img src="'+GlobPanelCurrentBaseUrl+'/accessories/images/misc/loading_big.gif" border="0" />					<br /><br /><div class="globalNormalText"><b>Loading, please wait ...</b></div>				</div>			</div>			<iframe name="Frame_'+ToolTipID+'" marginheight="0px" marginwidth="0px" align="top" scrolling="auto" frameborder="0"				src="'+ToolTipURL+'" width="300" height="150" onLoad="return DetailTooltip_OnLoadFrame( 1, \''+ToolTipID+'\' );"			></iframe>		';
} else {
StickyTooltip_AppendNodes = true;
}
StickyTooltip_OnClick( target, event, ToolTipCaption, ToolTipContent );
if ( ForceLoading ) {
DetailTooltip_OnLoadFrame( 0, ToolTipID );
} else {
StickyTooltip_AppendNodes = tValue;
}
return false;
}
function DetailTooltip_OnLoadFrame ( Loaded, ToolTipID ) {
var objList = document.getElementsByTagName( 'div' );
for ( var i = 0; i < objList.length; i++ ) {
var objInfo = objList[ i ];
if ( objInfo.getAttribute( 'name' ) == 'Info_' + ToolTipID ) {
objInfo.style.display = Loaded ? 'none' : 'block';
objInfo.style.visibility = Loaded ? 'hidden' : 'visible';
}
}
return true;
}
var __LoadingImage = new Image( 125, 8 );
__LoadingImage.src = GlobPanelCurrentBaseUrl + '/accessories/images/misc/loading_big.gif';
var __LoadingImage = new Image( 13, 13 );
__LoadingImage.src = GlobPanelCurrentBaseUrl + '/accessories/images/misc/loading.gif';
/* Including: tools/feedback.js, $Id: feedback.js,v 1.14.2.1 2008/04/02 08:59:16 andreik Exp $ */

var GlobPanelCurrentBaseUrl;
var FB_Glob_BaseUrl = GlobPanelCurrentBaseUrl;
var fb_isIE  = document.all            ? true : false;
var fb_isDOM = document.getElementById ? true : false;
var fb_isNS4 = document.layers         ? true : false;
function fbGetBlock( BlockName )  { return GlobGetBlock( BlockName ); }
function fbShowBlock( BlockName ) { var fbb = fbGetBlock( BlockName ); if ( fbb ) { fbb.style.display = 'block'; } }
function fbHideBlock( BlockName ) { var fbb = fbGetBlock( BlockName ); if ( fbb ) { fbb.style.display = 'none';  } }
var FB_Glob_BasePath, FB_Glob_ImagesPath, FB_Glob_VoteURL, FB_Glob_StylePath;
FB_Glob_BasePath   = FB_Glob_BaseUrl;
FB_Glob_ImagesPath = FB_Glob_BaseUrl + '/accessories/ext/shared/images';
FB_Glob_StylePath  = FB_Glob_BaseUrl + '/accessories/ext/shared/css/fb.css';
FB_Glob_VoteURL    = FB_Glob_BaseUrl + '/dev/feedback.mhtml';
var FB_Glob_ImagesSrc = new Object();
FB_Glob_ImagesSrc['empty'] = FB_Glob_ImagesPath + '/empty.gif';
FB_Glob_ImagesSrc['half']  = FB_Glob_ImagesPath + '/half.gif';
FB_Glob_ImagesSrc['full']  = FB_Glob_ImagesPath + '/full.gif';
FB_Glob_ImagesSrc['voting_empty'] = FB_Glob_ImagesPath + '/voting_empty.gif';
FB_Glob_ImagesSrc['voting_half']  = FB_Glob_ImagesPath + '/voting_half.gif';
FB_Glob_ImagesSrc['voting_full']  = FB_Glob_ImagesPath + '/voting_full.gif';
var FB_Glob_Grades = new Array( '', 'Poor', 'Satisfactory', 'Good', 'Very good', 'Excellent' );
var FB_Glob_Images = new Array();
var FB_Glob_HasDocImages    = document.images ? 1 : 0;
var FB_Glob_InstanceObjects = new Object();
var FB_Glob_PopupMode = false;
function FB_InitInstance(index,tool_id, question, voted, total, average)
{
FB_Glob_InstanceObjects[ index ] = FB_NewInstance();
FB_Glob_InstanceObjects[ index ].FB_InitInstance( index, tool_id, question, voted, total, average );
}
function FB_ProxyWrapper ( name, args ) {
var id = args[0];
var str = ''
for ( var i = 1; i < args.length; i++ ) {
str += 'args['+i+'],';
}
str = str.replace( /\,$/, '' );
var call = 'FB_Glob_InstanceObjects[ id ].'+name+'('+str+');';
var res = eval( call );
return res;
}
function FB_WayBack_Wrapper () {
return FB_ProxyWrapper( 'FB_WayBack', arguments );
}
function FB_WayBackAndAgain_Wrapper () {
return FB_ProxyWrapper( 'FB_WayBackAndAgain', arguments );
}
function FB_OnSubmitVote_Wrapper () {
return FB_ProxyWrapper( 'FB_OnSubmitVote', arguments );
}
function FB_OnMouseOverGrade_Wrapper () {
return FB_ProxyWrapper( 'FB_OnMouseOverGrade', arguments );
}
function FB_OnMouseOutGrade_Wrapper () {
return FB_ProxyWrapper( 'FB_OnMouseOutGrade', arguments );
}
function FB_OnVote_Wrapper () {
return FB_ProxyWrapper( 'FB_OnVote', arguments );
}
function FB_InitRate_Wrapper () {
return FB_ProxyWrapper( 'FB_InitRate', arguments );
}
function FB_RateTimer_Wrapper () {
return FB_ProxyWrapper( 'FB_RateTimer', arguments );
}
function FB_MoveRate_Wrapper () {
return FB_ProxyWrapper( 'FB_MoveRate', arguments );
}
function FB_NewInstance() {
var FB_This = new Object();
FB_This.FB_BoxID = 'feedBackBoxBottom';
FB_This.FB_ID          = 0;
FB_This.FB_Glide       = 0;
FB_This.FB_Width       = 300;
FB_This.FB_bVoted      = false;
FB_This.FB_VoteParams  = new Array();
FB_This.FB_HttpRequest = null;
FB_This.FB_HstgID = '';
FB_This.FB_LastScale_Grade = 0;
FB_This.FB_InitInstance = function(id,tool_id, question, voted, total, average)
{
FB_This.FB_ID = id;
FB_This.FB_VoteParams['tool_id']  = tool_id;
FB_This.FB_VoteParams['question'] = question;
FB_This.FB_VoteParams['total']    = total;
FB_This.FB_VoteParams['average']  = average;
FB_This.FB_BoxID += '_' + FB_This.FB_ID;
if ( FB_Glob_PopupMode ) FB_This.FB_Glide = 1;
if ( FB_This.FB_InitHttpRequest() && voted == 0 ) {
FB_This.FB_DrawNotVoted( tool_id, question );
if ( FB_This.FB_Glide == 1 ) {
FB_This.FB_RateTimer();
} else {
setTimeout( 'fbShowBlock( \''+FB_This.FB_BoxID+'\' );', 500 );
}
} else {
}
FB_This.FB_RePosition();
}
FB_This.FB_RePosition = function()
{
if ( ! FB_Glob_PopupMode ) return false;
var currDiv = fbGetBlock( FB_This.FB_BoxID );
if ( ! currDiv ) return false;
currDiv.style.styleFloat = 'right';
return true;
}
FB_This.FB_InitHttpRequest = function()
{
return true;
}
FB_This.FB_DrawVoted = function(tool_id, question, total, average)
{
FB_This.FB_bVoted = true;
document.write( '<div class="feedback">	<div class="question">' + question + '</div><br />	<div id="feedback_hint_'+FB_This.FB_ID+'" class="hint">' + FB_This.FB_GetGradeHint( average ) + ' (' + total + ')</div>	<div id="feedback_scale_'+FB_This.FB_ID+'" class="scale">' + FB_This.FB_GetScale(0) + '</div></div>	');
FB_This.FB_SetScale( average );
}
FB_This.FB_DrawNotVoted = function(tool_id, question)
{
FB_This.FB_bVoted = false;
var tOuterDiv01Style = FB_This.FB_Glide == 1 ? ' ' : '';
var tOuterDiv02Style = FB_This.FB_Glide == 1 ? ' position:static; float:none; ' : ' ';
var tHideGlide       = FB_This.FB_Glide == 1 ? '<div id="feedback_hide_'+FB_This.FB_ID+'" align="left">&nbsp;<a class="feedback_hide" style="font-size:8pt; color: #000000" href="#" onClick="FB_WayBackAndAgain_Wrapper('+FB_This.FB_ID+'); return false;">Close</a></div>' : '';
var tStyleCommemt = FB_This.FB_Glide == 1 ? '  ' : '';
tOuterDiv02Style += tStyleCommemt;
var tComment = '		<div style="text-align:left;">		<div id="feedback_comment_'+FB_This.FB_ID+'" class="fbcomment" style="display:none;visibility:visible;text-align:center;' + tOuterDiv02Style + '">			<!--div style="text-align: right;"><div id="feedback_close_'+FB_This.FB_ID+'" class="fbclosebutton" style="display:inline;"><a href="#" style="text-decoration: none; color:#000000;" onClick="FB_OnSubmitVote_Wrapper('+FB_This.FB_ID+',0); return false;">x</a></div></div-->			Would you like to comment your rating:<br />			&nbsp;<textarea id="feedback_comment_text_'+FB_This.FB_ID+'" class="fbinputarea" cols="32" rows="5"></textarea>&nbsp;<br />			<div>				<input class="fbbutton" type="button" value="Submit" onClick="FB_OnSubmitVote_Wrapper('+FB_This.FB_ID+',1); return false;" />				<input class="fbbutton" type="button" value="Close" onClick="FB_OnSubmitVote_Wrapper('+FB_This.FB_ID+',0); return false;" />			</div>		</div>		</div>	';
var tTopHTML    = FB_This.FB_Glide == 1 ? tComment : '';
var tBottomHTML = FB_This.FB_Glide != 1 ? tComment : '';
var htmlc = '<center><div style="width: '+FB_This.FB_Width+'px;" align="center"><div class="fbfeedback" style="background: #999999; padding: 0em 0.1em 0.1em 0em; ' + tOuterDiv01Style + ' ">	<div id="feedback_qwrap_'+FB_This.FB_ID+'" class="fbquestion-wrap" style="border: 1px solid #999999; background: #ffffff;">		' + tTopHTML + '		<span id="feedback_label_'+FB_This.FB_ID+'" style="font-weight: bold;">Please rate the ' + question + '</span><br /><br />		<!--div class="fbquestion">' + question + '</div><br /-->		<div id="feedback_hint_'+FB_This.FB_ID+'" class="fbhint">&nbsp;</div>		<div id="feedback_scale_'+FB_This.FB_ID+'" class="fbscale">' + FB_This.FB_GetScale(1) + '</div><br />		' + tHideGlide + '<br />		' + tBottomHTML + '	</div></div></div></center>	';
var fbc = fbGetBlock( FB_This.FB_BoxID );
if ( !fbc ) {
return false;
}
fbc.innerHTML = htmlc;
if ( ! FB_This.FB_Glide == 1 ) {
fbc.style.position = 'relative';
}
FB_This.FB_SetScale(0);
FB_This.FB_SetScaleCursor('pointer');
}
FB_This.FB_OnVote = function(grade)
{
if ( FB_This.FB_bVoted ) {
return false;
}
FB_This.FB_VoteParams['grade'] = grade;
FB_This.FB_bVoted = true;
FB_This.FB_SetScaleCursor( '' );
FB_This.FB_SetScale( grade );
fbShowBlock( 'feedback_comment_'+FB_This.FB_ID+'' );
var ta = fbGetBlock( 'feedback_comment_text_'+FB_This.FB_ID+'' );
if ( ta ) {
ta.value = '';
ta.focus();
}
return false;
}
FB_This.FB_OnSubmitVote = function( bComment )
{
if ( bComment ) {
var ta = fbGetBlock( 'feedback_comment_text_'+FB_This.FB_ID+'' );
if ( ta ) {
FB_This.FB_VoteParams['comment'] = ta.value;
} else {
FB_This.FB_VoteParams['comment'] = '';
}
} else {
FB_This.FB_VoteParams['comment'] = '';
}
fbHideBlock( 'feedback_comment_'+FB_This.FB_ID+'' );
FB_This.FB_SendVote();
if ( FB_This.FB_VoteParams['average'] && FB_This.FB_VoteParams['total'] ) {
FB_This.FB_SetScale( FB_This.FB_VoteParams['average'] );
FB_This.FB_SetHint( 'Rated ' + FB_This.FB_VoteParams['average'] + ' out of ' + FB_This.FB_VoteParams['total'] + ' votes' );
var lab = fbGetBlock( 'feedback_label_'+FB_This.FB_ID+'' );
if ( lab ) {
lab.innerHTML = 'Thank You';
if ( FB_This.FB_Glide == 1 ) {
setTimeout( 'FB_WayBack_Wrapper('+FB_This.FB_ID+')', 2000 );
} else {
setTimeout( 'fbHideBlock("'+FB_This.FB_BoxID+'")', 5000 );
}
}
}
else {
var qw = fbGetBlock( 'feedback_qwrap_'+FB_This.FB_ID+'' );
if ( qw ) {
qw.innerHTML = 'Thank You';
qw.style.textAlign = 'center';
if ( FB_This.FB_Glide == 1 ) {
setTimeout( 'FB_WayBack_Wrapper('+FB_This.FB_ID+')', 2000 );
} else {
setTimeout( 'fbHideBlock("'+FB_This.FB_BoxID+'")', 5000 );
}
}
}
}
FB_This.FB_SendVote = function()
{
var voteJS = FB_Glob_VoteURL + '?' + FB_This.FB_BuildRequestContent();
FB_IncludeJS( voteJS );
return true;
}
FB_This.FB_OnSendReqStateChange = function()
{
}
FB_This.FB_BuildRequestContent = function()
{
var comment = FB_This.FB_VoteParams['comment'];
if ( comment.length > 1000 ) comment = comment.substring( 0, 1000 ) + '...';
return 'Step=voting' + 
'&ToolID=' + encodeURIComponent( FB_This.FB_VoteParams['tool_id'] ) + 
'&Question=' + encodeURIComponent( FB_This.FB_VoteParams['question'] ) + 
'&Grade=' + encodeURIComponent( FB_This.FB_VoteParams['grade'] ) + 
'&Comment=' + encodeURIComponent( comment );
}
FB_This.FB_GetScale = function(bInput)
{
var src = '';
for (var i = 0; i < 5; i++ )
{
var grdIdx = i+1;
var strAlt = FB_This.FB_GetGradeHint( grdIdx );
var elmIdx = 'feedback_grade_' + grdIdx;
var strCde1 = '<img id="' + elmIdx + '_'+FB_This.FB_ID+'" vspace="0" hspace="0" alt="' + strAlt + '" title="' + strAlt + '" ';
strCde1 += ' src="' + FB_Glob_ImagesSrc[ 'empty' ] + '" '
;
var strCde2 = ' onMouseOver="FB_OnMouseOverGrade_Wrapper('+FB_This.FB_ID+','+grdIdx+');" onMouseOut="FB_OnMouseOutGrade_Wrapper('+FB_This.FB_ID+','+grdIdx+');" onClick="FB_OnVote_Wrapper('+FB_This.FB_ID+','+grdIdx+'); return false;" ';
var strCde3 = '/>'; 
src += bInput ? strCde1 + strCde2 + strCde3 : strCde1 + strCde3;
}
return src;
}
FB_This.FB_OnMouseOverGrade = function(grade)
{
if ( !FB_This.FB_bVoted ) {
FB_This.FB_SetScale( grade );
FB_This.FB_SetHint( FB_This.FB_GetGradeHint(grade) );
}
}
FB_This.FB_OnMouseOutGrade = function(grade)
{
if ( !FB_This.FB_bVoted ) {
FB_This.FB_SetScale(0); 
FB_This.FB_SetHint('&nbsp;');
}
}
FB_This.FB_SetScale = function(grade)
{
for ( var i = FB_This.FB_LastScale_Grade; i <= grade; i++ ) {
var divIdx    = 'feedback_grade_' + Math.round(i+1) +'_'+FB_This.FB_ID;
var grade_div = fbGetBlock( divIdx );
if ( grade_div ) 
{
var imgIdx;
var nGradeDiff = grade - FB_This.FB_LastScale_Grade;
if ( nGradeDiff > 0.5 ) {
imgIdx = FB_This.FB_bVoted ? 'full' : 'voting_full';
} else if ( nGradeDiff > 0 ) {
imgIdx = FB_This.FB_bVoted ? 'half' : 'voting_half';
} else {
imgIdx = FB_This.FB_bVoted ? 'empty' : 'voting_empty';
}
var myImg     = FB_Glob_Images[ imgIdx ];
grade_div.src = FB_Glob_Images[ imgIdx ].src;
continue;
if ( grade_div.firstChild ) {
grade_div.replaceChild( myImg, grade_div.firstChild );
} else {
grade_div.appendChild( myImg );
}
}
}
var imgIdx = FB_This.FB_bVoted ? 'empty' : 'voting_empty';
var myEl   = FB_Glob_Images[ imgIdx ];
grade = Math.round(grade);
for ( var i = grade; i <= 5; i++ ) {
var divIdx    = 'feedback_grade_' + Math.round(i+1) +'_'+FB_This.FB_ID;
var grade_div = fbGetBlock( divIdx );
if ( grade_div ) 
{
grade_div.src = FB_Glob_Images[ imgIdx ].src;
continue;
if ( grade_div.firstChild ) {
grade_div.replaceChild( myEl, grade_div.firstChild );
} else {
grade_div.appendChild( myEl );
}
}
}
FB_This.FB_LastScale_Grade = grade;
}
FB_This.FB_SetScaleCursor = function(cursor)
{
for ( var i = 0; i < 5; i++ ) {
var divIdx    = 'feedback_grade_' + (i+1) +'_'+FB_This.FB_ID;
var grade_div = fbGetBlock( divIdx );
if ( grade_div ) {
grade_div.style.cursor = cursor;
}
}
}
FB_This.FB_SetHint = function(hint)
{
var h = fbGetBlock('feedback_hint_'+FB_This.FB_ID+'');
if ( h ) {
h.innerHTML = hint;
}
}
FB_This.FB_GetGradeHint = function(grade)
{
if ( grade >= 1 && grade <= 1.49 )
{
return FB_Glob_Grades[1];
}
else if ( grade >= 1.50 && grade <= 2.49 )
{
return FB_Glob_Grades[2];
}
else if ( grade >= 2.50 && grade <= 3.49 )
{
return FB_Glob_Grades[3];
}
else if ( grade >= 3.50 && grade <= 4.49 )
{
return FB_Glob_Grades[4];
}
else if ( grade >= 4.50 && grade <= 5 )
{
return FB_Glob_Grades[5];
}
else 
{
return FB_Glob_Grades[0];
}
}
FB_This.FB_RateDuration = 2 * 60 * 1000; 
FB_This.FB_RateTimeout;
FB_This.FB_MoveID;
FB_This.FB_MoveRatems = 50; 
FB_This.FB_MoveStep   = 10; 
FB_This.FB_CurrentFade = 0;
FB_This.FB_MinFade     = 0;
FB_This.FB_MaxFade     = 100;
FB_This.FB_TimesBack = 2;
FB_This.FB_ChangeOpacity = function ( opacity ) {
try {
var object = fbGetBlock( FB_This.FB_BoxID ).style;
object.opacity = (opacity / 100);
object.MozOpacity = (opacity / 100);
object.KhtmlOpacity = (opacity / 100);
object.filter = "alpha(opacity=" + opacity + ")";
} catch (e) {}
}
FB_This.FB_MoveRate = function ( todo ) {
if ( todo == 1 ) {
FB_This.FB_CurrentFade += FB_This.FB_MoveStep;
if ( FB_This.FB_CurrentFade >= FB_This.FB_MaxFade ) FB_This.FB_CurrentFade = FB_This.FB_MaxFade;
FB_This.FB_ChangeOpacity( FB_This.FB_CurrentFade );
FB_This.FB_MoveID = setTimeout('FB_MoveRate_Wrapper('+FB_This.FB_ID+',1)', FB_This.FB_MoveRatems);
if ( FB_This.FB_CurrentFade >= FB_This.FB_MaxFade ) {
clearTimeout(FB_This.FB_MoveID);
fbShowBlock( FB_This.FB_BoxID );
}
}
if ( todo == 2 ) {
FB_This.FB_CurrentFade -= FB_This.FB_MoveStep;
if ( FB_This.FB_CurrentFade <= FB_This.FB_MinFade ) FB_This.FB_CurrentFade = FB_This.FB_MinFade;
FB_This.FB_ChangeOpacity( FB_This.FB_CurrentFade );
FB_This.FB_MoveID = setTimeout('FB_MoveRate_Wrapper('+FB_This.FB_ID+',2)', FB_This.FB_MoveRatems);
if ( FB_This.FB_CurrentFade <= FB_This.FB_MinFade ) {
clearTimeout(FB_This.FB_MoveID);
fbHideBlock( FB_This.FB_BoxID );
setTimeout( 'FB_InitHostingToolNote( \''+FB_This.FB_ID+'\', \''+FB_This.FB_HstgID+'\' );', FB_This.FB_RateDuration * FB_This.FB_TimesBack );
GlobMergeCookieValue( 'CP_Feedback', GlobPanelInstanceSuffix, [ FB_This.FB_TimesBack ], FB_This.FB_HstgID );
}
}
}
FB_This.FB_InitRate = function () {
clearTimeout(FB_This.FB_RateTimeout);
FB_This.FB_ChangeOpacity( FB_This.FB_CurrentFade );
fbShowBlock( FB_This.FB_BoxID );
FB_This.FB_MoveRate( 1 );
clearTimeout(FB_This.FB_RateTimeout);
}
FB_This.FB_RateTimer = function( tTimer ) {
if ( ! tTimer ) return;
var tt = tTimer ? tTimer : FB_This.FB_RateDuration;
FB_This.FB_RateTimeout = setTimeout('FB_InitRate_Wrapper('+FB_This.FB_ID+')', tt);
}
FB_This.FB_WayBack = function() {
FB_This.FB_MoveRate( 2 );
}
FB_This.FB_WayBackAndAgain = function() {
FB_This.FB_WayBack();
FB_This.FB_TimesBack += 1.5;
}
return FB_This;
};
function FB_InitHostingToolNote ( FB_ID, FB_HstgID ) {
FB_Glob_InstanceObjects[ FB_ID ].FB_HstgID = FB_HstgID;
var HostingToolNote_ID = 'feedBackHostingToolNote_' + FB_ID;
var objDiv = fbGetBlock( HostingToolNote_ID )
objDiv.innerHTML = '		<div class="fbHostingToolNote" onClick="FB_ShowHostingToolNote('+FB_ID+');return false;">			<div class="fbHostingToolNoteLabel">I want to rate this tool</div>			<div class="fbHostingToolNotePopup"></div>			<div class="globalSpacerFloat"></div>		</div>	';
objDiv.style.display = 'block';
}
function FB_ShowHostingToolNote ( FB_ID ) {
var HostingToolNote_ID = 'feedBackHostingToolNote_' + FB_ID;
var objDiv = fbGetBlock( HostingToolNote_ID )
objDiv.style.display = 'none';
FB_RateTimer_Wrapper( FB_ID, 100 );
}
function FB_InitImages()
{
for ( var i in FB_Glob_ImagesSrc ) 
{
var img = FB_Glob_HasDocImages ? new Image() : document.createElement( 'img' );
if ( img ) {
img.src          = FB_Glob_ImagesSrc[i];
if ( img.style ) {
img.style.border = 0;
}
img.hspace       = 0;
img.vspace       = 0;
}
FB_Glob_Images[i] = img;
}
}
function FB_includeCSS( remote_file )
{
var head;
try {
head = document.getElementsByTagName('head').item(0);
} catch (e) {}
if ( !head || typeof(head) == 'undefined' )
return false;
var css       = document.createElement('link');
css.setAttribute( 'rel', 'StyleSheet' );
css.setAttribute( 'type', 'text/css' );
css.setAttribute( 'href', remote_file );
head.appendChild( css );
return false;
}
function FB_IncludeJS( remote_file )
{
var head;
try {
head = document.getElementsByTagName('head').item(0);
} catch (e) {}
if ( !head || typeof(head) == 'undefined' )
return false;
var js       = document.createElement('script');
js.setAttribute( 'language', 'javascript' );
js.setAttribute( 'type', 'text/javascript' );
js.setAttribute( 'src', remote_file );
head.appendChild( js );
return false;
}
FB_includeCSS( FB_Glob_StylePath );
FB_InitImages();
function FB_LoadInstance( BaseUrl, FeedbackUri )
{
var fb_uri = FeedbackUri && FeedbackUri != '' ? FeedbackUri : '/dev/feedback.mhtml';
var fb_url = BaseUrl + fb_uri;
GlobIncludeRemoteJS( fb_url );
}
/* Including: favorites/dynamic.js, $Id: dynamic.js,v 1.9.2.1 2008/04/02 08:59:05 andreik Exp $ */

var GlobPanelCurrentBaseUrl;
var Fav_ContaninerID = 'FavoritesContainer';
var Fav_ItemsCache   = null;
var Fav_LastResponse = null;
var Fav_STimeoutID   = null;
var Fav_Global_AddFormObject;
var Fav_Global_ListingObject;
var Fav_Global_AddForm_Action;
var Fav_Global_Listing_Action;
var Fav_Global_ImageURL;
function Fav_ShowAddForm ( target, event, pageTitle )
{
if ( ! pageTitle ) {
var sectionLabel = GlobGetBlock( 'sectionLabel' );
if ( ( sectionLabel != null ) && typeof( sectionLabel ) != 'undefined' ) {
pageTitle = sectionLabel.innerHTML;
if ( pageTitle ) {
pageTitle = pageTitle.replace(/(<([^>]+)>)/ig,"");
pageTitle = pageTitle.replace(/^\s+|\s+$/g,"");
}
}
if ( ! sectionLabel ) pageTitle = document.title;
}
Fav_Global_AddFormObject = Fav_AddForm( Fav_Global_AddForm_Action, Fav_Global_ImageURL );
Fav_Global_AddFormObject.Label = pageTitle;
Fav_Global_AddFormObject.Uri   = GlobPageURL();
return StickyTooltip_OnClick( target, event, Fav_Global_AddFormObject.FormTitle, Fav_Global_AddFormObject.Serialize() );
}
function Fav_ShowListForm ( target, event )
{
Fav_Global_ListingObject = Fav_Listing( Fav_Global_Listing_Action, Fav_Global_ImageURL );
return StickyTooltip_OnClick( target, event, Fav_Global_ListingObject.FormTitle, Fav_Global_ListingObject.Serialize() );
}
function Fav_AddForm ( FormAction, ImageUrl )
{
var Fav_This = new Object();
Fav_This.Width  = 300;
Fav_This.Height = 80;
Fav_This.Label = '';
Fav_This.Uri   = '';
Fav_This.FormName   = 'AddFavoriteForm';
Fav_This.FormMethod = 'POST';
Fav_This.FormAction = FormAction;
Fav_This.ImageUrl   = ImageUrl;
Fav_This.FormTitle  = 'Add to Favorites List';
Fav_This.Serialize = function () {
var strForm = '<div style="width:'+Fav_This.Width+'px;height:'+Fav_This.Height+'px;" id="'+Fav_ContaninerID+'"><table border="0" align="center" cellpadding="0" cellspacing="0" class="globalWidth100">	<tr><td align="center" class="globalNormalText">		<form name="'+Fav_This.FormName+'" action="'+Fav_This.FormAction+'" method="'+Fav_This.FormMethod+'" onSubmit="return Fav_CheckAddForm( this );" style="display: inline;">			<br /><strong>Label:</strong><br />			<input type="text" name="Favorites|Label" value="'+Fav_This.Label+'" style="width:200px" maxlength="100" />		';
if ( Fav_This.Uri != '' ) {
strForm += '			<input type="hidden" name="Favorites|Uri" value="'+Fav_This.Uri+'" />			';
} else {
strForm += '			<br /><strong>Uri:</strong><br />			<input type="text" name="Favorites|Uri" value="'+Fav_This.Uri+'" style="width:200px" />			';
}
strForm += '			<input type="hidden" name="Favorites|Add_cb" value="1" /><br /><br />			<input type="submit" value="Add" class="favoritesInput" style="width:53px;" />		</form>	</td></tr></table></div>		';
return strForm + Fav_DefaultFooter();
};
if ( Fav_STimeoutID ) clearTimeout( Fav_STimeoutID );
return Fav_This;
};
function Fav_CheckAddForm ( objForm ) {
if ( objForm.elements[ 'Favorites|Label' ].value == '' ) {
alert( 'Please enter a label for your bookmark.' );
return false;
}
AjaxRequest.submit( objForm, 
{
'onSuccess'  : function ( req ) { var ok = Fav_OnSuccess( req ); if ( Fav_LastResponse && Fav_LastResponse.indexOf( 'success' ) != -1 ) { Fav_STimeoutID = setTimeout( 'StickyTooltip_Hide();', 1000 ); } return ok; },
'onError'    : Fav_OnError
}
);
Fav_DisplayWaitInfo( 'Adding' );
return false;
}
function Fav_ParseResponse( req ) { 
var msg;
var objResponse;
try {
eval( 'objResponse = ' + req.responseText + ';' );
if ( objResponse && typeof ( objResponse ) == 'object' )
{
var error   = objResponse.e;
var success = objResponse.s;
Fav_ItemsCache = objResponse.i;
if ( success != '' ) {
msg = '<div class="success">' + success + '</div>';
} else if ( error != '' ) {
msg = '<div class="globalEmergencyText">' + error + '</div>';
}
}
} catch (e) {};
Fav_LastResponse = msg;
return msg;
}
function Fav_OnSuccess( req ) { 
var msg = Fav_ParseResponse( req );
if ( msg ) return Fav_DisplayStatus( msg );
return Fav_OnError( req );
}
function Fav_OnError( req ) {
Fav_DisplayStatus( '<div class="globalEmergencyText">Sorry, an error has occurred.<!--(#1)--></div>' );
return false;
}
function Fav_DisplayStatus( msg ) {
var place = GlobGetBlock( Fav_ContaninerID );
if ( place ) place.innerHTML = '<table style="width:100%;height:100%;"><tr><td style="vertical-align:middle;"><div style="text-align:center;">' + msg + '</div></td></tr></table>';
GlobWaitHide();
return true;
}
function Fav_Listing ( FormAction, ImageUrl )
{
var Fav_This = new Object();
Fav_This.Width  = 300;
Fav_This.Height = 170;
Fav_This.Loaded = 0;
Fav_This.Items  = [];
Fav_This.FormName   = 'ListFavoritesForm';
Fav_This.FormMethod = 'POST';
Fav_This.FormAction = FormAction;
Fav_This.ImageUrl   = ImageUrl;
Fav_This.FormTitle  = 'List Favorites';
Fav_This.Serialize = function () {
var BrowserAgent = navigator.userAgent.toLowerCase();
var bIsAnyOpera  = BrowserAgent.indexOf("opera")!=-1;
var bIsAnyIE     = BrowserAgent.indexOf("msie")!=-1&&!bIsAnyOpera;
var browserPatch = bIsAnyIE ? 'style="width:'+(Fav_This.Width-(Fav_This.Items.length>=8?18:0))+'px"' : 'class="globalWidth100"';
var strForm = '<div style="width:'+Fav_This.Width+'px;height:'+Fav_This.Height+'px;overflow:auto;" id="'+Fav_ContaninerID+'"><form name="'+Fav_This.FormName+'" action="'+Fav_This.FormAction+'" method="'+Fav_This.FormMethod+'" onSubmit="return false;" style="display:inline;">	<input type="hidden" name="Favorites|ID" value="" />	<input type="hidden" name="Favorites|Delete_cb" value="1" /></form><table border="0" align="left" cellpadding="0" cellspacing="0" '+browserPatch+'>		';
var minLength = Fav_This.Items.length > 8 ? 28 : 29;
for ( var i = 0; i < Fav_This.Items.length; i++ ) {
var id    = Fav_This.Items[i].i;
var label = Fav_This.Items[i].l;
var uri   = Fav_This.Items[i].u;
var title = label.replace( /\r?\n/g, ' ' ).replace( /"/g, '\'' );
if ( label.length > minLength ) label = label.substring( 0, minLength ) + ' ...';
strForm += '	<tr class="' + ( i % 2 ? 'listingOdd' : 'listingEven' ) + '">		<td align="left">			<li style="list-style-type:disc;">			<a href="'+GlobPanelCurrentBaseUrl+''+uri+'" onClick="return StickyTooltip_OpenURLWrapper( this, event, this.href );" title="'+title+'">'+label+'</a>			</li>		</td>		<td align="right"><input type="button" value="Delete" class="favoritesInput" style="width:53px;" onClick="return Fav_SubmitDelForm( \''+Fav_This.FormName+'\', \''+id+'\' );" /></td>	</tr>			';
}
if ( ! Fav_This.Loaded ) {
strForm += '<tr colspan="2"><td align="center" class="globalNormalText">'+Fav_GetWrappedMessage( 'Loading' )+'</td></tr>';
setTimeout( 'Fav_LoadListing(\''+Fav_This.FormAction+'\');', 50 );
} else if ( ! Fav_This.Items.length ) {
strForm += '<tr colspan="2"><td align="center" class="globalEmergencyText">You have no favorites.</td></tr>';
}
strForm += '</table></div>		';
return strForm + Fav_DefaultFooter();
};
if ( Fav_ItemsCache && Fav_ItemsCache != null ) {
Fav_This.Loaded = 1;
Fav_This.Items  = Fav_ItemsCache;
}
if ( Fav_STimeoutID ) clearTimeout( Fav_STimeoutID );
return Fav_This;
};
function Fav_LoadListing ( action ) {
AjaxRequest.get(
{
'url'        : action,
'parameters' : {},
'onSuccess'  : function ( req ) { Fav_OnSuccess( req ); return Fav_UpdateListing(); },
'onError'    : Fav_OnError
}
);
Fav_DisplayWaitInfo( 'Loading' );
return false;
}
function Fav_SubmitDelForm ( name, id ) {
var objForm = document.forms[ name ];
objForm.elements[ 'Favorites|ID' ].value = id;
AjaxRequest.submit( objForm, 
{
'onSuccess'  : function ( req ) { Fav_OnSuccess( req ); return Fav_UpdateListing(); },
'onError'    : Fav_OnError
}
);
Fav_DisplayWaitInfo( 'Removing' );
return false;
}
function Fav_GetWrappedMessage ( msg ) {
if ( ! msg ) msg = 'Loading';
msg += ', please wait';
var info = '<img src="'+GlobPanelCurrentBaseUrl+'/accessories/images/misc/loading_big.gif" border="0" /><br /><br /><div class="globalNormalText"><b>'+msg+' ...</b></div>';
return info;
}
function Fav_DisplayWaitInfo ( msg ) {
return Fav_DisplayStatus( Fav_GetWrappedMessage( msg ) );
}
function Fav_UpdateListing() {
Fav_Global_ListingObject = Fav_Listing( Fav_Global_ListingObject.FormAction, Fav_Global_ListingObject.ImageUrl );
if ( ! Fav_Global_ListingObject.Loaded ) return Fav_DisplayStatus( '<div class="globalEmergencyText">Sorry, an error has occurred.<!--(#2)--></div>' );
return StickyTooltip_UpdateContent( Fav_Global_ListingObject.Serialize() );
}
function Fav_DefaultFooter() {
return '<br /><center><a href="#" onClick="return StickyTooltip_Hide( this, event );"><b>Close</b></a></center>';
}
