<!--//--><![CDATA[//><!--

var Font2EMS = new Object();
Font2EMS['6pt'] ='0.5em'; Font2EMS['7pt'] ='0.55em'; Font2EMS['7.5pt'] ='0.625em'; Font2EMS['8pt'] ='0.7em'; Font2EMS['9pt'] ='0.75em'; Font2EMS['10pt'] ='0.8em'; Font2EMS['10.5pt'] ='0.875em'; Font2EMS['11pt'] ='0.95em'; Font2EMS['12pt'] ='1em'; 
Font2EMS['13pt'] ='1.05em'; Font2EMS['13.5pt'] ='1.125em'; Font2EMS['14pt'] ='1.2em'; Font2EMS['14.5pt'] ='1.25em'; Font2EMS['15pt'] ='1.3em'; Font2EMS['16pt'] ='1.4em'; Font2EMS['17pt'] ='1.45em'; 
Font2EMS['18pt'] ='1.5em'; Font2EMS['19pt'] ='1.55em'; Font2EMS['20pt'] ='1.6em'; Font2EMS['22pt'] ='1.7em'; Font2EMS['22pt'] ='1.8em'; Font2EMS['23pt'] ='1.9em'; Font2EMS['24pt'] ='2em'; Font2EMS['26pt'] ='2.2em'; Font2EMS['27pt'] ='2.25em'; 
Font2EMS['28pt'] ='2.3em'; Font2EMS['29pt'] ='2.35em'; Font2EMS['30pt'] ='2.45em'; Font2EMS['31pt'] ='2.5em';  Font2EMS['32pt'] ='2.55em'; Font2EMS['33pt'] ='2.65em'; Font2EMS['34pt'] ='2.75em'; Font2EMS['35pt'] ='2.85em'; Font2EMS['36pt'] ='3em';
Font2EMS['8px'] ='0.5em'; Font2EMS['9px'] ='0.55em'; Font2EMS['10px'] ='0.625em'; Font2EMS['11px'] ='0.7em'; Font2EMS['12px'] ='0.75em'; Font2EMS['13px'] ='0.8em'; Font2EMS['14px'] ='0.875em'; Font2EMS['15px'] ='0.95em'; Font2EMS['16px'] ='1em'; Font2EMS['17px'] ='1.05em'; Font2EMS['18px'] ='1.125em'; Font2EMS['19px'] ='1.2em'; Font2EMS['20px'] ='1.25em'; Font2EMS['21px'] ='1.3em'; Font2EMS['22px'] ='1.4em'; Font2EMS['23px'] ='1.45em'; Font2EMS['24px'] ='1.5em'; Font2EMS['26px'] ='1.6em'; Font2EMS['29px'] ='1.8em'; Font2EMS['32px'] ='2em'; Font2EMS['35px'] ='2.2em'; Font2EMS['36px'] ='2.25em'; Font2EMS['37px'] ='2.3em'; Font2EMS['38px'] ='2.35em'; Font2EMS['40px'] ='2.45em'; Font2EMS['42px'] ='2.55em'; Font2EMS['45px'] ='2.75em'; Font2EMS['48px'] ='3em';

startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("nav");
		if (navRoot==undefined) return;
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="A") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}

Ext.onReady(startList, window, true);

function interrogate(what) {
	var c = 0;
	var output = '';
	for (var i in what) {
		output += i+'';
		c += 1;
		if (c>5) {
			output += '\n';
			c = 0;
		} else
			output += '  ';
	}
	alert(output);
}

function URLEncode(s) {
	var unencoded = s;
	return escape(unencoded);
}
function URLDecode(s) {
	var encoded = s
	return unescape(encoded.replace(/\+/g,  " "));
}

/* ************************************************************************* */

function getSelectString( selectObj, sConnectString ) {
	var  sOutput = new String() ;
	if (selectObj!= undefined) {
		for ( var i = 0 ; i < selectObj.length ; ++i ) {
			if ( selectObj.options[i].selected ) {
				if ( sOutput.length )
				 sOutput += sConnectString ;
				sOutput += selectObj.options[i].value ;
			}
		}
	}
	return sOutput ;
} //function getSelectString


function window_showPopup(displayObjId) {
	var dimmerP = getObject('dimmer');
	var displayObj = Ext.get(displayObjId);
	qcbcmspanel_layerwidth = displayObj.getWidth();
	qcbcmspanel_layerheight = displayObj.getHeight();
	if (Ext.isGecko) { 
		qcbcmspanel_floatX=Math.round((window.innerWidth-20)/2)-Math.round(qcbcmspanel_layerwidth/2);
		qcbcmspanel_floatY=Math.round((window.innerHeight-20)/2)-Math.round(qcbcmspanel_layerheight/2);
		
		qcbcmspanel_lastX=window.pageXOffset + qcbcmspanel_floatX;
		qcbcmspanel_lastY=window.pageYOffset + qcbcmspanel_floatY;	
	} else if (Ext.isIE || Ext.isIE7) {
		if (Ext.isIE7) {
			qcbcmspanel_offsetWidth = document.documentElement.offsetWidth;
			qcbcmspanel_offsetHeight = document.documentElement.offsetHeight;
		} else {
			qcbcmspanel_offsetWidth = document.body.offsetWidth;
			qcbcmspanel_offsetHeight = document.body.offsetHeight;
		}
		qcbcmspanel_floatX=Math.round((qcbcmspanel_offsetWidth-20)/2)-Math.round(qcbcmspanel_layerwidth/2);
		qcbcmspanel_floatY=Math.round((qcbcmspanel_offsetHeight-20)/2)-Math.round(qcbcmspanel_layerheight/2);
		if (Ext.isIE7) {
			qcbcmspanel_scrollLeft = document.documentElement.scrollLeft;
			qcbcmspanel_scrollTop = document.documentElement.scrollTop;
		} else {
			qcbcmspanel_scrollLeft = document.body.scrollLeft;
			qcbcmspanel_scrollTop = document.body.scrollTop;
		}
		qcbcmspanel_lastX=qcbcmspanel_scrollLeft + qcbcmspanel_floatX;
		qcbcmspanel_lastY=qcbcmspanel_scrollTop + qcbcmspanel_floatY;
	}
	displayFloatingDiv(displayObjId, '', qcbcmspanel_layerwidth, qcbcmspanel_layerheight, qcbcmspanel_lastX, qcbcmspanel_lastY);
} // qcbcms_showPopup

var current_Popup = "";
function window_timerclose(this_Popup) {
	current_Popup = this_Popup;
	window.setTimeout(window_closePopupC, 500);
}
function window_closePopupC() {
	window_closePopup(current_Popup)
}
function window_closePopup(displayObjId) {
	changeObjectVisibility(displayObjId, 'hidden');
	changeObjectVisibility('dimmer', 'hidden');
}

/* ************************************************************************* */

function getContentDocument(o) {
	if (o.contentDocument!=undefined) {
		return o.contentDocument;
	} else {
		return o.document;
	}
}

function HeaderSubmitClick(e) {
	var scwFrame = e.ownerDocument.getElementById("sitecreationwizardIF");
	var scwFrameBtn = getContentDocument(scwFrame).getElementById("btnSubmit");
	scwFrameBtn.click();
}


function InitFontSizes() {
	//Load the font sizes into the dictionary
	fontSizes.removeAll();
	var theRules = new Array();
	
	iCSS = '';
	aCSS = '';
	//if (ignoreCSSClasses!='') iCSS = ','+ignoreCSSClasses+',';
	//if (applyToCSSClasses!='') aCSS = ','+applyToCSSClasses+',';
		
	for(var r=0; r < document.styleSheets.length; r++) {
		var docCSS = document.styleSheets[r];
		if (docCSS.ownerNode!=undefined) {
			var thisCSS = docCSS.ownerNode.href+'';
		} else {
			var thisCSS = docCSS.href+'';
		}
		if (
			thisCSS.indexOf(document.domain)==-1 ||
			thisCSS.indexOf('dimming.css')>=0 ||
			thisCSS.indexOf('/resources/css/')>=0 ||
			thisCSS.indexOf('/admin/_css/')>=0
		) {
			//alert(document.domain+' :: '+ thisCSS);
			//Do not apply these rules
		} else { 
			if (docCSS.cssRules) {
				theRules = docCSS.cssRules;
			} else if (docCSS.rules) {
				theRules = docCSS.rules;
			}

			for(var i=0; i < theRules.length; i++) {
				if(theRules[i].style.fontSize !=null) {
					if (theRules[i].selectorText.indexOf('.loading_text')!=-1) {
						//alert(theRules[i].selectorText);
					} else if (
						iCSS.indexOf(','+theRules[i].selectorText+',')==-1 &&
						(aCSS.indexOf(','+theRules[i].selectorText+',')>=0 || aCSS=='')
					) {
						if (
							theRules[i].style.fontSize.indexOf("em") != -1 ||
							theRules[i].style.fontSize.indexOf("pt") != -1 ||
							theRules[i].style.fontSize.indexOf("px") != -1 
						) {
							var sSize = theRules[i].style.fontSize;
							var sDelta="0";
							var sSizeSuffix = "";
							if (sSize.indexOf("em")>0) sSizeSuffix = "em";
							else if (sSize.indexOf("pt")>0) sSizeSuffix = "pt";
							else if (sSize.indexOf("px")>0) sSizeSuffix = "pt";
							sSize = sSize.replace(sSizeSuffix,"");
						
							if (fontSizes.exists(theRules[i].selectorText))
								fontSizes.setVal(theRules[i].selectorText, sSize+'|'+sSizeSuffix);
							else
								fontSizes.add(theRules[i].selectorText, sSize+'|'+sSizeSuffix);
						}
					}
				}
			}
		} //allowed CSS
	}
	
	var fontClasses = new Dictionary();
	var el = document.all ? document.all : document.getElementsByTagName("body")[0].getElementsByTagName("*"); // fix for IE5.x
	for (var i = 0; i < el.length; i++) {
		if (el[i].type=='select-multiple') {
			fontSizes.add(el[i].name, (el[i].clientWidth+parseInt(el[i].clientWidth*1.20) ) +'|'+el[i].clientHeight);
			if (fontClasses.exists(el[i].className)) {
				var R = fontClasses.getVal(el[i].className);
			} else {
				var R = getCSSRule('.'+el[i].className,'');
				fontClasses.add(el[i].className, R);
			}
			if (Ext.isGecko) {
				if (R['font-size']!=undefined) fontSizes.add(el[i].name+'.FONTSIZE',R['font-size']);
			} else if (Ext.isIE || Ext.isIE7) {
				if (R['fontSize']!=undefined) fontSizes.add(el[i].name+'.FONTSIZE',R['fontSize']);
			}
			
		} else if (el[i].type=='select-one') {
			fontSizes.add(el[i].name, (el[i].clientWidth+parseInt(el[i].clientWidth*1.20) ) );
			
			var R = getCSSRule('.'+el[i].className,'');
			if (Ext.isGecko) {
				if (R['font-size']!=undefined) fontSizes.add(el[i].name+'.FONTSIZE',R['font-size']);
			} else if (Ext.isIE || Ext.isIE7) {
				if (R['fontSize']!=undefined) fontSizes.add(el[i].name+'.FONTSIZE',R['fontSize']);
			}

		} else if ( el[i].type!=undefined && el[i].type!='') {
			//alert(el[i].type);
		}
	}
	
	
}

function getElementPropertyValue(E,nsPropName, iePropName) {
	nsPropName = nsPropName + '';
	iePropName = iePropName + '';
	if (iePropName=='') iePropName = nsPropName;
	if (E.style.getPropertyValue!=undefined) {
		var V = E.style.getPropertyValue(nsPropName);
	} else if (E.currentStyle!=undefined) {
		var V = E.currentStyle[iePropName];
	} else if (E.style[iePropName]!=undefined && E.style[iePropName]!='' && E.style[iePropName]!=false) {
		var V = E.style[iePropName];
	} else {
		return null;
	}
	return V;
}

function SetDefaultFontSize(defaultFontSize) {
	currentFontSize=defaultFontSize;
}

function SetDefaultCSSClasses(newFontSizeClasses) {
	applyToCSSClasses = newFontSizeClasses;
}
function AddFontSizeClass(newFontSizeClass) {
	if (applyToCSSClasses!='') applyToCSSClasses=applyToCSSClasses+',';
	applyToCSSClasses=applyToCSSClasses+newFontSizeClass;
}

function SetDefaultIgnoreCSSClasses(newFontSizeClasses) {
	IgnoreCSSClasses = newFontSizeClasses;
}
function AddIgnoreFontSizeClass(newFontSizeClass) {
	if (IgnoreCSSClasses!='') IgnoreCSSClasses=IgnoreCSSClasses+',';
	IgnoreCSSClasses=IgnoreCSSClasses+newFontSizeClass;
}

function ChangeFontSize(newFontSize) {
	if(newFontSize == currentFontSize) {
		ChangeFontSizeImage(currentFontSize);
		//ChangeFontSizeControls(currentFontSize);
		return;
	}
	currentFontSize = newFontSize;
	
	var theRules = new Array();
	if (document.styleSheets[0].cssRules) {
		theRules = document.styleSheets[0].cssRules;
	} else if (document.styleSheets[0].rules) {
		theRules = document.styleSheets[0].rules;
	}
	
	for(var i=0; i < theRules.length; i++) {
		if(theRules[i].style.fontSize !=null) {
			if (fontSizes.exists(theRules[i].selectorText)) {
				//Class found - do magic
				var fSize = fontSizes.getVal(theRules[i].selectorText);
				var fSizeA = fSize.split('|');
				
				if(currentFontSize == 'small') {
					var newfSize = ( parseFloat(fSizeA[0]) + parseFloat(fontResize_SmallDelta) );
				} else if (currentFontSize == 'medium') {
					var newfSize = ( parseFloat(fSizeA[0]) + parseFloat(fontResize_MediumDelta) );
				} else if(currentFontSize == 'large') {
					var newfSize = ( parseFloat(fSizeA[0]) + parseFloat(fontResize_LargeDelta) );
				}
				if (fSizeA[1]="px") fSizeA[1]="pt";
				if (Font2EMS[newfSize+fSizeA[1]+'']!=undefined) {
					theRules[i].style.fontSize = Font2EMS[newfSize+fSizeA[1]];
				} else {
					newfSize = Math.ceil(newfSize);
					if (Font2EMS[newfSize+fSizeA[1]+'']!=undefined) {
						theRules[i].style.fontSize = Font2EMS[newfSize+fSizeA[1]];
					} else {
						theRules[i].style.fontSize = Font2EMS[(newfSize+1)+fSizeA[1]];
					}
				}
				//alert(theRules[i].style.fontSize);
				//theRules[i].style.fontSize = newfSize + fSizeA[1]+'';
			}
		}
	}
	createCookie("fontSize",currentFontSize,10);
	ChangeFontSizeImage(currentFontSize);
	//ChangeFontSizeControls(currentFontSize);
}

function ChangeFontSizeControls(newFontSize) {
	fSizeVariation = 1;
	var el = document.all ? document.all : document.getElementsByTagName("body")[0].getElementsByTagName("*"); // fix for IE5.x
	for (var i = 0; i < el.length; i++) {
		if (fontSizes.exists(el[i].name) && fontSizes.exists(el[i].name+".FONTSIZE") ) {
			var E = el[i];
			var eSizeS = fontSizes.getVal(el[i].name)+'';
			var eSize = eSizeS.split('|');
			
			var eFontSize = fontSizes.getVal(el[i].name+".FONTSIZE")+''; //initial font size
			
			var eSizeSuffix = "";
			if (eFontSize.indexOf("em")>0) eSizeSuffix = "em";
			else if (eFontSize.indexOf("pt")>0) eSizeSuffix = "pt";
			else if (eFontSize.indexOf("px")>0) eSizeSuffix = "pt";
			eFontSize = eFontSize.replace(eSizeSuffix,"");
			
			var eFontRatio = 1.000;
			if (newFontSize=="large") {
				eFontRatio = parseFloat(fontResize_LargeDelta) / parseFloat(eFontSize);
			} else if (newFontSize=="medium") {
				eFontRatio = parseFloat(fontResize_MediumDelta) / parseFloat(eFontSize);
			} else if (newFontSize=="small") {
				eFontRatio = parseFloat(fontResize_SmallDelta) / parseFloat(eFontSize);
			}
			eSize[0] = parseInt( eSize[0] );
			eSize[1] = parseInt( eSize[1] );
			
			var eX = ExtObjects[E.id];
			if (eX!=undefined) {
				var X = Ext;
				if (Ext.isIE || Ext.isIE7) {
					eNewWidth = eSize[0] + ((eFontRatio*0.50) * eSize[0]);
					eNewHeight = eSize[1] + ((eFontRatio*0.75) * eSize[1]);
					eX.resizeTo(eNewWidth,eNewHeight);
					//alert('eS: '+eSize[0]+' sW: '+E.scrollWidth+' cW: '+ E.clientWidth+' oW: '+ E.offsetWidth);
				} else if (Ext.isGecko) {
					eX.resizeTo(1,1);
					
					eNewWidth = E.scrollWidth + Math.abs(eSize[0] * eFontRatio);
					if (eNewWidth<50) { 
						eNewWidth = eSize[0];
					}
					
					eNewHeight = E.scrollHeight;
					//if (eNewHeight>eSize[1] ) eNewHeight = (eSize[1] * eFontRatio) + eSize[1];
					//else
					if (eNewHeight<25) eNewHeight = eSize[1];
					
					
					eX.resizeTo(eNewWidth,eNewHeight);
					if (E.clientWidth<E.scrollWidth) { 
						eX.resizeTo(eNewWidth+(E.scrollWidth-E.clientWidth)+25,eNewHeight);
					}
				} else {
					//Unsupported
				}
			} else {
				E.style.width = (parseInt(E.style.width.replace('px',''))+25)+'px';
				//(eSize[0]+(eFontRatio*eSize[0]))+'px'
			}
			//var eNewWidth = 50;
			/*
			if (E.scrollWidth<E.clientOffset) 
				eNewWidth = E.clientWidth;
			else {
				eNewWidth = E.scrollWidth+50;
				if (E.offsetWidth>E.clientWidth) {
					//Scroll bars??
				}
			}
			*/
			//var eNewWidth =  (E.scrollWidth-E.offsetWidth)+E.offsetWidth;
				//eNewWidth = (parseInt(E.style.width.replace('px',''))-eNewWidth ) +eNewWidth;
			//var eNewHeight = (E.offsetHeight-E.scrollHeight)+E.offsetHeight;
			
			//alert('id: '+E.id+'  OW:'+E.offsetWidth+' SW:'+E.scrollWidth+'  CW:'+E.clientWidth+' NW:'+eNewWidth+'');
			//var eX = ExtObjects[E.id];
			//eX.resizeTo(eNewWidth,'');
		}
	}
}
function ChangeFontSizeImage(newFontSize) {
	// Update the images.
	if (document.getElementById("changeFontSmall")==undefined) return;
	if(newFontSize == 'small') {
		document.getElementById("changeFontSmall").src = document.getElementById("changeFontSmall").src.replace("small_key.gif","small_key_down.gif");
		document.getElementById("changeFontMedium").src = document.getElementById("changeFontMedium").src.replace("medium_key_down.gif","medium_key.gif");
		document.getElementById("changeFontLarge").src = document.getElementById("changeFontLarge").src.replace("large_key_down.gif","large_key.gif");
	} else if(newFontSize == 'medium') {
		document.getElementById("changeFontSmall").src = document.getElementById("changeFontSmall").src.replace("small_key_down.gif","small_key.gif");
		document.getElementById("changeFontMedium").src = document.getElementById("changeFontMedium").src.replace("medium_key.gif","medium_key_down.gif");
		document.getElementById("changeFontLarge").src = document.getElementById("changeFontLarge").src.replace("large_key_down.gif","large_key.gif");
	} else if(newFontSize == 'large') {
		document.getElementById("changeFontSmall").src = document.getElementById("changeFontSmall").src.replace("small_key_down.gif","small_key.gif");
		document.getElementById("changeFontMedium").src = document.getElementById("changeFontMedium").src.replace("medium_key_down.gif","medium_key.gif");
		document.getElementById("changeFontLarge").src =document.getElementById("changeFontLarge").src.replace("large_key.gif","large_key_down.gif");
	}
	
	if (document.getElementById("changeFontSpan")!=undefined) {
		var fSpan = document.getElementById("changeFontSpan").style;
		if(newFontSize == 'small')
			fSpan.bottom = '-0.66em';
		else if(newFontSize == 'medium')
			fSpan.bottom = '-0.50em';
		else if(newFontSize == 'large')
			fSpan.bottom = '-0.33em';
	}
}


function setupFontSize() {
	if(readCookie("fontSize") != null) {
		dimmerOSWG_showPopup(setupFontPanelID, undefined, 0);
		ChangeFontSize(readCookie("fontSize"));
		window_timerclose(setupFontPanelID);
	}
}

function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function eraseCookie(name) {
	createCookie(name,"",-1);
}

var currentFontSize='';
var applyToCSSClasses = '';
var IgnoreCSSClasses = '';

var fontResize_SmallDelta ='';
var fontResize_MediumDelta = '';
var fontResize_LargeDelta = '';

var fontSizes = new Dictionary();



//****************************************
//Dictionary Object
//****************************************
/*
function: Dictionary
Parameters: None
Returns: A new Dictionary object.
Actions: Constructor.
*/
function Dictionary(){
	//Properties
	//~Public
	this.count = 0;
	//~Private
	this.Obj = new Object();
	//Methods
	//~Public
	this.exists = Dictionary_exists;
	this.add = Dictionary_add;
	this.remove = Dictionary_remove;
	this.removeAll = Dictionary_removeAll;
	this.values = Dictionary_values;
	this.keys = Dictionary_keys;
	this.items = Dictionary_items;
	this.getVal = Dictionary_getVal;
	this.setVal = Dictionary_setVal;
	this.setKey = Dictionary_setKey;
}
//****************************************
//Method implementations
//****************************************
/*
function: Dictionary_exists
implements: Dictionary.exists
Parameters:
    (String) sKey - Key name being looked for.
Returns: (BOOL) - true if sKey is found ; false if it is not.
Actions: Iterates through all Dictionary keys and checks for sKey.
*/
function Dictionary_exists(sKey){
	return (this.Obj[sKey])?true:false;
}
//****************************************
/*
function: Dictionary_add
implements: Dictionary.add
Parameters:
    (String) sKey - Key name to be added.
    (Any)    aVal - Value to be associated with sKey.
Returns: (BOOL) - true if sKey is created ; false if it is not (because of a duplicate Key name).
Actions: Adds a new Key=Value pair to the Dictionary.
*/
function Dictionary_add(sKey,aVal){
	var K = String(sKey);
	if(this.exists(K)) return false;
	this.Obj[K] = aVal;
	this.count++;
	return true;
}
//****************************************
/*
function Dictionary_remove
implements: Dictionary.remove
Parameters:
    (String) sKey - Key to be removed.
Returns: (BOOL) - true if sKey has been removed ; false if it has not (did not exist).
Actions: Removes a specified key from the Dictionary.
*/
function Dictionary_remove(sKey){
	var K = String(sKey);
	if(!this.exists(K)) return false;
	delete this.Obj[K];
	this.count--;
	return true;
}
//****************************************
/*
function: Dictionary_removeAll
implements: Dictionary.removeAll
Parameters: None
Returns: Nothing
Actions: Removes all key=value pairs from a Dictionary object.
*/
function Dictionary_removeAll(){
	for(var key in this.Obj) delete this.Obj[key];
	this.count = 0;
}
//****************************************
/*
function: Dictionary_values
implements: Dictionary.values
Parameters: None
Returns: Returns an Array containing all the item values in a Dictionary object.
Actions: Iterates through the Dictionary name=value pairs and builds an Array of all values.
*/
function Dictionary_values(){
	var Arr = new Array();
	for(var key in this.Obj) Arr[Arr.length] = this.Obj[key];
	return Arr;
}
//****************************************
/*
function: Dictionary_keys
implements: Dictionary.keys
Parameters: None
Returns: Returns an Array containing all existing keys in a Dictionary object.
Actions: Iterates through the Dictionary name=value pairs and builds an Array of all keys.
*/
function Dictionary_keys(){
	var Arr = new Array();
	for(var key in this.Obj) Arr[Arr.length] = key;
	return Arr;
}
//****************************************
/*
function: Dictionary_items
implements: Dictionary.items
Parameters: None
Returns: Returns a bidimensional Array containing all existing keys=value pairs in a Dictionary object.
Actions:
    - Iterates through the Dictionary key=value pairs and builds a bidimensional Array.
    - First index contains the key name ; second index contains the value:
        ex. Arr[0][0] is the key name of the first Dictionary item
            Arr[0][1] is the value of the first Dictionary item
*/
function Dictionary_items(){
	var Arr = new Array();
	for(var key in this.Obj){
	var A = new Array(key,this.Obj[key]);
		Arr[Arr.length] = A;
	}
	return Arr;
}
//****************************************
/*
function: Dictionary_getVal
implements: Dictionary.getVal
Parameters:
    (String) sKey
Returns: Item value for the passed sKey.
Actions: Retrieves the Dictionary item value corresponding to sKey.
*/
function Dictionary_getVal(sKey){
	var K = String(sKey);
	return this.Obj[K];
}
//****************************************
/*
function: Dictionary_setVal
implements: Dictionary.setVal
Parameters:
    (String) sKey
    (Any)    aVal
Returns: Nothing.
Actions:
    - Sets the Dictionary item value corresponding to sKey to aVal.
    - If The key is not found in the dictionary it is created.
*/
function Dictionary_setVal(sKey,aVal){
	var K = String(sKey);
	if(this.exists(K))
		this.Obj[K] = aVal;
	else
		this.add(K,aVal);
}
//****************************************
/*
function: Dictionary_setKey
implements: Dictionary.setKey
Parameters:
    (String) sKey
    (String) sNewKey
Returns: Nothing.
Actions:
    - Changes sKey to sNewKey
    - if sKey is not found, creates a new item with key=sNewKey and value=null
    - if sKey is not found, but sNewKey is found - does nothing.
    - if sKey and sNewKey both exist - does nothing.
*/
function Dictionary_setKey(sKey,sNewKey){
	var K = String(sKey);
	var Nk = String(sNewKey);
	if(this.exists(K)){
		if(!this.exists(Nk)){
			this.add(Nk,this.getVal(K));
			this.remove(K);
		}
	}
	else if(!this.exists(Nk)) this.add(Nk,null);
}



function getCSSRule(ruleName, deleteFlag) {               // Return requested style obejct
	ruleName=ruleName.toLowerCase();                       // Convert test string to lower case.
	var ruleObj = Object;
	var addedObjItem = false;
	if (document.styleSheets) {                            // If browser can play with stylesheets
		for (var i=0; i<document.styleSheets.length; i++) { // For each stylesheet
			var styleSheet=document.styleSheets[i];          // Get the current Stylesheet
			var ii=0;                                        // Initialize subCounter.
			var cssRule=false;                               // Initialize cssRule. 
			if (styleSheet.ownerNode!=undefined) {
				var thisCSS = styleSheet.ownerNode.href+'';
			} else {
				var thisCSS = styleSheet.href+'';
			}
			if ( !(thisCSS.indexOf(document.domain)==-1) ) {
				do {                                             // For each rule in stylesheet
					if (styleSheet.cssRules) {                    // Browser uses cssRules?
						cssRule = styleSheet.cssRules[ii];         // Yes --Mozilla Style
					} else {                                      // Browser usses rules?
						cssRule = styleSheet.rules[ii];            // Yes IE style. 
					}                                             // End IE check.
					if (cssRule)  {                               // If we found a rule...
						var cssRuleselectorText = cssRule.selectorText.toLowerCase()+'';
						var cssRuleselectorText0 = ','+cssRuleselectorText.replace(/\s/gi,',')+','; // \S\b
						//alert(cssRuleselectorText+' :: '+cssRuleselectorText0+' :: '+ruleName);
						if (cssRuleselectorText==ruleName) { //  match ruleName?
							if (deleteFlag=='delete') {             // Yes.  Are we deleteing?
								if (styleSheet.cssRules) {           // Yes, deleting...
									styleSheet.deleteRule(ii);        // Delete rule, Moz Style
								} else {                             // Still deleting.
									styleSheet.removeRule(ii);        // Delete rule IE style.
								}                                    // End IE check.
								return true;                         // return true, class deleted.
							} else {                                // found and not deleting.
								if (Ext.isIE || Ext.isIE7) {
									for (var s in cssRule.style) {
										var sV = getElementPropertyValue(cssRule,s+'', s+'');
										if (sV!=null) { addedObjItem = true; ruleObj[ s+'' ] = sV; }
										//alert('sV = '+ruleObj[ s+'' ]);
									}
								} else if (Ext.isGecko) {
									for (var s=0; s<cssRule.style.length; s++) {
										addedObjItem = true; 
										ruleObj[ cssRule.style[s] ] = getElementPropertyValue(cssRule,cssRule.style[s]+'', cssRule.style[s]+'');
									}
								}
							}
						} else if (cssRuleselectorText0.indexOf(','+ruleName+',')>=0 || cssRuleselectorText0.indexOf(ruleName+',')>=0) {
							if (Ext.isIE || Ext.isIE7) {
								for (var s in cssRule.style) {
									var sV = getElementPropertyValue(cssRule,s+'', s+'');
									if (sV!=null) { addedObjItem = true;  ruleObj[ s ] = sV; }
								}
							} else if (Ext.isGecko) {
								for (var s=0; s<cssRule.style.length; s++) {
									addedObjItem = true; 
									ruleObj[ cssRule.style[s] ] = getElementPropertyValue(cssRule,cssRule.style[s]+'', cssRule.style[s]+'');
								}
							}
						}											// End found rule name
					}                                             // end found cssRule
					ii++;                                         // Increment sub-counter
				} while (cssRule)                                // end While loop
			} // CSS needs to be on host domain - other access violation
		}                                                   // end For loop
	}   	// end styleSheet ability check
	if (addedObjItem) {
		return ruleObj;
	} else {
		return false;                                          // we found NOTHING!
	}
}                                                         // end getCSSRule 

function killCSSRule(ruleName) {                          // Delete a CSS rule   
	return getCSSRule(ruleName,'delete');                  // just call getCSSRule w/delete flag.
}                                                         // end killCSSRule

function addCSSRule(ruleName) {                           // Create a new css rule
	if (document.styleSheets) {                            // Can browser do styleSheets?
		if (!getCSSRule(ruleName)) {                        // if rule doesn't exist...
			if (document.styleSheets[0].addRule) {           // Browser is IE?
				document.styleSheets[0].addRule(ruleName, null,0);      // Yes, add IE style
			} else {                                         // Browser is IE?
				document.styleSheets[0].insertRule(ruleName+' { }', 0); // Yes, add Moz style.
			}                                                // End browser check
		}                                                   // End already exist check.
	}                                                      // End browser ability check.
	return getCSSRule(ruleName);                           // return rule we just created.
} 
//****************************************
var ExtObjects = new Object();
function attachResizablesToObjects() {
	if (document.forms.length==0) {
		//No form to do anything with
	} else {
		for (f=0; f<document.forms.length; f++) {
			for (i=0;i<document.forms[f].length; i++) {
				var E = document.forms[f].elements[i];
				if (E.id.indexOf('scwp_')==-1 && E.id!='' && (E.type=='select-multiple' || E.type=='textarea') ) {
				//if (E.id.indexOf('scwp_')==-1 && (E.type=='text') ) {
					if (E.className!='form-field') {
						if (E.offsetWidth!=undefined) {
							var Ew = E.offsetWidth+(E.offsetWidth-E.clientWidth);
							var Eh = E.offsetHeight+(E.offsetHeight-E.clientHeight);
							var mEw = Ew;
							var mEh = Eh;
							if (E.type=='select-multiple' && (Ext.isIE || Ext.isIE7)) Eh = Eh+50;
						}else {
							//interrogate(E);
						}
						//alert(E.id);
						//if (E.id=='Comments') {
							var Ewrap = new Ext.Resizable(E.id, {wrap:true, pinned:true, width:Ew, height:Eh, minWidth:mEw, minHeight: mEh, dynamic: true});
							if (Ext.version.indexOf('2')==0) Ewrap.resizeTo(Ewrap.minWidth, Ewrap.minHeight);
							ExtObjects[E.id] = Ewrap;
						//}
						/*
						if (E.type=='select-multiple' && (Ext.isIE || Ext.isIE7)) {
							Ewrap.on('resize', function(){
							//alert('h:'+this.height+' d: '+this.resizeChild.dom.style.height+'');
							//this.resizeChild.dom.style.height=this.height+'px';
							});
						}
						*/
						
					} else {
						/*
						if (E.style.width=='0px') {
							//if (E.cols!=-1) { E.style.width=E.offsetWidth+'px'; E.cols=-1; }
							//if (E.rows!=-1) { E.style.height=E.offsetHeight+'px'; E.rows=-1; }
							
							Ewrap.on('resize', function(){
								this.resizeChild.dom.style.width=(this.width+50)+'px';
								//this.resizeChild.dom.style.width=(this.width)+'px';
							});
							//Ewrap.on('beforeresize', function() { this.resizeChild.dom.style.width=(this.width)+'px'; } );
							E.style.width = Ew+'px';
						}
						*/
					}
				}
			}
		}
	}
		//if ( ((formObj.elements[i].name!='')||(formObj.elements[i].name.length>0)) && (rff.indexOf(';'+formObj.elements[i].name+';')>=0) ) {
}



/* **********************************************
* Fluid Text Resizer- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
********************************************** */

/*Fluid Text Resizer (June 27th, 2010)
* This notice must stay intact for usage 
* Author: Dynamic Drive at http://www.dynamicdrive.com/
* Visit http://www.dynamicdrive.com/ for full source code
*/

jQuery.noConflict()

function fluidtextresizer(setting){
	fluidtextresizer.count=(fluidtextresizer.count)? ++fluidtextresizer.count : 1
	this.cookiename="fluidtextsizer"+fluidtextresizer.count //name of cookie to use to store persistence for this text resizer instance
	this.setting=setting
	this.selectors=[] //array translating setting.targets into array of jquery selectors
	this.$controls=null
	this.defaultfontsizes=[]
	this.curfontlevel=0
	var thisobj=this
	jQuery(function($){ //on document.ready
		var els=setting.targets
		for (var i=0; i<els.length; i++){
			if ($(els[i]).length==0){ //if selector doesn't yield any matched elements
				els.splice(i, 1) //delete it from setting.targets[]
				i-=1
				continue
			}
			var curfontsize=$(els[i]).css('fontSize')
			thisobj.defaultfontsizes.push({val:parseFloat(curfontsize), unit:curfontsize.slice(-2)}) //remember default font sizes of target elements
			thisobj.selectors.push($(els[i])) //cache selector
		}
		if (setting.controlsdiv){ //if special container for resize controls defined
			thisobj.$controls=$('#'+setting.controlsdiv).find('a[href^=#fontsize], a[href=#bigger], a[href=#smaller]')
			thisobj.$controls.each(function(){
				var $target=$(this)
				$target.data('level', $target.attr('href').replace(/(#)|(fontsize)/ig, '')) //remove "#" and "fontsize" from href to derive level
				$target.click(function(){
				thisobj.setFontLevel($target.data('level'))
				return false
				})
			})
		}
		if (setting.persisttype!="none"){
			var curfontlevel=fluidtextresizer.routines.getCookie(thisobj.cookiename) || 0 //get persisted font level, or 0 to indicate no change in font size
			curfontlevel=parseInt(curfontlevel)
			if (curfontlevel>=-setting.levels && curfontlevel<=setting.levels){ //if font level within range
				thisobj.setFontLevel(curfontlevel, true)
			}
		}
	})
}

fluidtextresizer.prototype={

	setFontLevel:function(level, disableanim){
		var s=this.setting
		var $els=this.selectors
		var level=(level=="bigger")? this.curfontlevel+1 : (level=="smaller")? this.curfontlevel-1 : parseInt(level) //calculate new font size level
		if (s.controlsdiv){ //if special container for resize controls defined
			this.$controls.filter('.selectedcontrol').removeClass('selectedcontrol').end()  //deselect previously selected control
				.filter('[href=#fontsize'+level+']').addClass('selectedcontrol') //apply "selectedcontrol" CSS class to corresponding control
		}
		if (level<-s.levels || level>s.levels || level==this.curfontlevel) //if target level is out or range (range is int from -s.levels to +s.levels) or is current level already
			return
		for (var i=0; i<$els.length; i++){
			var abslevel=Math.abs(level)
			var valchange=Math.pow(1.2, abslevel) //calculate fontlevel^1.2
			//calculate new font size, which is default font size multiply or divided by valchange:
			var newfontsize=this.defaultfontsizes[i].val * (level<0? 1/valchange : level>0? valchange : 1) + this.defaultfontsizes[i].unit
			$els[i].animate({fontSize: newfontsize}, disableanim? 0 : this.setting.animate)
		}
		if (s.persist=="session"){
			fluidtextresizer.routines.setCookie(this.cookiename, level)
		}
		this.curfontlevel=level
	}

}

fluidtextresizer.routines={
	getCookie:function(Name){ 
		var re=new RegExp(Name+"=[^;]*", "i"); //construct RE to search for target name/value pair
		return (document.cookie.match(re))? document.cookie.match(re)[0].split("=")[1] : null //return cookie value if found or null
	},
	
	setCookie:function(name, value, days){
		var expirestr=''
		if (typeof days!="undefined") //if set persistent cookie
			expirestr="; expires="+expireDate.setDate(new Date().getDate()+days).toGMTString()
		document.cookie = name+"="+value+"; path=/"+expirestr
	}
}
jQuery('.wfi-layouttable').width('100%');
jQuery('.wfi-layoutcenter').width('100%');
//--><!]]>

