//----------------------------------------------------------------------------------------------------------
// Browser testen, erzeugt stBrowser (gleich wie CF Browsererkennung)
// stBrowser.bMac 		-> true, false (boolean) 
// stBrowser.sVersion	-> Versionsnummer (float)
// stBrowser.sBrowser	-> "NS", "IE", "SAFARI", "OPERA" (string)
// stBrowser.sType		-> "DOM", "IELAYER", "NSLAYER" (string)


function oBrowser(f_bMac,f_sVersion,f_sBrowser,f_sType) 
{
	this.bMac = f_bMac;
	this.sVersion = f_sVersion;
	this.sBrowser = f_sBrowser;
	this.sType = f_sType;
}

var bMac = false;
var sVersion = 3.0;
var sBrowser = "IE";
var sType = "IELAYER";
var http_user_agent = navigator.userAgent.toLowerCase(); 	

if (http_user_agent.indexOf("mac") != -1)
{
	bMac = true;
}

if (http_user_agent.indexOf("opera") != -1) 
{
	sBrowser = "OPERA";
	if (http_user_agent.indexOf("opera 7") != -1)		sVersion = "7";
	else if (http_user_agent.indexOf("opera 6") != -1)	sVersion = "6";
	else if (http_user_agent.indexOf("opera 5") != -1)	sVersion = "5";
	else if (http_user_agent.indexOf("opera 4") != -1)	sVersion = "4";
	else if (http_user_agent.indexOf("opera 3") != -1)	sVersion = "3";
	else sVersion = "2";	
		
}	
else if (http_user_agent.indexOf("msie") != -1 && http_user_agent.indexOf("compatible") != -1)
{
	sBrowser = "IE";
	if (http_user_agent.indexOf("msie 5.5") != -1)			sVersion = "5.5";
	else if (http_user_agent.indexOf("msie 5.2") != -1)		sVersion = "5.2";
	else if (http_user_agent.indexOf("msie 5") != -1)		sVersion = "5";
	else if (http_user_agent.indexOf("msie 6") != -1)		sVersion = "6";
	else sVersion = "4";
}
else if (http_user_agent.indexOf("applewebkit") != -1 && http_user_agent.indexOf("safari") != -1)
{
	sBrowser = "SAFARI";
	sVersion = "1";
}	
else if (http_user_agent.indexOf("mozilla") != -1)
{
	sBrowser = "NS";
	if (http_user_agent.indexOf("mozilla/5") != -1)			sVersion = "5";
	else if (http_user_agent.indexOf("mozilla/4") != -1)	sVersion = "4";
	else if (http_user_agent.indexOf("mozilla/3") != -1)	sVersion = "3";
}	

if ((sBrowser == "IE" && sVersion >= 5 && !bMac) ||
	(sBrowser == "IE" && sVersion >= 5.2 && bMac) ||
	(sBrowser == "NS" && sVersion >= 5) || 
	(sBrowser == "OPERA" && sVersion >= 7) || 
	(sBrowser == "SAFARI" && sVersion >= 1))
{
	sType = "DOM";
}
else if (sBrowser == "NS" && sVersion == 4)
{
	sType = "NSLAYER";
}
else if ((sBrowser == "IE" && sVersion == 4) || (bMac && sBrowser == "IE" && sVersion <= 5))
{
	sType = "IELAYER";
}
else
{
	sType = "OLD";
}	

stBrowser = new oBrowser(bMac,sVersion,sBrowser,sType);

//--------------------------------------------------

function imageZoom(file,x,y)
{
	var address = rootWWW + "_global/imagezoom.cfm?img=";
	var sizeX = 850;
	var sizeY = 600;

	if(typeof x != "undefined")
		sizeX = x;
	if(typeof y != "undefined")
		sizeY = y;

	if(typeof file != "undefined" && file.length)
	{
		ImageZoomPopup = window.open(address + file, "ImageZoomWindow", "width=" + sizeX + ",height=" + sizeY + ",left=20,top=20,scrollbars=yes,resizable=yes");
		ImageZoomPopup.focus();
	}
}
//--------------------------------------------------
/*
DateChooser 2.9
February 13, 2008
For usage details see http://yellow5.us/projects/datechooser/

Creative Commons Attribution 2.0 License
http://creativecommons.org/licenses/by/2.0/
*/

if (!objPHPDate)
{
	var objPHPDate =
	{
		/* These values are defaults. Please feel free to modify them as needed. */

		aDay: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
		aShortDay: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
		aLetterDay: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],
		aMonth: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
		aShortMonth: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
		aSuffix: ['th', 'st', 'nd', 'rd', 'th', 'th', 'th', 'th', 'th', 'th', 'th', 'th', 'th', 'th', 'th', 'th', 'th', 'th', 'th', 'th', 'th', 'st', 'nd', 'rd', 'th', 'th', 'th', 'th', 'th', 'th', 'th', 'st'],

		/* End user-editable values */

		sTimezoneOffset: '',

		GetTimezoneOffset: function()
		{
			var objLocal = new Date();
			objLocal.setHours(12);
			objLocal.setMinutes(0);
			objLocal.setSeconds(0);
			objLocal.setMilliseconds(0);

			var objUTC = new Date();
			objUTC.setMilliseconds(objLocal.getUTCMilliseconds());
			objUTC.setSeconds(objLocal.getUTCSeconds());
			objUTC.setMinutes(objLocal.getUTCMinutes());
			objUTC.setHours(objLocal.getUTCHours());
			objUTC.setDate(objLocal.getUTCDate());
			objUTC.setMonth(objLocal.getUTCMonth());
			objUTC.setFullYear(objLocal.getUTCFullYear());

			this.sTimezoneOffset = ((objLocal.getTime() - objUTC.getTime()) / (1000 * 3600));
			var bNegative = (this.sTimezoneOffset < 0);

			this.sTimezoneOffset  = bNegative ? (this.sTimezoneOffset + '').substring(1) : this.sTimezoneOffset + '';
			this.sTimezoneOffset  = this.sTimezoneOffset.replace(/\.5/, (parseInt('$1', 10) * 60) + '');
			this.sTimezoneOffset += (this.sTimezoneOffset.substring(this.sTimezoneOffset.length - 3) != ':30') ? ':00' : '';
			this.sTimezoneOffset  = (this.sTimezoneOffset.substr(0, this.sTimezoneOffset.indexOf(':')).length == 1) ? '0' + this.sTimezoneOffset : this.sTimezoneOffset;
			this.sTimezoneOffset  = bNegative ? '-' + this.sTimezoneOffset : '+' + this.sTimezoneOffset;

			delete objLocal;
			delete objUTC;
			return true;
		},

		PHPDate: function()
		{
			var sFormat = (arguments.length > 0) ? arguments[0] : '';

			var nYear = this.getFullYear();
			var sYear = nYear + '';

			var nMonth = this.getMonth();
			var sMonth = (nMonth + 1) + '';
			var sPaddedMonth = (sMonth.length == 1) ? '0' + sMonth : sMonth;

			var nDate = this.getDate();
			var sDate = nDate + '';
			var sPaddedDate = (sDate.length == 1) ? '0' + sDate : sDate;

			var nDay = this.getDay();
			var sDay = nDay + '';

			sFormat = sFormat.replace(/([cDdFjLlMmNnrSUwYy])/g, 'y5-cal-regexp:$1');
			sFormat = sFormat.replace(/y5-cal-regexp:c/g, sYear + '-' + sPaddedMonth + '-' + sPaddedDate + 'T00:00:00' + objPHPDate.sTimezoneOffset);
			sFormat = sFormat.replace(/y5-cal-regexp:D/g, objPHPDate.aShortDay[nDay]);
			sFormat = sFormat.replace(/y5-cal-regexp:d/g, sPaddedDate);
			sFormat = sFormat.replace(/y5-cal-regexp:F/g, objPHPDate.aMonth[nMonth]);
			sFormat = sFormat.replace(/y5-cal-regexp:j/g, nDate);
			sFormat = sFormat.replace(/y5-cal-regexp:L/g, objPHPDate.aLetterDay[nDay]);
			sFormat = sFormat.replace(/y5-cal-regexp:l/g, objPHPDate.aDay[nDay]);
			sFormat = sFormat.replace(/y5-cal-regexp:M/g, objPHPDate.aShortMonth[nMonth]);
			sFormat = sFormat.replace(/y5-cal-regexp:m/g, sPaddedMonth);
			sFormat = sFormat.replace(/y5-cal-regexp:N/g, (nDay == 0) ? 7 : nDay);
			sFormat = sFormat.replace(/y5-cal-regexp:n/g, sMonth);
			sFormat = sFormat.replace(/y5-cal-regexp:r/g, objPHPDate.aShortDay[nDay] + ', ' + sPaddedDate + ' ' + objPHPDate.aShortMonth[nMonth] + ' ' + sYear + ' 00:00:00 ' + objPHPDate.sTimezoneOffset.replace(/:/, ''));
			sFormat = sFormat.replace(/y5-cal-regexp:S/g, objPHPDate.aSuffix[nDate]);
			sFormat = sFormat.replace(/y5-cal-regexp:U/g, parseInt((this.getTime() / 1000), 10));
			sFormat = sFormat.replace(/y5-cal-regexp:w/g, nDay);
			sFormat = sFormat.replace(/y5-cal-regexp:Y/g, sYear);
			sFormat = sFormat.replace(/y5-cal-regexp:y/g, sYear.substring(2));

			return sFormat;
		}
	};

	objPHPDate.GetTimezoneOffset();
	Date.prototype.getPHPDate = objPHPDate.PHPDate;
}

function DateChooser()
{
	/* These values are defaults. Please feel free to modify them as needed. */

	var nWeekStartDay = 0;
	var nXOffset = 0;
	var nYOffset = 0;
	var nTimeout = 0;
	var objAllowedDays = {'0':true, '1':true, '2':true, '3':true, '4':true, '5':true, '6':true};
	var fnUpdate = null;
	var sDefaultIcon = false;
	var objUpdateFields = {};
	var objEarliestDate = null;
	var objLatestDate = null;

	/* End user-editable values */

	if (!arguments || !document.getElementById || !document.getElementsByTagName) return null;
	var ndBodyElement = document.getElementsByTagName('body').length ? document.getElementsByTagName('body')[0] : document;
	var objTimeout = null;
	var ndFrame = null;

	/*@cc_on@*/
	/*@if(@_jscript_version < 6)
		if (document.getElementById('iframehack'))
		{
			ndFrame = document.getElementById('iframehack');
		}
		else
		{
			ndFrame = xb.createElement('iframe');
			ndFrame.id = 'iframehack';
			ndFrame.src = 'javascript:null;';
			ndFrame.scrolling = 'no';
			ndFrame.frameBorder = 0;
			ndFrame.style.border = '0';
			ndFrame.style.padding = 0;
			ndFrame.style.display = 'none';
			ndFrame.style.position = 'absolute';
			ndFrame.style.zIndex = '5000';

			ndBodyElement.appendChild(ndFrame);
		}
	/*@end@*/

	var nDateChooserID = 0;
	while (document.getElementById('calendar' + nDateChooserID)) ++nDateChooserID;
	var sDateChooserID = 'calendar' + nDateChooserID;

	var objSelectedDate = null;

	var objStartDate = new Date();
	objStartDate.setHours(12);
	objStartDate.setMinutes(0);
	objStartDate.setSeconds(0);
	objStartDate.setMilliseconds(0);

	var objMonthYear = new Date(objStartDate);
	objMonthYear.setDate(1);

	var ndDateChooser = xb.createElement('div');
	ndDateChooser.id = sDateChooserID;
	ndDateChooser.className = 'calendar';
	ndDateChooser.style.visibility = 'hidden';
	ndDateChooser.style.position = 'absolute';
	ndDateChooser.style.zIndex = '5001';
	ndDateChooser.style.top = '0';
	ndDateChooser.style.left = '0';
	ndBodyElement.appendChild(ndDateChooser);

	var AddClickEvents = function()
	{
		var aNavLinks = ndDateChooser.getElementsByTagName('thead')[0].getElementsByTagName('a');
		for (var nNavLink = 0; aNavLinks[nNavLink]; ++nNavLink)
		{
			events.add(aNavLinks[nNavLink], 'click', function(e)
			{
				e = e || events.fix(event);
				var ndClicked = e.target || e.srcElement;
				if (ndClicked.nodeName == '#text') ndClicked = ndClicked.parentNode;

				var sClass = ndClicked.className;

				if (sClass == 'previousyear')
				{
					objMonthYear.setFullYear(objMonthYear.getFullYear() - 1);
					if (objEarliestDate && objEarliestDate.getTime() > objMonthYear.getTime())
					{
						objMonthYear.setMonth(objEarliestDate.getMonth());
						objMonthYear.setFullYear(objEarliestDate.getFullYear());
					}
				}
				else if (sClass == 'previousmonth')
				{
					objMonthYear.setMonth(objMonthYear.getMonth() - 1);
					if (objEarliestDate && objEarliestDate.getTime() > objMonthYear.getTime())
					{
						objMonthYear.setMonth(objEarliestDate.getMonth());
						objMonthYear.setFullYear(objEarliestDate.getFullYear());
					}
				}
				else if (sClass == 'currentdate')
				{
					objMonthYear.setMonth(objStartDate.getMonth());
					objMonthYear.setFullYear(objStartDate.getFullYear());
				}
				else if (sClass == 'nextmonth')
				{
					objMonthYear.setMonth(objMonthYear.getMonth() + 1);
					if (objLatestDate && objLatestDate.getTime() < objMonthYear.getTime())
					{
						objMonthYear.setMonth(objLatestDate.getMonth());
						objMonthYear.setFullYear(objLatestDate.getFullYear());
					}
				}
				else if (sClass == 'nextyear')
				{
					objMonthYear.setFullYear(objMonthYear.getFullYear() + 1);
					if (objLatestDate && objLatestDate.getTime() < objMonthYear.getTime())
					{
						objMonthYear.setMonth(objLatestDate.getMonth());
						objMonthYear.setFullYear(objLatestDate.getFullYear());
					}
				}

				RefreshDisplay();
				return false;
			});
		}

		var aDateLinks = ndDateChooser.getElementsByTagName('tbody')[0].getElementsByTagName('a');
		for (var nDateLink = 0; aDateLinks[nDateLink]; ++nDateLink)
		{
			events.add(aDateLinks[nDateLink], 'click', function(e)
			{
				e = e || events.fix(event);
				var ndClicked = e.target || e.srcElement;
				if (ndClicked.nodeName == '#text') ndClicked = ndClicked.parentNode;

				for (var nLink = 0; aDateLinks[nLink]; ++nLink)
				{
					if (aDateLinks[nLink].className == 'selecteddate') aDateLinks[nLink].removeAttribute('class');
				}

				var objTempDate = new Date(objMonthYear);
				objTempDate.setDate(parseInt(ndClicked.childNodes[0].nodeValue, 10));

				var nTime = objTempDate.getTime();
				var sWeekday = objTempDate.getPHPDate('w');
				delete objTempDate;

				if (objEarliestDate && objEarliestDate.getTime() > nTime) return false;
				if (objLatestDate && objLatestDate.getTime() < nTime) return false;
				if (!objAllowedDays[sWeekday]) return false;

				objMonthYear.setTime(nTime);
				objMonthYear.setDate(1);
				if (!objSelectedDate) objSelectedDate = new Date(nTime);
				objSelectedDate.setTime(nTime);
				ndClicked.className = 'selecteddate';

				if (ndFrame) ndFrame.style.display = 'none';
				ndDateChooser.style.visibility = 'hidden';

				if (objTimeout) clearTimeout(objTimeout);

				UpdateFields();

				if (fnUpdate) fnUpdate(objSelectedDate);
				return false;
			});
		}

		return true;
	};

	var UpdateFields = function()
	{
		if (!objSelectedDate) return true;

		for (var sFieldName in objUpdateFields)
		{
			var ndField = document.getElementById(sFieldName);
			if (ndField) ndField.value = objSelectedDate.getPHPDate(objUpdateFields[sFieldName]);
		}

		return true;
	};

	var RefreshDisplay = function()
	{
		var ndTable, ndTHead, ndTR, ndTH, ndA, ndTBody, ndTD, nTime, sWeekday;
		var sClass = '';

		var objTempDate = new Date(objMonthYear);

		var objToday = new Date();
		objToday.setHours(12);
		objToday.setMinutes(0);
		objToday.setSeconds(0);
		objToday.setMilliseconds(0);

		ndTable = xb.createElement('table');
		ndTable.setAttribute('summary', 'DateChooser');

		ndTHead = xb.createElement('thead');
		ndTable.appendChild(ndTHead);

		ndTR = xb.createElement('tr');
		ndTHead.appendChild(ndTR);

		ndTH = xb.createElement('th');
		ndTR.appendChild(ndTH);
		ndA = xb.createElement('a');
		ndA.className = 'previousyear';
		ndA.setAttribute('href', '#');
		ndA.setAttribute('title', 'Previous Year');
		ndTH.appendChild(ndA);
		ndA.appendChild(document.createTextNode(String.fromCharCode(171)));

		ndTH = xb.createElement('th');
		ndTR.appendChild(ndTH);
		ndA = xb.createElement('a');
		ndA.className = 'previousmonth';
		ndA.setAttribute('href', '#');
		ndA.setAttribute('title', 'Previous Month');
		ndTH.appendChild(ndA);
		ndA.appendChild(document.createTextNode(String.fromCharCode(60)));

		ndTH = xb.createElement('th');
		ndTH.setAttribute('colspan', '3');
		/*@cc_on@*/
		/*@if(@_jscript)
			ndTH.colSpan = '3';
		/*@end@*/
		ndTR.appendChild(ndTH);
		ndA = xb.createElement('a');
		ndA.className = 'currentdate';
		ndA.setAttribute('href', '#');
		ndA.setAttribute('title', 'Current Date');
		ndTH.appendChild(ndA);
		ndA.appendChild(document.createTextNode(objMonthYear.getPHPDate("M Y")));

		ndTH = xb.createElement('th');
		ndTR.appendChild(ndTH);
		ndA = xb.createElement('a');
		ndA.className = 'nextmonth';
		ndA.setAttribute('href', '#');
		ndA.setAttribute('title', 'Next Month');
		ndTH.appendChild(ndA);
		ndA.appendChild(document.createTextNode(String.fromCharCode(62)));

		ndTH = xb.createElement('th');
		ndTR.appendChild(ndTH);
		ndA = xb.createElement('a');
		ndA.className = 'nextyear';
		ndA.setAttribute('href', '#');
		ndA.setAttribute('title', 'Next Year');
		ndTH.appendChild(ndA);
		ndA.appendChild(document.createTextNode(String.fromCharCode(187)));

		ndTR = xb.createElement('tr');
		ndTHead.appendChild(ndTR);

		for (var nDay = 0; objPHPDate.aLetterDay[nDay]; ++nDay)
		{
			ndTD = xb.createElement('td');
			ndTR.appendChild(ndTD);
			ndTD.appendChild(document.createTextNode(objPHPDate.aLetterDay[(nWeekStartDay + nDay) % objPHPDate.aLetterDay.length]));
		}

		ndTBody = xb.createElement('tbody');
		ndTable.appendChild(ndTBody);

		while (objTempDate.getMonth() == objMonthYear.getMonth())
		{
			ndTR = xb.createElement('tr');
			ndTBody.appendChild(ndTR);

			for (nDay = 0; nDay < 7; ++nDay)
			{
				var nWeek = (nWeekStartDay + nDay) % objPHPDate.aLetterDay.length;
				if ((objTempDate.getUTCDay() == nWeek) && (objTempDate.getMonth() == objMonthYear.getMonth()))
				{
					nTime = objTempDate.getTime();
					sWeekday = objTempDate.getPHPDate('w');

					sClass  = (objSelectedDate && (objTempDate.getTime() == objSelectedDate.getTime())) ? 'selectedday' : '';
					sClass += (objTempDate.getTime() == objToday.getTime()) ? ' today' : '';
					sClass  = ((sClass.length > 0) && (sClass[1] == ' ')) ? sClass.substr(1, sClass.length - 1) : sClass;

					ndTD = xb.createElement('td');
					if ((objEarliestDate && objEarliestDate.getTime() > nTime) || (objLatestDate && objLatestDate.getTime() < nTime) || !objAllowedDays[sWeekday]) ndTD.className = 'invalidday';
					ndTR.appendChild(ndTD);

					ndA = xb.createElement('a');
					if (sClass.length > 0) ndA.className = sClass;
					ndA.setAttribute('href', '#');
					ndTD.appendChild(ndA);
					ndA.appendChild(document.createTextNode(objTempDate.getDate()));

					objTempDate.setDate(objTempDate.getDate() + 1);
				}
				else
				{
					ndTD = xb.createElement('td');
					ndTR.appendChild(ndTD);
				}
			}
		}

		while (ndDateChooser.hasChildNodes()) ndDateChooser.removeChild(ndDateChooser.firstChild);
		ndDateChooser.appendChild(ndTable);

		if (ndFrame)
		{
			ndFrame.style.display = 'block';
			ndFrame.style.top = ndDateChooser.style.top;
			ndFrame.style.left = ndDateChooser.style.left;
			ndFrame.style.width = (ndTable.clientWidth + 2) + 'px';
			ndFrame.style.height = (ndTable.clientHeight + 4) + 'px';
		}

		AddClickEvents();

		delete objTempDate;
		delete objToday;
		return true;
	};

	var DisplayDateChooser = function()
	{
		var sPositionX = (arguments.length > 0) ? arguments[0] : 'auto';
		var sPositionY = (arguments.length > 1) ? arguments[1] : 'auto';

		var ndStyle = ndDateChooser.style;
		ndStyle.top = sPositionY + '';
		ndStyle.left = sPositionX + '';

		ndDateChooser.style.visibility = 'visible';
		if (objTimeout) clearTimeout(objTimeout);

		if (objSelectedDate)
		{
			objMonthYear.setTime(objSelectedDate.getTime());
		}
		else
		{
			objMonthYear.setTime(objStartDate.getTime());
		}

		objMonthYear.setHours(12);
		objMonthYear.setMinutes(0);
		objMonthYear.setSeconds(0);
		objMonthYear.setMilliseconds(0);
		objMonthYear.setDate(1);

		return RefreshDisplay();
	};

	var GetPosition = function(ndNode)
	{
		var nTop = 0, nLeft = 0;
		if (ndNode.offsetParent)
		{
			nTop = ndNode.offsetTop;
			nLeft = ndNode.offsetLeft;

			while (ndNode.offsetParent)
			{
				ndNode = ndNode.offsetParent;

				nTop += ndNode.offsetTop;
				nLeft += ndNode.offsetLeft;
			}
		}

		return ({'top' : nTop, 'left' : nLeft});
	};

	this.displayPosition = function()
	{
		var sPositionX = (arguments.length > 0) ? arguments[0] : 'auto';
		var sPositionY = (arguments.length > 1) ? arguments[1] : 'auto';

		return DisplayDateChooser(sPositionX, sPositionY);
	};

	this.display = function(e)
	{
		e = e || events.fix(event);

		var ndClicked = e.target || e.srcElement;
		if (ndClicked.nodeName == '#text') ndClicked = ndClicked.parentNode;

		var objPosition = GetPosition(ndClicked);

		DisplayDateChooser(objPosition.left + nXOffset + 'px', objPosition.top + nYOffset + 'px');

		return false;
	};

	this.setXOffset = function()
	{
		nXOffset = ((arguments.length > 0) && (typeof(arguments[0]) == 'number')) ? parseInt(arguments[0], 10) : nXOffset;

		return true;
	};

	this.setYOffset = function()
	{
		nYOffset = ((arguments.length > 0) && (typeof(arguments[0]) == 'number')) ? parseInt(arguments[0], 10) : nYOffset;

		return true;
	};

	this.setCloseTime = function()
	{
		nTimeout = ((arguments.length > 0) && (typeof(arguments[0]) == 'number') && (arguments[0] >= 0)) ? arguments[0] : nTimeout;

		return true;
	};

	this.setUpdateFunction = function()
	{
		if ((arguments.length > 0) && (typeof(arguments[0]) == 'function')) fnUpdate = arguments[0];

		return true;
	};

	this.setUpdateField = function()
	{
		objUpdateFields = {};
		if ((typeof(arguments[0]) == 'string') && (typeof(arguments[1]) == 'string') && document.getElementById(arguments[0]))
		{
			objUpdateFields[arguments[0]] = arguments[1];
		}
		else if ((typeof(arguments[0]) == 'object') && (typeof(arguments[1]) == 'object'))
		{
			for (var nField = 0; arguments[0][nField] !== undefined; ++nField)
			{
				if (nField >= arguments[1].length) break;
				objUpdateFields[arguments[0][nField]] = arguments[1][nField];
			}
		}
		else if (typeof(arguments[0]) == 'object')
		{
			objUpdateFields = arguments[0];
		}

		return true;
	};

	this.setLink = function()
	{
		var sLinkText = ((arguments.length > 0) && (typeof(arguments[0]) == 'string')) ? arguments[0] : 'Choose a date';
		var ndNode = ((arguments.length > 1) && (typeof(arguments[1]) == 'string')) ? document.getElementById(arguments[1]) : null;
		var bPlaceRight = ((arguments.length <= 2) || arguments[2]);
		var sTitleText = ((arguments.length > 3) && (typeof(arguments[3]) == 'string')) ? arguments[3] : 'Click to choose a date';

		if (!ndNode) return false;

		var ndAnchor = xb.createElement('a');
		ndAnchor.className = 'calendarlink';
		ndAnchor.href = '#';

		if (sTitleText.length > 0) ndAnchor.setAttribute('title', sTitleText);
		ndAnchor.appendChild(document.createTextNode(sLinkText));

		if (bPlaceRight)
		{
			if (ndNode.nextSibling)
			{
				ndNode.parentNode.insertBefore(ndAnchor, ndNode.nextSibling);
			}
			else
			{
				ndNode.parentNode.appendChild(ndAnchor);
			}
		}
		else
		{
			ndNode.parentNode.insertBefore(ndAnchor, ndNode);
		}

		events.add(ndAnchor, 'click', this.display);

		return true;
	};

	this.setIcon = function()
	{
		var sIconFile = ((arguments.length > 0) && (typeof(arguments[0]) == 'string')) ? arguments[0] : sDefaultIcon;
		var ndNode = ((arguments.length > 1) && (typeof(arguments[1]) == 'string')) ? document.getElementById(arguments[1]) : null;
		var bPlaceRight = ((arguments.length <= 2) || arguments[2]);
		var sTitleText = ((arguments.length > 3) && (typeof(arguments[3]) == 'string')) ? arguments[3] : 'Click to choose a date';

		if (!ndNode || !sIconFile) return false;

		var ndIcon = xb.createElement('img');
		ndIcon.className = 'calendaricon';
		ndIcon.src = sIconFile;
		ndIcon.setAttribute('alt', 'DateChooser Icon ' + (nDateChooserID + 1));
		if (sTitleText.length > 0) ndIcon.setAttribute('title', sTitleText);

		if (bPlaceRight)
		{
			if (ndNode.nextSibling)
			{
				ndNode.parentNode.insertBefore(ndIcon, ndNode.nextSibling);
			}
			else
			{
				ndNode.parentNode.appendChild(ndIcon);
			}
		}
		else
		{
			ndNode.parentNode.insertBefore(ndIcon, ndNode);
		}

		events.add(ndIcon, 'click', this.display);

		return true;
	};

	this.setStartDate = function()
	{
		if (!arguments.length || !(typeof(arguments[0]) == 'object') || !arguments[0].getTime) return false;

		objStartDate.setTime(arguments[0].getTime());
		objStartDate.setHours(12);
		objStartDate.setMinutes(0);
		objStartDate.setSeconds(0);
		objStartDate.setMilliseconds(0);

		if (objEarliestDate && objEarliestDate.getTime() > objStartDate.getTime())
		{
			objStartDate.setTime(objEarliestDate.getTime());
		}
		else if (objLatestDate && objLatestDate.getTime() < objStartDate.getTime())
		{
			objStartDate.setTime(objLatestDate.getTime());
		}

		objMonthYear.setMonth(objStartDate.getMonth());
		objMonthYear.setFullYear(objStartDate.getFullYear());

		if (!objSelectedDate) objSelectedDate = new Date(objStartDate);
		objSelectedDate.setTime(objStartDate);

		return true;
	};

	this.setEarliestDate = function()
	{
		if (!arguments.length || (typeof(arguments[0]) != 'object') || !arguments[0].getTime) return false;

		objEarliestDate = new Date();
		objEarliestDate.setTime(arguments[0].getTime());
		objEarliestDate.setHours(12);
		objEarliestDate.setMinutes(0);
		objEarliestDate.setSeconds(0);
		objEarliestDate.setMilliseconds(0);

		if (objEarliestDate.getTime() > objStartDate.getTime())
		{
			objStartDate.setTime(objEarliestDate.getTime());
			objMonthYear.setMonth(objEarliestDate.getMonth());
			objMonthYear.setFullYear(objEarliestDate.getFullYear());
		}

		if (objSelectedDate && (objEarliestDate.getTime() > objSelectedDate.getTime()))
		{
			objSelectedDate.setTime(objEarliestDate.getTime());
			objMonthYear.setMonth(objEarliestDate.getMonth());
			objMonthYear.setFullYear(objEarliestDate.getFullYear());
		}

		return true;
	};

	this.setLatestDate = function()
	{
		if (!arguments.length || !(typeof(arguments[0]) == 'object') || !arguments[0].getTime) return false;

		objLatestDate = new Date();
		objLatestDate.setTime(arguments[0].getTime());
		objLatestDate.setHours(12);
		objLatestDate.setMinutes(0);
		objLatestDate.setSeconds(0);
		objLatestDate.setMilliseconds(0);

		if (objLatestDate.getTime() < objStartDate.getTime())
		{
			objStartDate.setTime(objLatestDate.getTime());
			objMonthYear.setMonth(objLatestDate.getMonth());
			objMonthYear.setFullYear(objLatestDate.getFullYear());
		}

		if (objSelectedDate && (objLatestDate.getTime() < objSelectedDate.getTime()))
		{
			objSelectedDate.setTime(objLatestDate.getTime());
			objMonthYear.setMonth(objLatestDate.getMonth());
			objMonthYear.setFullYear(objLatestDate.getFullYear());
		}

		return true;
	};

	this.setAllowedDays = function()
	{
		if (!arguments.length || !(typeof(arguments[0]) == 'object')) return false;

		var nCount;
		for (nCount = 0; nCount < 7; ++nCount)
		{
			objAllowedDays[nCount + ''] = false;
		}

		for (nCount = 0; arguments[0][nCount] !== undefined; ++nCount)
		{
			objAllowedDays[arguments[0][nCount] + ''] = true;
		}

		return true;
	};

	this.setWeekStartDay = function()
	{
		if (!arguments.length || !(typeof(arguments[0]) == 'number')) return false;

		var nNewStartDay = parseInt(arguments[0], 10);
		if ((nNewStartDay < 0) || (nNewStartDay > 6)) return false;

		nWeekStartDay = nNewStartDay;

		return true;
	};

	this.getSelectedDate = function()
	{
		return objSelectedDate;
	};

	this.setSelectedDate = function(objDate)
	{
		if (!objSelectedDate) objSelectedDate = new Date(objDate);

		objSelectedDate.setTime(objDate.getTime());
		objSelectedDate.setHours(12);
		objSelectedDate.setMinutes(0);
		objSelectedDate.setSeconds(0);
		objSelectedDate.setMilliseconds(0);

		UpdateFields();

		return true;
	};

	this.updateFields = function()
	{
		return UpdateFields();
	};

	var clickWindow = function(e)
	{
		e = e || events.fix(event);
		var ndTarget = e.target || e.srcElement;
		if (ndTarget.nodeName == '#text') ndTarget = ndTarget.parentNode;

		while (ndTarget && (ndTarget != document))
		{
			if (ndTarget.className == 'calendar') return true;
			ndTarget = ndTarget.parentNode;
		}

		for (var nCount = 0; nCount <= nDateChooserID; ++nCount)
		{
			if (ndFrame) ndFrame.style.display = 'none';
			document.getElementById('calendar' + nCount).style.visibility = 'hidden';
		}

		return true;
	};

	var mouseoverDateChooser = function()
	{
		if (objTimeout) clearTimeout(objTimeout);
		return true;
	};

	var mouseoutDateChooser = function()
	{
		if (nTimeout > 0) objTimeout = setTimeout('document.getElementById("' + sDateChooserID + '").style.visibility = "hidden"; if (document.getElementById("iframehack")) document.getElementById("iframehack").style.display = "none";', nTimeout);

		return true;
	};

	events.add(ndDateChooser, 'mouseover', mouseoverDateChooser);
	events.add(ndDateChooser, 'mouseout', mouseoutDateChooser);
	events.add(document, 'mousedown', clickWindow);

	return true;
}

if (!Array.prototype.push)
{
	Array.prototype.push = function()
	{
		for (var nCount = 0; arguments[nCount] !== undefined; nCount++)
		{
			this[this.length] = arguments[nCount];
		}

		return this.length;
	};
}

if (!xb)
{
	var xb =
	{
		createElement: function(sElement)
		{
			if (document.createElementNS) return document.createElementNS('http://www.w3.org/1999/xhtml', sElement);
			if (document.createElement) return document.createElement(sElement);

			return null;
		},

		getElementsByAttribute: function(ndNode, sAttributeName, sAttributeValue)
		{
			var aReturnElements = [];

			if (!ndNode.all && !ndNode.getElementsByTagName) return aReturnElements;

			var rAttributeValue = RegExp('(^|\\s)' + sAttributeValue + '(\\s|$)');
			var sValue, aElements = ndNode.all || ndNode.getElementsByTagName('*');

			for (var nIndex = 0; aElements[nIndex]; ++nIndex)
			{
				if (!aElements[nIndex].getAttribute) continue;
				sValue = (sAttributeName == 'class') ? aElements[nIndex].className : aElements[nIndex].getAttribute(sAttributeName);
				if ((typeof(sValue) != 'string') || (sValue.length == 0)) continue;

				if (rAttributeValue.test(sValue)) aReturnElements.push(aElements[nIndex]);
			}

			return aReturnElements;
		},

		getOption: function(ndNode, sOption)
		{
			var sText = ndNode.getAttribute(sOption);
			if (sText) return sText;

			var sDefault = (arguments.length == 3) ? arguments[2] : false;
			var aMatch = ndNode.className.match(RegExp('(?:^|\\s)' + sOption + '=(?:\\\'|\\\")([^\\\'\\\"]+)(?:\\\'|\\\"|$)'));

			return aMatch ? aMatch[1] : sDefault;
		}
	};
}

// This is a variation of the addEvent script written by Dean Edwards (dean.edwards.name).
if (!events)
{
	var events =
	{
		nEventID: 1,

		add: function(ndElement, sType, fnHandler)
		{
			if (!fnHandler.$$nEventID) fnHandler.$$nEventID = this.nEventID++;
			if (ndElement.objEvents === undefined) ndElement.objEvents = {};

			var aHandlers = ndElement.objEvents[sType];
			if (!aHandlers)
			{
				aHandlers = ndElement.objEvents[sType] = {};
				if (ndElement['on' + sType]) aHandlers[0] = ndElement['on' + sType];
			}

			aHandlers[fnHandler.$$nEventID] = fnHandler;
			ndElement['on' + sType] = this.handle;

			return true;
		},

		handle: function(e)
		{
			e = e || events.fix(event);

			var bReturn = true, aHandlers = this.objEvents[e.type];
			for (var nIndex in aHandlers)
			{
				this.$$handle = aHandlers[nIndex];
				if (this.$$handle(e) === false) bReturn = false;
			}

			return bReturn;
		},

		fix: function(e)
		{
			e.preventDefault = this.fix.preventDefault;
			e.stopPropagation = this.fix.stopPropagation;

			return e;
		}
	};

	events.fix.preventDefault = function()
	{
		this.returnValue = false;

		return true;
	}

	events.fix.stopPropagation = function()
	{
		this.cancelBubble = true;

		return true;
	}
}

events.add(window, 'load', function()
{
	var ndDateChooser, ndElement, sLastID, sLinkID, objUpdateField, objDate, aPatternNodes;
	var sDateFormat, sIcon, sText, sXOffset, sYOffset, sCloseTime, sOnUpdate, sStartDate, sEarliestDate, sLatestDate, sAllowedDays, sWeekStartDay, sLinkPosition;
	var nFieldID = 0;

	objDate = new Date();
	objDate.setHours(12);
	objDate.setMinutes(0);
	objDate.setMilliseconds(0);

	var aElements = xb.getElementsByAttribute(document, 'class', 'datechooser');
	for (var nIndex = 0; aElements[nIndex]; ++nIndex)
	{
		ndDateChooser = aElements[nIndex];
		if (!ndDateChooser.id) ndDateChooser.id = 'dc-id-' + (++nFieldID);
		sLastID = ndDateChooser.id;

		sDateFormat = xb.getOption(ndDateChooser, 'dc-dateformat');
		sIcon = xb.getOption(ndDateChooser, 'dc-iconlink');
		sText = xb.getOption(ndDateChooser, 'dc-textlink');
		sXOffset = xb.getOption(ndDateChooser, 'dc-offset-x');
		sYOffset = xb.getOption(ndDateChooser, 'dc-offset-y');
		sCloseTime = xb.getOption(ndDateChooser, 'dc-closetime');
		sOnUpdate = xb.getOption(ndDateChooser, 'dc-onupdate');
		sStartDate = xb.getOption(ndDateChooser, 'dc-startdate');
		sEarliestDate = xb.getOption(ndDateChooser, 'dc-earliestdate');
		sLatestDate = xb.getOption(ndDateChooser, 'dc-latestdate');
		sAllowedDays = xb.getOption(ndDateChooser, 'dc-alloweddays');
		sWeekStartDay = xb.getOption(ndDateChooser, 'dc-weekstartday');
		sLinkPosition = xb.getOption(ndDateChooser, 'dc-linkposition');

		if (sLinkPosition) sLinkID = ndDateChooser.id;

		objUpdateField = {};
		if (sDateFormat) objUpdateField[ndDateChooser.id] = sDateFormat;

		aPatternNodes = ndDateChooser.all || ndDateChooser.getElementsByTagName('*');
		for (var nPattern = 0; aPatternNodes[nPattern]; ++nPattern)
		{
			ndElement = aPatternNodes[nPattern];

			sDateFormat = xb.getOption(ndElement, 'dc-dateformat');
			if (!sDateFormat) continue;

			if (!ndElement.id) ndElement.id = 'dc-id-' + (++nFieldID);

			sLastID = ndElement.id;
			objUpdateField[sLastID] = sDateFormat;

			if (!sLinkPosition) xb.getOption(ndElement, 'dc-linkposition');
			if (sLinkPosition) sLinkID = sLastID;
		}

		if (!sLinkPosition)
		{
			sLinkID = sLastID;
			sLinkPosition = 'right';
		}

		ndDateChooser.DateChooser = new DateChooser();
		if (sXOffset) ndDateChooser.DateChooser.setXOffset(sXOffset);
		if (sYOffset) ndDateChooser.DateChooser.setYOffset(sYOffset);
		if (sCloseTime) ndDateChooser.DateChooser.setCloseTime(sCloseTime);
		if (sOnUpdate) ndDateChooser.DateChooser.setUpdateFunction(eval(sOnUpdate));

		if (sStartDate)
		{
			objDate = new Date();
			objDate.setDate(parseInt(sStartDate.substring(2, 4), 10));
			objDate.setMonth(parseInt(sStartDate.substring(0, 2), 10) - 1);
			objDate.setFullYear(parseInt(sStartDate.substring(4), 10));

			ndDateChooser.DateChooser.setStartDate(objDate);
		}

		if (sEarliestDate)
		{
			objDate = new Date();
			objDate.setDate(parseInt(sEarliestDate.substring(2, 4), 10));
			objDate.setMonth(parseInt(sEarliestDate.substring(0, 2), 10) - 1);
			objDate.setFullYear(parseInt(sEarliestDate.substring(4), 10));

			ndDateChooser.DateChooser.setEarliestDate(objDate);
		}

		if (sLatestDate)
		{
			objDate = new Date();
			objDate.setDate(parseInt(sLatestDate.substring(2, 4), 10));
			objDate.setMonth(parseInt(sLatestDate.substring(0, 2), 10) - 1);
			objDate.setFullYear(parseInt(sLatestDate.substring(4), 10));

			ndDateChooser.DateChooser.setLatestDate(objDate);
		}

		if (sAllowedDays) ndDateChooser.DateChooser.setAllowedDays(sAllowedDays.split(','));
		if (sWeekStartDay) ndDateChooser.DateChooser.setWeekStartDay(parseInt(sWeekStartDay, 10));
		if (sIcon) ndDateChooser.DateChooser.setIcon(sIcon, sLinkID, (sLinkPosition != 'left'));
		if (sText) ndDateChooser.DateChooser.setLink(sText, sLinkID, (sLinkPosition != 'left'));
		ndDateChooser.DateChooser.setUpdateField(objUpdateField);
	}

	delete objDate;

	return true;
});
//--------------------------------------------------
/**
 * Application : CF WCMS CORE
 * File        : _js/dynmap.js
 * @version    : 0.1
 * @author     : acn <acn@getunik.com>
 * @copyright  : copyright 30.08.2006 by http://www.getunik.com
 * 
 * Long desc:
 * Function is used for divers clickactions by the dynmap map flash. 
 *
 * Version-History:
 * 30.08.2006.getunik.acn : initial release
 */


/**
 * dynamic function which enables different behaviours,
 * triggered by the dynmap flash map
 *
 * @param  intiger  onSwfClickAction.arguments[0]      "behaviour id": enables to differ different behaviours of the same function
 * @param  any      onSwfClickAction.arguments[1-n]    parameter list depending on the submitted bahaviour id
 *
 * example:
 * onSwfClickAction.arguments[0] = 1 = URL   (implemented)
 *   -> onSwfClickAction.arguments[1] = target url for the actual browser instance, a.e.: 'http://www.google.com'
 * onSwfClickAction.arguments[0] = 2 = AJAX  (not yet implemented)
 * onSwfClickAction.arguments[0] = 3 = FLASH (not yet implemented)
 */
function onSwfClickAction()
{
	bProc             = false;
	// iOrigActionTypeId = iActionTypeId;
	iOrigActionTypeId = onSwfClickAction.arguments[0];
	iActionTypeId     = iOrigActionTypeId - 1;
	sActionType       = "";
	
	// available action types
	aActionTypes    = new Array();
	aActionTypes[0] = "URL";
	aActionTypes[1] = "AJAX";
	aActionTypes[2] = "FLASH";
	
	// check iActionTypeId
	if(iActionTypeId >= 0 && iOrigActionTypeId <= aActionTypes.length)
	{
		bProc = true;
	}
	else
	{
		bProc = false;
		alert('dynmap.js\nError within onSwfClickAction():\nUnknown action type id (' + iOrigActionTypeId + ' / type: ' + typeof(iOrigActionTypeId) + ') submitted!');
	}
	
	// check parameter list (at least 2 params needed)
	if(bProc)
	{
		if(onSwfClickAction.arguments.length >= 2)
		{
			bProc = true;
		}
		else
		{
			bProc = false;
			alert('dynmap.js\nError within onSwfClickAction():\nAt least two (2) parameters required!');
		}
	}
	
	// get action type from aActionTypes
	if(bProc)
	{
		sActionType = aActionTypes[iActionTypeId];
		if(sActionType != "")
		{
			bProc = true;
		}
		else
		{
			bProc = false;
			alert('dynmap.js\nError within onSwfClickAction():\nThe action type id ' + iOrigActionTypeId + 'is ok, but the corresponding value within aActionTypes is not defined!');
		}
	}
	
	// processing depending on the sActionType
	if(bProc)
	{
		
		// *** URL
		if(sActionType == "URL")
		{
			sUrl = onSwfClickAction.arguments[1];
			if(sUrl != undefined && sUrl != '' && typeof(sUrl) == 'string')
			{
				top.window.location.href = sUrl;
			}
			else
			{
				alert('dynmap.js\nError within onSwfClickAction():\nThe submitted parameter anyParam1 ' + sUrl + 'is not ok!');
			}
		} // eof URL
		
		
		// *** AJAX
		if(sActionType == "AJAX")
		{
			alert('dynmap.js\nonSwfClickAction():\nCorresponding processing for \'AJAX\' is not yet defined!');
		} // eof AJAX
		
		
		// *** FLASH
		if(sActionType == "FLASH")
		{
			alert('dynmap.js\nonSwfClickAction():\nCorresponding processing for \'FLASH\' is not yet defined!');			
		} // eof FLASH
		
		
	}
	
} // eof function onSwfClickAction()

//--------------------------------------------------

var ns4 = document.layers;
var ns6 = document.getElementById && !document.all;
var ie4 = document.all;
offsetX = -20;
offsetY = 20;
var FWtoolTipSTYLE="";

function FWinitToolTips()
{
  if(ns4||ns6||ie4)
  {
    if(ns4) FWtoolTipSTYLE = document.FWtoolTipLayer;
    else if(ns6) FWtoolTipSTYLE = document.getElementById("FWtoolTipLayer").style;
    else if(ie4) FWtoolTipSTYLE = document.all.FWtoolTipLayer.style;
    if(ns4) document.captureEvents(Event.MOUSEMOVE);
    else
    {
      FWtoolTipSTYLE.visibility = "visible";
      FWtoolTipSTYLE.display = "none";
    }
    document.onmousemove = FWmoveToMouseLoc;
  }
}

function FWtoolTip(msg, fg, bg)
{
  if(FWtoolTip.arguments.length < 1) // hide
  {
    if(ns4) FWtoolTipSTYLE.visibility = "hidden";
    else FWtoolTipSTYLE.display = "none";
  }
  else // show
  {

	var content = '<div class="fw-message-content" style="width: 200px">' + msg + '</div>'
	
    if(ns4)
    {
      FWtoolTipSTYLE.document.write(content);
      FWtoolTipSTYLE.document.close();
      FWtoolTipSTYLE.visibility = "visible";
    }
    if(ns6)
    {
      document.getElementById("FWtoolTipLayer").innerHTML = content;
      FWtoolTipSTYLE.display='block';
    }
    if(ie4)
    {
      document.all("FWtoolTipLayer").innerHTML = content;
      FWtoolTipSTYLE.display='block';
    }
  }
}

function FWmoveToMouseLoc(e)
{
  if(ns4||ns6)
  {
  	
    x = e.pageX;
    y = e.pageY;
	
  }
  else
  {
   // x = event.x + document.body.scrollLeft;
   // y = event.y + document.body.scrollTop;

  	if (document.documentElement.scrollTop)
	{
   		x = document.documentElement.scrollLeft;
   		y = document.documentElement.scrollTop;	
	}
	else
	{
   		x = document.body.scrollLeft;
   		y = document.body.scrollTop;
	}

	x = x + event.x;
   	y = y + event.y;
	
  }
  FWtoolTipSTYLE.left = x + offsetX + "px";
  FWtoolTipSTYLE.top = y + offsetY + "px";
  return true;
}

//--------------------------------------------------
function getObject(f_sObject)
{
	if (stBrowser.sType == "DOM")
	{
		return document.getElementById(f_sObject);
	}
	else
	{
		return eval("document.all." + f_sObject);
	}
}

function noCache()
{
	return "uNC=" + parseInt(Math.random()*10000000);

}

/* win_open(where,x,y)*/
function winOpen(f_sWhere)
{
	if (arguments.length > 1)
	{
		sWin = arguments[1];
	}
	else
	{
		sWin = 1;
	}
	
	if (arguments.length <= 2)
	{
		iX = 700;
		iY = 550;
	}
	else
	{
		iX = arguments[2];
		iY = arguments[3];
	}
	
	win = window.open(f_sWhere,"Object"+sWin,"resizable=yes,status=0,scrollbars=1,width="+iX+",height="+iY);
	win.focus();
}

function getCheckedValue(f_objRadio)
{

	for (i = 0; i < f_objRadio.length; i++) 
	{
		if (f_objRadio[i].checked == true) 
		{
			return f_objRadio[i].value
		}
	}	

	return -1;
}


function showLayer(f_sObject)
{

	obj = getObject(f_sObject);
	if (obj.style.visibility == "hidden")
	{
		obj.style.visibility = "visible";
	}
	else
	{
		obj.style.visibility = "hidden";
	}
}

function minusSize()
{
	for(i=0; i < 2; i++)
	{
		if(stBrowser.sBrowser == "IE")
		{
			oCSS = document.styleSheets[i].rules;
		}
		else
		{
			oCSS = document.styleSheets[i].cssRules;
		}
		
		for(j=0; j < oCSS.length; j++)
		{
			if (oCSS[j].style.fontSize != "")
			{
				oCSS[j].style.fontSize = parseInt(oCSS[j].style.fontSize) - 2;		
			}
		}
	}	
}

function plusSize()
{
	for(i=0; i < 2; i++)
	{
		if(stBrowser.sBrowser == "IE")
		{
			oCSS = document.styleSheets[i].rules;
		}
		else
		{
			oCSS = document.styleSheets[i].cssRules;
		}
		
		for(j=0; j < oCSS.length; j++)
		{
			if (oCSS[j].style.fontSize != "")
			{
				oCSS[j].style.fontSize = parseInt(oCSS[j].style.fontSize) + 2;		
			}
		}
	}
}
/*
function sendlink(iNewsID,iLangID)
{
	winOpen(rootWWW + "_global/sendlink.cfm?uNewsID="+ iNewsID + "&uLangID=" + iLangID,"sendlink",560,550);
}
*/
function sendLink(f_sTitle,f_sUrl,f_iLangID)
{
	winOpen(rootWWW + "_global/sendlink.cfm?uTitle="+f_sTitle+"&uUrl="+escape(f_sUrl) + "&uLangID=" + f_iLangID,"sendlink",360,500);
}

iTimer = null;
function setLangMenu()
{
	var iWidth = 0;
	var iOffset = 0;
	
	if (arguments.length > 1)
	{
		iOffset = arguments[1];
	}
	
	obj = getObject("lang-menu");
	
	if (stBrowser.sType == "DOM")
	{
		if (stBrowser.sBrowser == "IE" && sVersion >= 5)
		{
			iWidth = document.body.clientWidth;
		}
		else
		{
			iWidth = window.innerWidth;
		}
		
		if (iWidth < 680)
		{
			obj.style.left = 0;
		}
		else
		{
			if (stBrowser.sBrowser == "NS" && stBrowser.sVersion == "5")
			{
				obj.style.left = Math.round((iWidth - 670)/2)+170-10;
			}
			else
			{
				obj.style.left = Math.round((iWidth - 670)/2)+170;
				//alert(getObject("lang-menu2").style.top);
				//getObject("lang-menu2").style.top = 14;
				getObject("lang-menu2").style.top = iOffset + 14;
			}
				
		}
		
		
	}
	iTimer = setTimeout("setLangMenu("+iOffset+")",100);
}


//--------------------------------------------------
/**
 * Application : image library
 * File        : _js/imageLibrary.js
 * @version    : 0.1
 * @author     : acn <acn@getunik.com>
 * @copyright  : copyright 05.07.2006 by http://www.getunik.com
 * 
 * Long desc:
 * Object oriented javascript function library to build a image library.
 * Take notice of the example created by acn@getunik.com.
 * 
 * Version-History:
 * 05.07.2006.getunik.acn : initial release
 * 25.08.2006.getunik.mvr : - checks now if description and caption elements are defined in html page
 * 							- if an element called 'imageLibrary#iIdx#Tooltip' exists it will be filled with description and caption
 */
 

/**
* main function to initiate a new image library object
*   - open a own data storage container, containig all informations for the image library
*
* @param  string  sImageLibraryName  the name of the image library. used to differ different image libraries od the same page.
* @param  array   aImageLibraryData  the data of the image library. format is not checked, must correspond to the example!
*/
function imageLibrary(sImageLibraryName, aImageLibraryData)
{
	if(typeof(sImageLibraryName) == 'string' && typeof(aImageLibraryData) == 'object' && sImageLibraryName != '' && aImageLibraryData.length > 0)
	{
		// save object specific data within the scope of 'this' object
		this.sImageLibraryName   = sImageLibraryName;
		this.aImageLibraryData   = aImageLibraryData;
		this.iActPos             = 0;
		this.iImageLibraryLength = aImageLibraryData.length
		this.aPrevImgs           = new Array();
		// generate preview image objects
		for(i in this.aImageLibraryData)
		{
			if(!isNaN(i))
			{
				if(this.aImageLibraryData[i]['previmgsrc'])
				{
					this.aPrevImgs[i]     = new Image();
					this.aPrevImgs[i].src = this.aImageLibraryData[i]['previmgsrc'];
				}
			}
		}
	}
	else
	{
		alert('imageLibrary.js\nError within imageLibrary():\nSubmitted data are corrupt!');
	}
}


/**
* set the visibility of the navigation buttons
*
* @param  string  sElementName  the id name of the object
* @param  array   sVisibility   the type of the new visibility status [visible|hidden]
*/
imageLibrary.prototype.setNavVisibility = function(sElementName, sVisibility)
{
	if(typeof(sElementName) == 'string' &&  typeof(sVisibility) == 'string')
	{
		if(document.getElementById(sElementName))
		{
			switch(sVisibility)
			{
				case "visible":
					document.getElementById(sElementName).style.visibility = "visible";
					break;
				case "hidden":
					document.getElementById(sElementName).style.visibility = "hidden";
					break;
				default:
					alert('imageLibrary.js\nError within setNavVisibility():\nVisibility value is wrong: \'' + sVisibility + '\'!');
					break;
			}
		}
		else
		{
			alert('imageLibrary.js\nError within setNavVisibility():\nElement id doesn\'t exist: \'' + sElementName + '\'!');
		}
	}
	else
	{
		alert('imageLibrary.js\nError within setNavVisibility():\nSubmitted data are corrupt!');	
	}
}


/**
* function to load the first object; use this as 'onload' statement
* within your html body tag, a.e.:
* <body onload="oMyImageLibrary.loadFirstObject();">
*/
imageLibrary.prototype.loadFirstObject = function()
{
	// load first image
	sImgName = this.sImageLibraryName + 'Image';
	if(document.getElementById(sImgName))
	{
		document.getElementById(sImgName).src    = this.aPrevImgs[this.iActPos].src;
		document.getElementById(sImgName).width  = this.aImageLibraryData[this.iActPos]['width'];
		document.getElementById(sImgName).height = this.aImageLibraryData[this.iActPos]['height'];
	}

	// load first description
	sDescriptionName = this.sImageLibraryName + 'Description';
	if(document.getElementById(sDescriptionName) && this.aImageLibraryData[this.iActPos]['description'] != "")
	{
		document.getElementById(sDescriptionName).firstChild.data = this.aImageLibraryData[this.iActPos]['description'];
	}
	
	// load first caption
	sCaptionName = this.sImageLibraryName + 'Caption';
	if(document.getElementById(sCaptionName) && this.aImageLibraryData[this.iActPos]['caption'] != "")
	{
		document.getElementById(sCaptionName).firstChild.data = this.aImageLibraryData[this.iActPos]['caption'];
	}
	
	// load first tooltip
	sTooltipName = this.sImageLibraryName + 'Tooltip';
	if(document.getElementById(sTooltipName))
	{
		document.getElementById(sTooltipName).firstChild.data = this.aImageLibraryData[this.iActPos]['description'] + '<br>' + this.aImageLibraryData[this.iActPos]['caption'];
	}
	
	// load e-card link text
	sLinkName = this.sImageLibraryName + 'ECard';
	if(document.getElementById(sLinkName) && this.aImageLibraryData['config']['bEcard'])
	{
		document.getElementById(sLinkName).firstChild.data = this.aImageLibraryData['config']['sEcardLinkText'];
	}
	
	// if only one (1) image is defined for the image library,
	// hide informations and navigation buttons
	if(this.iImageLibraryLength <= 1)
	{
		// hide actual position
		sActPos = this.sImageLibraryName + 'ActPos';
		this.setNavVisibility(sActPos, 'hidden');
		// just to ensure; hide the previous button
		sPrevious = this.sImageLibraryName + 'Previous';
		this.setNavVisibility(sPrevious, 'hidden');
		// just to esure; hide the next button
		sNext = this.sImageLibraryName + 'Next';
		this.setNavVisibility(sNext, 'hidden');
	}
	else
	{
		// display actual position
		sActPos = this.sImageLibraryName + 'ActPos';
		this.setNavVisibility(sActPos, 'visible');	
		sImagePos = this.sImageLibraryName + 'ImagePos';
		if(document.getElementById(sImagePos))
		{
			document.getElementById(sImagePos).firstChild.data = this.getActPosition();
		}
		// just to ensure; hide the previous button
		sPrevious = this.sImageLibraryName + 'Previous';
		this.setNavVisibility(sPrevious, 'hidden');
		// just to ensure; hide the next button
		sNext = this.sImageLibraryName + 'Next';
		this.setNavVisibility(sNext, 'visible');
	}
}


/**
* function to return the image position, a.e. '4 | 9'
*/
imageLibrary.prototype.getActPosition = function()
{
	iActPos = (this.iActPos <= 0) ? 1 : this.iActPos + 1;
	iActPos = (this.iActPos >= this.iImageLibraryLength) ? this.iImageLibraryLength : this.iActPos + 1;
	sPositionInformation = String(iActPos) + this.aImageLibraryData['config']['sActPosDelimiter'] + this.iImageLibraryLength;
	return sPositionInformation;
}


/**
* function to load the full view image of the actual object
* important notice: it use the function 'openPopUp' which is defined a.e. within 'openPopUp.js'!
*/
imageLibrary.prototype.getFullviewObject = function()
{
	if(this.aImageLibraryData[this.iActPos]['origimgsrc'] != "")
	{
		openPopUp(this.aImageLibraryData[this.iActPos]['origimgsrc'], this.aImageLibraryData['config']['PopUpWidth'], this.aImageLibraryData['config']['PopUpHeight'], this.aImageLibraryData['config']['PopUpToolbar'], this.aImageLibraryData['config']['PopUpScrollbars'], this.aImageLibraryData['config']['PopUpResizable']);
	}
}


/**
* function to turn the image library to the next object
*/
imageLibrary.prototype.getNextObject = function()
{
	if(this.iActPos < this.iImageLibraryLength - 1)
	{
		// eval the next pos
		this.iActPos = this.iActPos + 1;
		// load image
		sImgName = this.sImageLibraryName + 'Image';
		document.getElementById(sImgName).src    = this.aPrevImgs[this.iActPos].src;
		document.getElementById(sImgName).width  = this.aImageLibraryData[this.iActPos]['width'];
		document.getElementById(sImgName).height = this.aImageLibraryData[this.iActPos]['height'];
		// load description
		sDescriptionName = this.sImageLibraryName + 'Description';
		if(document.getElementById(sDescriptionName))
		{
			document.getElementById(sDescriptionName).firstChild.data = this.removeHtml(this.aImageLibraryData[this.iActPos]['description']);
		}
		// load caption
		sCaptionName = this.sImageLibraryName + 'Caption';
		if(document.getElementById(sCaptionName))
		{
			document.getElementById(sCaptionName).firstChild.data = this.removeHtml(this.aImageLibraryData[this.iActPos]['caption']);
		}
		// load tooltip
		sTooltipName = this.sImageLibraryName + 'Tooltip';
		if(document.getElementById(sTooltipName))
		{
			document.getElementById(sTooltipName).firstChild.data = this.removeHtml(this.aImageLibraryData[this.iActPos]['description']) + '<br>' + this.removeHtml(this.aImageLibraryData[this.iActPos]['caption']);
		}
		// display actual position
		sImagePos = this.sImageLibraryName + 'ImagePos';
		document.getElementById(sImagePos).firstChild.data = this.getActPosition();
		// manage visibility
		sNext     = this.sImageLibraryName + 'Next';
		sPrevious = this.sImageLibraryName + 'Previous';
		if(this.iActPos + 1 == this.iImageLibraryLength)
		{
			this.setNavVisibility(sNext, 'hidden');
			this.setNavVisibility(sPrevious, 'visible');
		}
		else
		{
			this.setNavVisibility(sNext, 'visible');
			this.setNavVisibility(sPrevious, 'visible');
		}
	}
}


/**
* function to turn the image library to the previous object
*/
imageLibrary.prototype.getPreviousObject = function()
{
	if(this.iActPos <= this.iImageLibraryLength - 1)
	{
		// eval the next pos
		this.iActPos = this.iActPos - 1;
		if(this.iActPos < 0)
		{
			this.iActPos = 0;
		}
		// load image
		sImgName = this.sImageLibraryName + 'Image';
		document.getElementById(sImgName).src    = this.aPrevImgs[this.iActPos].src;
		document.getElementById(sImgName).width  = this.aImageLibraryData[this.iActPos]['width'];
		document.getElementById(sImgName).height = this.aImageLibraryData[this.iActPos]['height'];
		// load description
		sDescriptionName = this.sImageLibraryName + 'Description';
		if(document.getElementById(sDescriptionName))
		{
			document.getElementById(sDescriptionName).firstChild.data = this.removeHtml(this.aImageLibraryData[this.iActPos]['description']);
		}
		// load caption
		sCaptionName = this.sImageLibraryName + 'Caption';
		if(document.getElementById(sCaptionName))
		{
			document.getElementById(sCaptionName).firstChild.data = this.removeHtml(this.aImageLibraryData[this.iActPos]['caption']);
		}
		// load tooltip
		sTooltipName = this.sImageLibraryName + 'Tooltip';
		if(document.getElementById(sTooltipName))
		{
			document.getElementById(sTooltipName).firstChild.data = this.removeHtml(this.aImageLibraryData[this.iActPos]['description']) + '<br>' + this.removeHtml(this.aImageLibraryData[this.iActPos]['caption']);
		}
		// display actual position
		sImagePos = this.sImageLibraryName + 'ImagePos';
		document.getElementById(sImagePos).firstChild.data = this.getActPosition();
		// manage visibility
		sNext     = this.sImageLibraryName + 'Next';
		sPrevious = this.sImageLibraryName + 'Previous';
		if(this.iActPos <= 0)
		{
			this.setNavVisibility(sNext, 'visible');
			this.setNavVisibility(sPrevious, 'hidden');
		}
		else
		{
			this.setNavVisibility(sNext, 'visible');
			this.setNavVisibility(sPrevious, 'visible');
		}
	}
}



/**
 * function to call the ecard template with the corresponding image id (ximg.ximg_id)
 */
imageLibrary.prototype.getECard = function(iFormIdx)
{
	var sOrigUrl = top.location.href;
	var sFormAction = sOrigUrl;
	if(window.location.search != "")
	{
		sFormAction += "&";
	}
	else
	{
		sFormAction += "?";
	}
	sFormAction += "uECardId=" + this.aImageLibraryData['config']['iEcardId'];
	sFormAction += "&uMode=set";
	sFormAction += "&uImgId=" + this.aImageLibraryData[this.iActPos]['img_id'];
	sFormId = 'imageLibrary' + iFormIdx;
	document.getElementById(sFormId).fImageLibraryOrigUrl.value = sOrigUrl;
	document.getElementById(sFormId).action = sFormAction;
	document.getElementById(sFormId).submit();
}


/**
 * removes html tags from a string
 * attention: it removes also "<this>" but "< this >" not!
 */
imageLibrary.prototype.removeHtml = function(sString)
{
	sString = sString.replace(/<[a-z]+>/gi, "");
	sString = sString.replace(/\<\/[a-z]+>/gi, "");
	return sString;
}


//--------------------------------------------------
/*
 * jQuery 1.2.6 - New Wave Javascript
 *
 * Copyright (c) 2008 John Resig (jquery.com)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * $Date: 2008/12/15 13:26:54 $
 * $Rev: 5685 $
 */
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(H(){J w=1b.4M,3m$=1b.$;J D=1b.4M=1b.$=H(a,b){I 2B D.17.5j(a,b)};J u=/^[^<]*(<(.|\\s)+>)[^>]*$|^#(\\w+)$/,62=/^.[^:#\\[\\.]*$/,12;D.17=D.44={5j:H(d,b){d=d||S;G(d.16){7[0]=d;7.K=1;I 7}G(1j d=="23"){J c=u.2D(d);G(c&&(c[1]||!b)){G(c[1])d=D.4h([c[1]],b);N{J a=S.61(c[3]);G(a){G(a.2v!=c[3])I D().2q(d);I D(a)}d=[]}}N I D(b).2q(d)}N G(D.1D(d))I D(S)[D.17.27?"27":"43"](d);I 7.6Y(D.2d(d))},5w:"1.2.6",8G:H(){I 7.K},K:0,3p:H(a){I a==12?D.2d(7):7[a]},2I:H(b){J a=D(b);a.5n=7;I a},6Y:H(a){7.K=0;2p.44.1p.1w(7,a);I 7},P:H(a,b){I D.P(7,a,b)},5i:H(b){J a=-1;I D.2L(b&&b.5w?b[0]:b,7)},1K:H(c,a,b){J d=c;G(c.1q==56)G(a===12)I 7[0]&&D[b||"1K"](7[0],c);N{d={};d[c]=a}I 7.P(H(i){R(c 1n d)D.1K(b?7.V:7,c,D.1i(7,d[c],b,i,c))})},1g:H(b,a){G((b==\'2h\'||b==\'1Z\')&&3d(a)<0)a=12;I 7.1K(b,a,"2a")},1r:H(b){G(1j b!="49"&&b!=U)I 7.4E().3v((7[0]&&7[0].2z||S).5F(b));J a="";D.P(b||7,H(){D.P(7.3t,H(){G(7.16!=8)a+=7.16!=1?7.76:D.17.1r([7])})});I a},5z:H(b){G(7[0])D(b,7[0].2z).5y().39(7[0]).2l(H(){J a=7;1B(a.1x)a=a.1x;I a}).3v(7);I 7},8Y:H(a){I 7.P(H(){D(7).6Q().5z(a)})},8R:H(a){I 7.P(H(){D(7).5z(a)})},3v:H(){I 7.3W(19,M,Q,H(a){G(7.16==1)7.3U(a)})},6F:H(){I 7.3W(19,M,M,H(a){G(7.16==1)7.39(a,7.1x)})},6E:H(){I 7.3W(19,Q,Q,H(a){7.1d.39(a,7)})},5q:H(){I 7.3W(19,Q,M,H(a){7.1d.39(a,7.2H)})},3l:H(){I 7.5n||D([])},2q:H(b){J c=D.2l(7,H(a){I D.2q(b,a)});I 7.2I(/[^+>] [^+>]/.11(b)||b.1h("..")>-1?D.4r(c):c)},5y:H(e){J f=7.2l(H(){G(D.14.1f&&!D.4n(7)){J a=7.6o(M),5h=S.3h("1v");5h.3U(a);I D.4h([5h.4H])[0]}N I 7.6o(M)});J d=f.2q("*").5c().P(H(){G(7[E]!=12)7[E]=U});G(e===M)7.2q("*").5c().P(H(i){G(7.16==3)I;J c=D.L(7,"3w");R(J a 1n c)R(J b 1n c[a])D.W.1e(d[i],a,c[a][b],c[a][b].L)});I f},1E:H(b){I 7.2I(D.1D(b)&&D.3C(7,H(a,i){I b.1k(a,i)})||D.3g(b,7))},4Y:H(b){G(b.1q==56)G(62.11(b))I 7.2I(D.3g(b,7,M));N b=D.3g(b,7);J a=b.K&&b[b.K-1]!==12&&!b.16;I 7.1E(H(){I a?D.2L(7,b)<0:7!=b})},1e:H(a){I 7.2I(D.4r(D.2R(7.3p(),1j a==\'23\'?D(a):D.2d(a))))},3F:H(a){I!!a&&D.3g(a,7).K>0},7T:H(a){I 7.3F("."+a)},6e:H(b){G(b==12){G(7.K){J c=7[0];G(D.Y(c,"2A")){J e=c.64,63=[],15=c.15,2V=c.O=="2A-2V";G(e<0)I U;R(J i=2V?e:0,2f=2V?e+1:15.K;i<2f;i++){J d=15[i];G(d.2W){b=D.14.1f&&!d.at.2x.an?d.1r:d.2x;G(2V)I b;63.1p(b)}}I 63}N I(7[0].2x||"").1o(/\\r/g,"")}I 12}G(b.1q==4L)b+=\'\';I 7.P(H(){G(7.16!=1)I;G(b.1q==2p&&/5O|5L/.11(7.O))7.4J=(D.2L(7.2x,b)>=0||D.2L(7.34,b)>=0);N G(D.Y(7,"2A")){J a=D.2d(b);D("9R",7).P(H(){7.2W=(D.2L(7.2x,a)>=0||D.2L(7.1r,a)>=0)});G(!a.K)7.64=-1}N 7.2x=b})},2K:H(a){I a==12?(7[0]?7[0].4H:U):7.4E().3v(a)},7b:H(a){I 7.5q(a).21()},79:H(i){I 7.3s(i,i+1)},3s:H(){I 7.2I(2p.44.3s.1w(7,19))},2l:H(b){I 7.2I(D.2l(7,H(a,i){I b.1k(a,i,a)}))},5c:H(){I 7.1e(7.5n)},L:H(d,b){J a=d.1R(".");a[1]=a[1]?"."+a[1]:"";G(b===12){J c=7.5C("9z"+a[1]+"!",[a[0]]);G(c===12&&7.K)c=D.L(7[0],d);I c===12&&a[1]?7.L(a[0]):c}N I 7.1P("9u"+a[1]+"!",[a[0],b]).P(H(){D.L(7,d,b)})},3b:H(a){I 7.P(H(){D.3b(7,a)})},3W:H(g,f,h,d){J e=7.K>1,3x;I 7.P(H(){G(!3x){3x=D.4h(g,7.2z);G(h)3x.9o()}J b=7;G(f&&D.Y(7,"1T")&&D.Y(3x[0],"4F"))b=7.3H("22")[0]||7.3U(7.2z.3h("22"));J c=D([]);D.P(3x,H(){J a=e?D(7).5y(M)[0]:7;G(D.Y(a,"1m"))c=c.1e(a);N{G(a.16==1)c=c.1e(D("1m",a).21());d.1k(b,a)}});c.P(6T)})}};D.17.5j.44=D.17;H 6T(i,a){G(a.4d)D.3Y({1a:a.4d,31:Q,1O:"1m"});N D.5u(a.1r||a.6O||a.4H||"");G(a.1d)a.1d.37(a)}H 1z(){I+2B 8J}D.1l=D.17.1l=H(){J b=19[0]||{},i=1,K=19.K,4x=Q,15;G(b.1q==8I){4x=b;b=19[1]||{};i=2}G(1j b!="49"&&1j b!="H")b={};G(K==i){b=7;--i}R(;i<K;i++)G((15=19[i])!=U)R(J c 1n 15){J a=b[c],2w=15[c];G(b===2w)6M;G(4x&&2w&&1j 2w=="49"&&!2w.16)b[c]=D.1l(4x,a||(2w.K!=U?[]:{}),2w);N G(2w!==12)b[c]=2w}I b};J E="4M"+1z(),6K=0,5r={},6G=/z-?5i|8B-?8A|1y|6B|8v-?1Z/i,3P=S.3P||{};D.1l({8u:H(a){1b.$=3m$;G(a)1b.4M=w;I D},1D:H(a){I!!a&&1j a!="23"&&!a.Y&&a.1q!=2p&&/^[\\s[]?H/.11(a+"")},4n:H(a){I a.1C&&!a.1c||a.2j&&a.2z&&!a.2z.1c},5u:H(a){a=D.3k(a);G(a){J b=S.3H("6w")[0]||S.1C,1m=S.3h("1m");1m.O="1r/4t";G(D.14.1f)1m.1r=a;N 1m.3U(S.5F(a));b.39(1m,b.1x);b.37(1m)}},Y:H(b,a){I b.Y&&b.Y.2r()==a.2r()},1Y:{},L:H(c,d,b){c=c==1b?5r:c;J a=c[E];G(!a)a=c[E]=++6K;G(d&&!D.1Y[a])D.1Y[a]={};G(b!==12)D.1Y[a][d]=b;I d?D.1Y[a][d]:a},3b:H(c,b){c=c==1b?5r:c;J a=c[E];G(b){G(D.1Y[a]){2U D.1Y[a][b];b="";R(b 1n D.1Y[a])1X;G(!b)D.3b(c)}}N{1U{2U c[E]}1V(e){G(c.5l)c.5l(E)}2U D.1Y[a]}},P:H(d,a,c){J e,i=0,K=d.K;G(c){G(K==12){R(e 1n d)G(a.1w(d[e],c)===Q)1X}N R(;i<K;)G(a.1w(d[i++],c)===Q)1X}N{G(K==12){R(e 1n d)G(a.1k(d[e],e,d[e])===Q)1X}N R(J b=d[0];i<K&&a.1k(b,i,b)!==Q;b=d[++i]){}}I d},1i:H(b,a,c,i,d){G(D.1D(a))a=a.1k(b,i);I a&&a.1q==4L&&c=="2a"&&!6G.11(d)?a+"2X":a},1F:{1e:H(c,b){D.P((b||"").1R(/\\s+/),H(i,a){G(c.16==1&&!D.1F.3T(c.1F,a))c.1F+=(c.1F?" ":"")+a})},21:H(c,b){G(c.16==1)c.1F=b!=12?D.3C(c.1F.1R(/\\s+/),H(a){I!D.1F.3T(b,a)}).6s(" "):""},3T:H(b,a){I D.2L(a,(b.1F||b).6r().1R(/\\s+/))>-1}},6q:H(b,c,a){J e={};R(J d 1n c){e[d]=b.V[d];b.V[d]=c[d]}a.1k(b);R(J d 1n c)b.V[d]=e[d]},1g:H(d,e,c){G(e=="2h"||e=="1Z"){J b,3X={30:"5x",5g:"1G",18:"3I"},35=e=="2h"?["5e","6k"]:["5G","6i"];H 5b(){b=e=="2h"?d.8f:d.8c;J a=0,2C=0;D.P(35,H(){a+=3d(D.2a(d,"57"+7,M))||0;2C+=3d(D.2a(d,"2C"+7+"4b",M))||0});b-=29.83(a+2C)}G(D(d).3F(":4j"))5b();N D.6q(d,3X,5b);I 29.2f(0,b)}I D.2a(d,e,c)},2a:H(f,l,k){J e,V=f.V;H 3E(b){G(!D.14.2k)I Q;J a=3P.54(b,U);I!a||a.52("3E")==""}G(l=="1y"&&D.14.1f){e=D.1K(V,"1y");I e==""?"1":e}G(D.14.2G&&l=="18"){J d=V.50;V.50="0 7Y 7W";V.50=d}G(l.1I(/4i/i))l=y;G(!k&&V&&V[l])e=V[l];N G(3P.54){G(l.1I(/4i/i))l="4i";l=l.1o(/([A-Z])/g,"-$1").3y();J c=3P.54(f,U);G(c&&!3E(f))e=c.52(l);N{J g=[],2E=[],a=f,i=0;R(;a&&3E(a);a=a.1d)2E.6h(a);R(;i<2E.K;i++)G(3E(2E[i])){g[i]=2E[i].V.18;2E[i].V.18="3I"}e=l=="18"&&g[2E.K-1]!=U?"2F":(c&&c.52(l))||"";R(i=0;i<g.K;i++)G(g[i]!=U)2E[i].V.18=g[i]}G(l=="1y"&&e=="")e="1"}N G(f.4g){J h=l.1o(/\\-(\\w)/g,H(a,b){I b.2r()});e=f.4g[l]||f.4g[h];G(!/^\\d+(2X)?$/i.11(e)&&/^\\d/.11(e)){J j=V.1A,66=f.65.1A;f.65.1A=f.4g.1A;V.1A=e||0;e=V.aM+"2X";V.1A=j;f.65.1A=66}}I e},4h:H(l,h){J k=[];h=h||S;G(1j h.3h==\'12\')h=h.2z||h[0]&&h[0].2z||S;D.P(l,H(i,d){G(!d)I;G(d.1q==4L)d+=\'\';G(1j d=="23"){d=d.1o(/(<(\\w+)[^>]*?)\\/>/g,H(b,a,c){I c.1I(/^(aK|4f|7E|aG|4T|7A|aB|3n|az|ay|av)$/i)?b:a+"></"+c+">"});J f=D.3k(d).3y(),1v=h.3h("1v");J e=!f.1h("<au")&&[1,"<2A 7w=\'7w\'>","</2A>"]||!f.1h("<ar")&&[1,"<7v>","</7v>"]||f.1I(/^<(aq|22|am|ak|ai)/)&&[1,"<1T>","</1T>"]||!f.1h("<4F")&&[2,"<1T><22>","</22></1T>"]||(!f.1h("<af")||!f.1h("<ad"))&&[3,"<1T><22><4F>","</4F></22></1T>"]||!f.1h("<7E")&&[2,"<1T><22></22><7q>","</7q></1T>"]||D.14.1f&&[1,"1v<1v>","</1v>"]||[0,"",""];1v.4H=e[1]+d+e[2];1B(e[0]--)1v=1v.5T;G(D.14.1f){J g=!f.1h("<1T")&&f.1h("<22")<0?1v.1x&&1v.1x.3t:e[1]=="<1T>"&&f.1h("<22")<0?1v.3t:[];R(J j=g.K-1;j>=0;--j)G(D.Y(g[j],"22")&&!g[j].3t.K)g[j].1d.37(g[j]);G(/^\\s/.11(d))1v.39(h.5F(d.1I(/^\\s*/)[0]),1v.1x)}d=D.2d(1v.3t)}G(d.K===0&&(!D.Y(d,"3V")&&!D.Y(d,"2A")))I;G(d[0]==12||D.Y(d,"3V")||d.15)k.1p(d);N k=D.2R(k,d)});I k},1K:H(d,f,c){G(!d||d.16==3||d.16==8)I 12;J e=!D.4n(d),40=c!==12,1f=D.14.1f;f=e&&D.3X[f]||f;G(d.2j){J g=/5Q|4d|V/.11(f);G(f=="2W"&&D.14.2k)d.1d.64;G(f 1n d&&e&&!g){G(40){G(f=="O"&&D.Y(d,"4T")&&d.1d)7p"O a3 a1\'t 9V 9U";d[f]=c}G(D.Y(d,"3V")&&d.7i(f))I d.7i(f).76;I d[f]}G(1f&&e&&f=="V")I D.1K(d.V,"9T",c);G(40)d.9Q(f,""+c);J h=1f&&e&&g?d.4G(f,2):d.4G(f);I h===U?12:h}G(1f&&f=="1y"){G(40){d.6B=1;d.1E=(d.1E||"").1o(/7f\\([^)]*\\)/,"")+(3r(c)+\'\'=="9L"?"":"7f(1y="+c*7a+")")}I d.1E&&d.1E.1h("1y=")>=0?(3d(d.1E.1I(/1y=([^)]*)/)[1])/7a)+\'\':""}f=f.1o(/-([a-z])/9H,H(a,b){I b.2r()});G(40)d[f]=c;I d[f]},3k:H(a){I(a||"").1o(/^\\s+|\\s+$/g,"")},2d:H(b){J a=[];G(b!=U){J i=b.K;G(i==U||b.1R||b.4I||b.1k)a[0]=b;N 1B(i)a[--i]=b[i]}I a},2L:H(b,a){R(J i=0,K=a.K;i<K;i++)G(a[i]===b)I i;I-1},2R:H(a,b){J i=0,T,2S=a.K;G(D.14.1f){1B(T=b[i++])G(T.16!=8)a[2S++]=T}N 1B(T=b[i++])a[2S++]=T;I a},4r:H(a){J c=[],2o={};1U{R(J i=0,K=a.K;i<K;i++){J b=D.L(a[i]);G(!2o[b]){2o[b]=M;c.1p(a[i])}}}1V(e){c=a}I c},3C:H(c,a,d){J b=[];R(J i=0,K=c.K;i<K;i++)G(!d!=!a(c[i],i))b.1p(c[i]);I b},2l:H(d,a){J c=[];R(J i=0,K=d.K;i<K;i++){J b=a(d[i],i);G(b!=U)c[c.K]=b}I c.7d.1w([],c)}});J v=9B.9A.3y();D.14={5B:(v.1I(/.+(?:9y|9x|9w|9v)[\\/: ]([\\d.]+)/)||[])[1],2k:/75/.11(v),2G:/2G/.11(v),1f:/1f/.11(v)&&!/2G/.11(v),42:/42/.11(v)&&!/(9s|75)/.11(v)};J y=D.14.1f?"7o":"72";D.1l({71:!D.14.1f||S.70=="6Z",3X:{"R":"9n","9k":"1F","4i":y,72:y,7o:y,9h:"9f",9e:"9d",9b:"99"}});D.P({6W:H(a){I a.1d},97:H(a){I D.4S(a,"1d")},95:H(a){I D.3a(a,2,"2H")},91:H(a){I D.3a(a,2,"4l")},8Z:H(a){I D.4S(a,"2H")},8X:H(a){I D.4S(a,"4l")},8W:H(a){I D.5v(a.1d.1x,a)},8V:H(a){I D.5v(a.1x)},6Q:H(a){I D.Y(a,"8U")?a.8T||a.8S.S:D.2d(a.3t)}},H(c,d){D.17[c]=H(b){J a=D.2l(7,d);G(b&&1j b=="23")a=D.3g(b,a);I 7.2I(D.4r(a))}});D.P({6P:"3v",8Q:"6F",39:"6E",8P:"5q",8O:"7b"},H(c,b){D.17[c]=H(){J a=19;I 7.P(H(){R(J i=0,K=a.K;i<K;i++)D(a[i])[b](7)})}});D.P({8N:H(a){D.1K(7,a,"");G(7.16==1)7.5l(a)},8M:H(a){D.1F.1e(7,a)},8L:H(a){D.1F.21(7,a)},8K:H(a){D.1F[D.1F.3T(7,a)?"21":"1e"](7,a)},21:H(a){G(!a||D.1E(a,[7]).r.K){D("*",7).1e(7).P(H(){D.W.21(7);D.3b(7)});G(7.1d)7.1d.37(7)}},4E:H(){D(">*",7).21();1B(7.1x)7.37(7.1x)}},H(a,b){D.17[a]=H(){I 7.P(b,19)}});D.P(["6N","4b"],H(i,c){J b=c.3y();D.17[b]=H(a){I 7[0]==1b?D.14.2G&&S.1c["5t"+c]||D.14.2k&&1b["5s"+c]||S.70=="6Z"&&S.1C["5t"+c]||S.1c["5t"+c]:7[0]==S?29.2f(29.2f(S.1c["4y"+c],S.1C["4y"+c]),29.2f(S.1c["2i"+c],S.1C["2i"+c])):a==12?(7.K?D.1g(7[0],b):U):7.1g(b,a.1q==56?a:a+"2X")}});H 25(a,b){I a[0]&&3r(D.2a(a[0],b,M),10)||0}J C=D.14.2k&&3r(D.14.5B)<8H?"(?:[\\\\w*3m-]|\\\\\\\\.)":"(?:[\\\\w\\8F-\\8E*3m-]|\\\\\\\\.)",6L=2B 4v("^>\\\\s*("+C+"+)"),6J=2B 4v("^("+C+"+)(#)("+C+"+)"),6I=2B 4v("^([#.]?)("+C+"*)");D.1l({6H:{"":H(a,i,m){I m[2]=="*"||D.Y(a,m[2])},"#":H(a,i,m){I a.4G("2v")==m[2]},":":{8D:H(a,i,m){I i<m[3]-0},8C:H(a,i,m){I i>m[3]-0},3a:H(a,i,m){I m[3]-0==i},79:H(a,i,m){I m[3]-0==i},3o:H(a,i){I i==0},3S:H(a,i,m,r){I i==r.K-1},6D:H(a,i){I i%2==0},6C:H(a,i){I i%2},"3o-4u":H(a){I a.1d.3H("*")[0]==a},"3S-4u":H(a){I D.3a(a.1d.5T,1,"4l")==a},"8z-4u":H(a){I!D.3a(a.1d.5T,2,"4l")},6W:H(a){I a.1x},4E:H(a){I!a.1x},8y:H(a,i,m){I(a.6O||a.8x||D(a).1r()||"").1h(m[3])>=0},4j:H(a){I"1G"!=a.O&&D.1g(a,"18")!="2F"&&D.1g(a,"5g")!="1G"},1G:H(a){I"1G"==a.O||D.1g(a,"18")=="2F"||D.1g(a,"5g")=="1G"},8w:H(a){I!a.3R},3R:H(a){I a.3R},4J:H(a){I a.4J},2W:H(a){I a.2W||D.1K(a,"2W")},1r:H(a){I"1r"==a.O},5O:H(a){I"5O"==a.O},5L:H(a){I"5L"==a.O},5p:H(a){I"5p"==a.O},3Q:H(a){I"3Q"==a.O},5o:H(a){I"5o"==a.O},6A:H(a){I"6A"==a.O},6z:H(a){I"6z"==a.O},2s:H(a){I"2s"==a.O||D.Y(a,"2s")},4T:H(a){I/4T|2A|6y|2s/i.11(a.Y)},3T:H(a,i,m){I D.2q(m[3],a).K},8t:H(a){I/h\\d/i.11(a.Y)},8s:H(a){I D.3C(D.3O,H(b){I a==b.T}).K}}},6x:[/^(\\[) *@?([\\w-]+) *([!*$^~=]*) *(\'?"?)(.*?)\\4 *\\]/,/^(:)([\\w-]+)\\("?\'?(.*?(\\(.*?\\))?[^(]*?)"?\'?\\)/,2B 4v("^([:.#]*)("+C+"+)")],3g:H(a,c,b){J d,1t=[];1B(a&&a!=d){d=a;J f=D.1E(a,c,b);a=f.t.1o(/^\\s*,\\s*/,"");1t=b?c=f.r:D.2R(1t,f.r)}I 1t},2q:H(t,o){G(1j t!="23")I[t];G(o&&o.16!=1&&o.16!=9)I[];o=o||S;J d=[o],2o=[],3S,Y;1B(t&&3S!=t){J r=[];3S=t;t=D.3k(t);J l=Q,3j=6L,m=3j.2D(t);G(m){Y=m[1].2r();R(J i=0;d[i];i++)R(J c=d[i].1x;c;c=c.2H)G(c.16==1&&(Y=="*"||c.Y.2r()==Y))r.1p(c);d=r;t=t.1o(3j,"");G(t.1h(" ")==0)6M;l=M}N{3j=/^([>+~])\\s*(\\w*)/i;G((m=3j.2D(t))!=U){r=[];J k={};Y=m[2].2r();m=m[1];R(J j=0,3i=d.K;j<3i;j++){J n=m=="~"||m=="+"?d[j].2H:d[j].1x;R(;n;n=n.2H)G(n.16==1){J g=D.L(n);G(m=="~"&&k[g])1X;G(!Y||n.Y.2r()==Y){G(m=="~")k[g]=M;r.1p(n)}G(m=="+")1X}}d=r;t=D.3k(t.1o(3j,""));l=M}}G(t&&!l){G(!t.1h(",")){G(o==d[0])d.4s();2o=D.2R(2o,d);r=d=[o];t=" "+t.6v(1,t.K)}N{J h=6J;J m=h.2D(t);G(m){m=[0,m[2],m[3],m[1]]}N{h=6I;m=h.2D(t)}m[2]=m[2].1o(/\\\\/g,"");J f=d[d.K-1];G(m[1]=="#"&&f&&f.61&&!D.4n(f)){J p=f.61(m[2]);G((D.14.1f||D.14.2G)&&p&&1j p.2v=="23"&&p.2v!=m[2])p=D(\'[@2v="\'+m[2]+\'"]\',f)[0];d=r=p&&(!m[3]||D.Y(p,m[3]))?[p]:[]}N{R(J i=0;d[i];i++){J a=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];G(a=="*"&&d[i].Y.3y()=="49")a="3n";r=D.2R(r,d[i].3H(a))}G(m[1]==".")r=D.5m(r,m[2]);G(m[1]=="#"){J e=[];R(J i=0;r[i];i++)G(r[i].4G("2v")==m[2]){e=[r[i]];1X}r=e}d=r}t=t.1o(h,"")}}G(t){J b=D.1E(t,r);d=r=b.r;t=D.3k(b.t)}}G(t)d=[];G(d&&o==d[0])d.4s();2o=D.2R(2o,d);I 2o},5m:H(r,m,a){m=" "+m+" ";J c=[];R(J i=0;r[i];i++){J b=(" "+r[i].1F+" ").1h(m)>=0;G(!a&&b||a&&!b)c.1p(r[i])}I c},1E:H(t,r,h){J d;1B(t&&t!=d){d=t;J p=D.6x,m;R(J i=0;p[i];i++){m=p[i].2D(t);G(m){t=t.8r(m[0].K);m[2]=m[2].1o(/\\\\/g,"");1X}}G(!m)1X;G(m[1]==":"&&m[2]=="4Y")r=62.11(m[3])?D.1E(m[3],r,M).r:D(r).4Y(m[3]);N G(m[1]==".")r=D.5m(r,m[2],h);N G(m[1]=="["){J g=[],O=m[3];R(J i=0,3i=r.K;i<3i;i++){J a=r[i],z=a[D.3X[m[2]]||m[2]];G(z==U||/5Q|4d|2W/.11(m[2]))z=D.1K(a,m[2])||\'\';G((O==""&&!!z||O=="="&&z==m[5]||O=="!="&&z!=m[5]||O=="^="&&z&&!z.1h(m[5])||O=="$="&&z.6v(z.K-m[5].K)==m[5]||(O=="*="||O=="~=")&&z.1h(m[5])>=0)^h)g.1p(a)}r=g}N G(m[1]==":"&&m[2]=="3a-4u"){J e={},g=[],11=/(-?)(\\d*)n((?:\\+|-)?\\d*)/.2D(m[3]=="6D"&&"2n"||m[3]=="6C"&&"2n+1"||!/\\D/.11(m[3])&&"8q+"+m[3]||m[3]),3o=(11[1]+(11[2]||1))-0,d=11[3]-0;R(J i=0,3i=r.K;i<3i;i++){J j=r[i],1d=j.1d,2v=D.L(1d);G(!e[2v]){J c=1;R(J n=1d.1x;n;n=n.2H)G(n.16==1)n.4q=c++;e[2v]=M}J b=Q;G(3o==0){G(j.4q==d)b=M}N G((j.4q-d)%3o==0&&(j.4q-d)/3o>=0)b=M;G(b^h)g.1p(j)}r=g}N{J f=D.6H[m[1]];G(1j f=="49")f=f[m[2]];G(1j f=="23")f=6u("Q||H(a,i){I "+f+";}");r=D.3C(r,H(a,i){I f(a,i,m,r)},h)}}I{r:r,t:t}},4S:H(b,c){J a=[],1t=b[c];1B(1t&&1t!=S){G(1t.16==1)a.1p(1t);1t=1t[c]}I a},3a:H(a,e,c,b){e=e||1;J d=0;R(;a;a=a[c])G(a.16==1&&++d==e)1X;I a},5v:H(n,a){J r=[];R(;n;n=n.2H){G(n.16==1&&n!=a)r.1p(n)}I r}});D.W={1e:H(f,i,g,e){G(f.16==3||f.16==8)I;G(D.14.1f&&f.4I)f=1b;G(!g.24)g.24=7.24++;G(e!=12){J h=g;g=7.3M(h,H(){I h.1w(7,19)});g.L=e}J j=D.L(f,"3w")||D.L(f,"3w",{}),1H=D.L(f,"1H")||D.L(f,"1H",H(){G(1j D!="12"&&!D.W.5k)I D.W.1H.1w(19.3L.T,19)});1H.T=f;D.P(i.1R(/\\s+/),H(c,b){J a=b.1R(".");b=a[0];g.O=a[1];J d=j[b];G(!d){d=j[b]={};G(!D.W.2t[b]||D.W.2t[b].4p.1k(f)===Q){G(f.3K)f.3K(b,1H,Q);N G(f.6t)f.6t("4o"+b,1H)}}d[g.24]=g;D.W.26[b]=M});f=U},24:1,26:{},21:H(e,h,f){G(e.16==3||e.16==8)I;J i=D.L(e,"3w"),1L,5i;G(i){G(h==12||(1j h=="23"&&h.8p(0)=="."))R(J g 1n i)7.21(e,g+(h||""));N{G(h.O){f=h.2y;h=h.O}D.P(h.1R(/\\s+/),H(b,a){J c=a.1R(".");a=c[0];G(i[a]){G(f)2U i[a][f.24];N R(f 1n i[a])G(!c[1]||i[a][f].O==c[1])2U i[a][f];R(1L 1n i[a])1X;G(!1L){G(!D.W.2t[a]||D.W.2t[a].4A.1k(e)===Q){G(e.6p)e.6p(a,D.L(e,"1H"),Q);N G(e.6n)e.6n("4o"+a,D.L(e,"1H"))}1L=U;2U i[a]}}})}R(1L 1n i)1X;G(!1L){J d=D.L(e,"1H");G(d)d.T=U;D.3b(e,"3w");D.3b(e,"1H")}}},1P:H(h,c,f,g,i){c=D.2d(c);G(h.1h("!")>=0){h=h.3s(0,-1);J a=M}G(!f){G(7.26[h])D("*").1e([1b,S]).1P(h,c)}N{G(f.16==3||f.16==8)I 12;J b,1L,17=D.1D(f[h]||U),W=!c[0]||!c[0].32;G(W){c.6h({O:h,2J:f,32:H(){},3J:H(){},4C:1z()});c[0][E]=M}c[0].O=h;G(a)c[0].6m=M;J d=D.L(f,"1H");G(d)b=d.1w(f,c);G((!17||(D.Y(f,\'a\')&&h=="4V"))&&f["4o"+h]&&f["4o"+h].1w(f,c)===Q)b=Q;G(W)c.4s();G(i&&D.1D(i)){1L=i.1w(f,b==U?c:c.7d(b));G(1L!==12)b=1L}G(17&&g!==Q&&b!==Q&&!(D.Y(f,\'a\')&&h=="4V")){7.5k=M;1U{f[h]()}1V(e){}}7.5k=Q}I b},1H:H(b){J a,1L,38,5f,4m;b=19[0]=D.W.6l(b||1b.W);38=b.O.1R(".");b.O=38[0];38=38[1];5f=!38&&!b.6m;4m=(D.L(7,"3w")||{})[b.O];R(J j 1n 4m){J c=4m[j];G(5f||c.O==38){b.2y=c;b.L=c.L;1L=c.1w(7,19);G(a!==Q)a=1L;G(1L===Q){b.32();b.3J()}}}I a},6l:H(b){G(b[E]==M)I b;J d=b;b={8o:d};J c="8n 8m 8l 8k 2s 8j 47 5d 6j 5E 8i L 8h 8g 4K 2y 5a 59 8e 8b 58 6f 8a 88 4k 87 86 84 6d 2J 4C 6c O 82 81 35".1R(" ");R(J i=c.K;i;i--)b[c[i]]=d[c[i]];b[E]=M;b.32=H(){G(d.32)d.32();d.80=Q};b.3J=H(){G(d.3J)d.3J();d.7Z=M};b.4C=b.4C||1z();G(!b.2J)b.2J=b.6d||S;G(b.2J.16==3)b.2J=b.2J.1d;G(!b.4k&&b.4K)b.4k=b.4K==b.2J?b.6c:b.4K;G(b.58==U&&b.5d!=U){J a=S.1C,1c=S.1c;b.58=b.5d+(a&&a.2e||1c&&1c.2e||0)-(a.6b||0);b.6f=b.6j+(a&&a.2c||1c&&1c.2c||0)-(a.6a||0)}G(!b.35&&((b.47||b.47===0)?b.47:b.5a))b.35=b.47||b.5a;G(!b.59&&b.5E)b.59=b.5E;G(!b.35&&b.2s)b.35=(b.2s&1?1:(b.2s&2?3:(b.2s&4?2:0)));I b},3M:H(a,b){b.24=a.24=a.24||b.24||7.24++;I b},2t:{27:{4p:H(){55();I},4A:H(){I}},3D:{4p:H(){G(D.14.1f)I Q;D(7).2O("53",D.W.2t.3D.2y);I M},4A:H(){G(D.14.1f)I Q;D(7).4e("53",D.W.2t.3D.2y);I M},2y:H(a){G(F(a,7))I M;a.O="3D";I D.W.1H.1w(7,19)}},3N:{4p:H(){G(D.14.1f)I Q;D(7).2O("51",D.W.2t.3N.2y);I M},4A:H(){G(D.14.1f)I Q;D(7).4e("51",D.W.2t.3N.2y);I M},2y:H(a){G(F(a,7))I M;a.O="3N";I D.W.1H.1w(7,19)}}}};D.17.1l({2O:H(c,a,b){I c=="4X"?7.2V(c,a,b):7.P(H(){D.W.1e(7,c,b||a,b&&a)})},2V:H(d,b,c){J e=D.W.3M(c||b,H(a){D(7).4e(a,e);I(c||b).1w(7,19)});I 7.P(H(){D.W.1e(7,d,e,c&&b)})},4e:H(a,b){I 7.P(H(){D.W.21(7,a,b)})},1P:H(c,a,b){I 7.P(H(){D.W.1P(c,a,7,M,b)})},5C:H(c,a,b){I 7[0]&&D.W.1P(c,a,7[0],Q,b)},2m:H(b){J c=19,i=1;1B(i<c.K)D.W.3M(b,c[i++]);I 7.4V(D.W.3M(b,H(a){7.4Z=(7.4Z||0)%i;a.32();I c[7.4Z++].1w(7,19)||Q}))},7X:H(a,b){I 7.2O(\'3D\',a).2O(\'3N\',b)},27:H(a){55();G(D.2Q)a.1k(S,D);N D.3A.1p(H(){I a.1k(7,D)});I 7}});D.1l({2Q:Q,3A:[],27:H(){G(!D.2Q){D.2Q=M;G(D.3A){D.P(D.3A,H(){7.1k(S)});D.3A=U}D(S).5C("27")}}});J x=Q;H 55(){G(x)I;x=M;G(S.3K&&!D.14.2G)S.3K("69",D.27,Q);G(D.14.1f&&1b==1S)(H(){G(D.2Q)I;1U{S.1C.7V("1A")}1V(3e){3B(19.3L,0);I}D.27()})();G(D.14.2G)S.3K("69",H(){G(D.2Q)I;R(J i=0;i<S.4W.K;i++)G(S.4W[i].3R){3B(19.3L,0);I}D.27()},Q);G(D.14.2k){J a;(H(){G(D.2Q)I;G(S.3f!="68"&&S.3f!="1J"){3B(19.3L,0);I}G(a===12)a=D("V, 7A[7U=7S]").K;G(S.4W.K!=a){3B(19.3L,0);I}D.27()})()}D.W.1e(1b,"43",D.27)}D.P(("7R,7Q,43,85,4y,4X,4V,7P,"+"7O,7N,89,53,51,7M,2A,"+"5o,7L,7K,8d,3e").1R(","),H(i,b){D.17[b]=H(a){I a?7.2O(b,a):7.1P(b)}});J F=H(a,c){J b=a.4k;1B(b&&b!=c)1U{b=b.1d}1V(3e){b=c}I b==c};D(1b).2O("4X",H(){D("*").1e(S).4e()});D.17.1l({67:D.17.43,43:H(g,d,c){G(1j g!=\'23\')I 7.67(g);J e=g.1h(" ");G(e>=0){J i=g.3s(e,g.K);g=g.3s(0,e)}c=c||H(){};J f="2P";G(d)G(D.1D(d)){c=d;d=U}N{d=D.3n(d);f="6g"}J h=7;D.3Y({1a:g,O:f,1O:"2K",L:d,1J:H(a,b){G(b=="1W"||b=="7J")h.2K(i?D("<1v/>").3v(a.4U.1o(/<1m(.|\\s)*?\\/1m>/g,"")).2q(i):a.4U);h.P(c,[a.4U,b,a])}});I 7},aL:H(){I D.3n(7.7I())},7I:H(){I 7.2l(H(){I D.Y(7,"3V")?D.2d(7.aH):7}).1E(H(){I 7.34&&!7.3R&&(7.4J||/2A|6y/i.11(7.Y)||/1r|1G|3Q/i.11(7.O))}).2l(H(i,c){J b=D(7).6e();I b==U?U:b.1q==2p?D.2l(b,H(a,i){I{34:c.34,2x:a}}):{34:c.34,2x:b}}).3p()}});D.P("7H,7G,7F,7D,7C,7B".1R(","),H(i,o){D.17[o]=H(f){I 7.2O(o,f)}});J B=1z();D.1l({3p:H(d,b,a,c){G(D.1D(b)){a=b;b=U}I D.3Y({O:"2P",1a:d,L:b,1W:a,1O:c})},aE:H(b,a){I D.3p(b,U,a,"1m")},aD:H(c,b,a){I D.3p(c,b,a,"3z")},aC:H(d,b,a,c){G(D.1D(b)){a=b;b={}}I D.3Y({O:"6g",1a:d,L:b,1W:a,1O:c})},aA:H(a){D.1l(D.60,a)},60:{1a:5Z.5Q,26:M,O:"2P",2T:0,7z:"4R/x-ax-3V-aw",7x:M,31:M,L:U,5Y:U,3Q:U,4Q:{2N:"4R/2N, 1r/2N",2K:"1r/2K",1m:"1r/4t, 4R/4t",3z:"4R/3z, 1r/4t",1r:"1r/as",4w:"*/*"}},4z:{},3Y:H(s){s=D.1l(M,s,D.1l(M,{},D.60,s));J g,2Z=/=\\?(&|$)/g,1u,L,O=s.O.2r();G(s.L&&s.7x&&1j s.L!="23")s.L=D.3n(s.L);G(s.1O=="4P"){G(O=="2P"){G(!s.1a.1I(2Z))s.1a+=(s.1a.1I(/\\?/)?"&":"?")+(s.4P||"7u")+"=?"}N G(!s.L||!s.L.1I(2Z))s.L=(s.L?s.L+"&":"")+(s.4P||"7u")+"=?";s.1O="3z"}G(s.1O=="3z"&&(s.L&&s.L.1I(2Z)||s.1a.1I(2Z))){g="4P"+B++;G(s.L)s.L=(s.L+"").1o(2Z,"="+g+"$1");s.1a=s.1a.1o(2Z,"="+g+"$1");s.1O="1m";1b[g]=H(a){L=a;1W();1J();1b[g]=12;1U{2U 1b[g]}1V(e){}G(i)i.37(h)}}G(s.1O=="1m"&&s.1Y==U)s.1Y=Q;G(s.1Y===Q&&O=="2P"){J j=1z();J k=s.1a.1o(/(\\?|&)3m=.*?(&|$)/,"$ap="+j+"$2");s.1a=k+((k==s.1a)?(s.1a.1I(/\\?/)?"&":"?")+"3m="+j:"")}G(s.L&&O=="2P"){s.1a+=(s.1a.1I(/\\?/)?"&":"?")+s.L;s.L=U}G(s.26&&!D.4O++)D.W.1P("7H");J n=/^(?:\\w+:)?\\/\\/([^\\/?#]+)/;G(s.1O=="1m"&&O=="2P"&&n.11(s.1a)&&n.2D(s.1a)[1]!=5Z.al){J i=S.3H("6w")[0];J h=S.3h("1m");h.4d=s.1a;G(s.7t)h.aj=s.7t;G(!g){J l=Q;h.ah=h.ag=H(){G(!l&&(!7.3f||7.3f=="68"||7.3f=="1J")){l=M;1W();1J();i.37(h)}}}i.3U(h);I 12}J m=Q;J c=1b.7s?2B 7s("ae.ac"):2B 7r();G(s.5Y)c.6R(O,s.1a,s.31,s.5Y,s.3Q);N c.6R(O,s.1a,s.31);1U{G(s.L)c.4B("ab-aa",s.7z);G(s.5S)c.4B("a9-5R-a8",D.4z[s.1a]||"a7, a6 a5 a4 5N:5N:5N a2");c.4B("X-9Z-9Y","7r");c.4B("9W",s.1O&&s.4Q[s.1O]?s.4Q[s.1O]+", */*":s.4Q.4w)}1V(e){}G(s.7m&&s.7m(c,s)===Q){s.26&&D.4O--;c.7l();I Q}G(s.26)D.W.1P("7B",[c,s]);J d=H(a){G(!m&&c&&(c.3f==4||a=="2T")){m=M;G(f){7k(f);f=U}1u=a=="2T"&&"2T"||!D.7j(c)&&"3e"||s.5S&&D.7h(c,s.1a)&&"7J"||"1W";G(1u=="1W"){1U{L=D.6X(c,s.1O,s.9S)}1V(e){1u="5J"}}G(1u=="1W"){J b;1U{b=c.5I("7g-5R")}1V(e){}G(s.5S&&b)D.4z[s.1a]=b;G(!g)1W()}N D.5H(s,c,1u);1J();G(s.31)c=U}};G(s.31){J f=4I(d,13);G(s.2T>0)3B(H(){G(c){c.7l();G(!m)d("2T")}},s.2T)}1U{c.9P(s.L)}1V(e){D.5H(s,c,U,e)}G(!s.31)d();H 1W(){G(s.1W)s.1W(L,1u);G(s.26)D.W.1P("7C",[c,s])}H 1J(){G(s.1J)s.1J(c,1u);G(s.26)D.W.1P("7F",[c,s]);G(s.26&&!--D.4O)D.W.1P("7G")}I c},5H:H(s,a,b,e){G(s.3e)s.3e(a,b,e);G(s.26)D.W.1P("7D",[a,s,e])},4O:0,7j:H(a){1U{I!a.1u&&5Z.9O=="5p:"||(a.1u>=7e&&a.1u<9N)||a.1u==7c||a.1u==9K||D.14.2k&&a.1u==12}1V(e){}I Q},7h:H(a,c){1U{J b=a.5I("7g-5R");I a.1u==7c||b==D.4z[c]||D.14.2k&&a.1u==12}1V(e){}I Q},6X:H(a,c,b){J d=a.5I("9J-O"),2N=c=="2N"||!c&&d&&d.1h("2N")>=0,L=2N?a.9I:a.4U;G(2N&&L.1C.2j=="5J")7p"5J";G(b)L=b(L,c);G(c=="1m")D.5u(L);G(c=="3z")L=6u("("+L+")");I L},3n:H(a){J s=[];G(a.1q==2p||a.5w)D.P(a,H(){s.1p(3u(7.34)+"="+3u(7.2x))});N R(J j 1n a)G(a[j]&&a[j].1q==2p)D.P(a[j],H(){s.1p(3u(j)+"="+3u(7))});N s.1p(3u(j)+"="+3u(D.1D(a[j])?a[j]():a[j]));I s.6s("&").1o(/%20/g,"+")}});D.17.1l({1N:H(c,b){I c?7.2g({1Z:"1N",2h:"1N",1y:"1N"},c,b):7.1E(":1G").P(H(){7.V.18=7.5D||"";G(D.1g(7,"18")=="2F"){J a=D("<"+7.2j+" />").6P("1c");7.V.18=a.1g("18");G(7.V.18=="2F")7.V.18="3I";a.21()}}).3l()},1M:H(b,a){I b?7.2g({1Z:"1M",2h:"1M",1y:"1M"},b,a):7.1E(":4j").P(H(){7.5D=7.5D||D.1g(7,"18");7.V.18="2F"}).3l()},78:D.17.2m,2m:H(a,b){I D.1D(a)&&D.1D(b)?7.78.1w(7,19):a?7.2g({1Z:"2m",2h:"2m",1y:"2m"},a,b):7.P(H(){D(7)[D(7).3F(":1G")?"1N":"1M"]()})},9G:H(b,a){I 7.2g({1Z:"1N"},b,a)},9F:H(b,a){I 7.2g({1Z:"1M"},b,a)},9E:H(b,a){I 7.2g({1Z:"2m"},b,a)},9D:H(b,a){I 7.2g({1y:"1N"},b,a)},9M:H(b,a){I 7.2g({1y:"1M"},b,a)},9C:H(c,a,b){I 7.2g({1y:a},c,b)},2g:H(k,j,i,g){J h=D.77(j,i,g);I 7[h.36===Q?"P":"36"](H(){G(7.16!=1)I Q;J f=D.1l({},h),p,1G=D(7).3F(":1G"),46=7;R(p 1n k){G(k[p]=="1M"&&1G||k[p]=="1N"&&!1G)I f.1J.1k(7);G(p=="1Z"||p=="2h"){f.18=D.1g(7,"18");f.33=7.V.33}}G(f.33!=U)7.V.33="1G";f.45=D.1l({},k);D.P(k,H(c,a){J e=2B D.28(46,f,c);G(/2m|1N|1M/.11(a))e[a=="2m"?1G?"1N":"1M":a](k);N{J b=a.6r().1I(/^([+-]=)?([\\d+-.]+)(.*)$/),2b=e.1t(M)||0;G(b){J d=3d(b[2]),2M=b[3]||"2X";G(2M!="2X"){46.V[c]=(d||1)+2M;2b=((d||1)/e.1t(M))*2b;46.V[c]=2b+2M}G(b[1])d=((b[1]=="-="?-1:1)*d)+2b;e.3G(2b,d,2M)}N e.3G(2b,a,"")}});I M})},36:H(a,b){G(D.1D(a)||(a&&a.1q==2p)){b=a;a="28"}G(!a||(1j a=="23"&&!b))I A(7[0],a);I 7.P(H(){G(b.1q==2p)A(7,a,b);N{A(7,a).1p(b);G(A(7,a).K==1)b.1k(7)}})},9X:H(b,c){J a=D.3O;G(b)7.36([]);7.P(H(){R(J i=a.K-1;i>=0;i--)G(a[i].T==7){G(c)a[i](M);a.7n(i,1)}});G(!c)7.5A();I 7}});J A=H(b,c,a){G(b){c=c||"28";J q=D.L(b,c+"36");G(!q||a)q=D.L(b,c+"36",D.2d(a))}I q};D.17.5A=H(a){a=a||"28";I 7.P(H(){J q=A(7,a);q.4s();G(q.K)q[0].1k(7)})};D.1l({77:H(b,a,c){J d=b&&b.1q==a0?b:{1J:c||!c&&a||D.1D(b)&&b,2u:b,41:c&&a||a&&a.1q!=9t&&a};d.2u=(d.2u&&d.2u.1q==4L?d.2u:D.28.5K[d.2u])||D.28.5K.74;d.5M=d.1J;d.1J=H(){G(d.36!==Q)D(7).5A();G(D.1D(d.5M))d.5M.1k(7)};I d},41:{73:H(p,n,b,a){I b+a*p},5P:H(p,n,b,a){I((-29.9r(p*29.9q)/2)+0.5)*a+b}},3O:[],48:U,28:H(b,c,a){7.15=c;7.T=b;7.1i=a;G(!c.3Z)c.3Z={}}});D.28.44={4D:H(){G(7.15.2Y)7.15.2Y.1k(7.T,7.1z,7);(D.28.2Y[7.1i]||D.28.2Y.4w)(7);G(7.1i=="1Z"||7.1i=="2h")7.T.V.18="3I"},1t:H(a){G(7.T[7.1i]!=U&&7.T.V[7.1i]==U)I 7.T[7.1i];J r=3d(D.1g(7.T,7.1i,a));I r&&r>-9p?r:3d(D.2a(7.T,7.1i))||0},3G:H(c,b,d){7.5V=1z();7.2b=c;7.3l=b;7.2M=d||7.2M||"2X";7.1z=7.2b;7.2S=7.4N=0;7.4D();J e=7;H t(a){I e.2Y(a)}t.T=7.T;D.3O.1p(t);G(D.48==U){D.48=4I(H(){J a=D.3O;R(J i=0;i<a.K;i++)G(!a[i]())a.7n(i--,1);G(!a.K){7k(D.48);D.48=U}},13)}},1N:H(){7.15.3Z[7.1i]=D.1K(7.T.V,7.1i);7.15.1N=M;7.3G(0,7.1t());G(7.1i=="2h"||7.1i=="1Z")7.T.V[7.1i]="9m";D(7.T).1N()},1M:H(){7.15.3Z[7.1i]=D.1K(7.T.V,7.1i);7.15.1M=M;7.3G(7.1t(),0)},2Y:H(a){J t=1z();G(a||t>7.15.2u+7.5V){7.1z=7.3l;7.2S=7.4N=1;7.4D();7.15.45[7.1i]=M;J b=M;R(J i 1n 7.15.45)G(7.15.45[i]!==M)b=Q;G(b){G(7.15.18!=U){7.T.V.33=7.15.33;7.T.V.18=7.15.18;G(D.1g(7.T,"18")=="2F")7.T.V.18="3I"}G(7.15.1M)7.T.V.18="2F";G(7.15.1M||7.15.1N)R(J p 1n 7.15.45)D.1K(7.T.V,p,7.15.3Z[p])}G(b)7.15.1J.1k(7.T);I Q}N{J n=t-7.5V;7.4N=n/7.15.2u;7.2S=D.41[7.15.41||(D.41.5P?"5P":"73")](7.4N,n,0,1,7.15.2u);7.1z=7.2b+((7.3l-7.2b)*7.2S);7.4D()}I M}};D.1l(D.28,{5K:{9l:9j,9i:7e,74:9g},2Y:{2e:H(a){a.T.2e=a.1z},2c:H(a){a.T.2c=a.1z},1y:H(a){D.1K(a.T.V,"1y",a.1z)},4w:H(a){a.T.V[a.1i]=a.1z+a.2M}}});D.17.2i=H(){J b=0,1S=0,T=7[0],3q;G(T)ao(D.14){J d=T.1d,4a=T,1s=T.1s,1Q=T.2z,5U=2k&&3r(5B)<9c&&!/9a/i.11(v),1g=D.2a,3c=1g(T,"30")=="3c";G(T.7y){J c=T.7y();1e(c.1A+29.2f(1Q.1C.2e,1Q.1c.2e),c.1S+29.2f(1Q.1C.2c,1Q.1c.2c));1e(-1Q.1C.6b,-1Q.1C.6a)}N{1e(T.5X,T.5W);1B(1s){1e(1s.5X,1s.5W);G(42&&!/^t(98|d|h)$/i.11(1s.2j)||2k&&!5U)2C(1s);G(!3c&&1g(1s,"30")=="3c")3c=M;4a=/^1c$/i.11(1s.2j)?4a:1s;1s=1s.1s}1B(d&&d.2j&&!/^1c|2K$/i.11(d.2j)){G(!/^96|1T.*$/i.11(1g(d,"18")))1e(-d.2e,-d.2c);G(42&&1g(d,"33")!="4j")2C(d);d=d.1d}G((5U&&(3c||1g(4a,"30")=="5x"))||(42&&1g(4a,"30")!="5x"))1e(-1Q.1c.5X,-1Q.1c.5W);G(3c)1e(29.2f(1Q.1C.2e,1Q.1c.2e),29.2f(1Q.1C.2c,1Q.1c.2c))}3q={1S:1S,1A:b}}H 2C(a){1e(D.2a(a,"6V",M),D.2a(a,"6U",M))}H 1e(l,t){b+=3r(l,10)||0;1S+=3r(t,10)||0}I 3q};D.17.1l({30:H(){J a=0,1S=0,3q;G(7[0]){J b=7.1s(),2i=7.2i(),4c=/^1c|2K$/i.11(b[0].2j)?{1S:0,1A:0}:b.2i();2i.1S-=25(7,\'94\');2i.1A-=25(7,\'aF\');4c.1S+=25(b,\'6U\');4c.1A+=25(b,\'6V\');3q={1S:2i.1S-4c.1S,1A:2i.1A-4c.1A}}I 3q},1s:H(){J a=7[0].1s;1B(a&&(!/^1c|2K$/i.11(a.2j)&&D.1g(a,\'30\')==\'93\'))a=a.1s;I D(a)}});D.P([\'5e\',\'5G\'],H(i,b){J c=\'4y\'+b;D.17[c]=H(a){G(!7[0])I;I a!=12?7.P(H(){7==1b||7==S?1b.92(!i?a:D(1b).2e(),i?a:D(1b).2c()):7[c]=a}):7[0]==1b||7[0]==S?46[i?\'aI\':\'aJ\']||D.71&&S.1C[c]||S.1c[c]:7[0][c]}});D.P(["6N","4b"],H(i,b){J c=i?"5e":"5G",4f=i?"6k":"6i";D.17["5s"+b]=H(){I 7[b.3y()]()+25(7,"57"+c)+25(7,"57"+4f)};D.17["90"+b]=H(a){I 7["5s"+b]()+25(7,"2C"+c+"4b")+25(7,"2C"+4f+"4b")+(a?25(7,"6S"+c)+25(7,"6S"+4f):0)}})})();',62,669,'|||||||this|||||||||||||||||||||||||||||||||||if|function|return|var|length|data|true|else|type|each|false|for|document|elem|null|style|event||nodeName|||test|undefined||browser|options|nodeType|fn|display|arguments|url|window|body|parentNode|add|msie|css|indexOf|prop|typeof|call|extend|script|in|replace|push|constructor|text|offsetParent|cur|status|div|apply|firstChild|opacity|now|left|while|documentElement|isFunction|filter|className|hidden|handle|match|complete|attr|ret|hide|show|dataType|trigger|doc|split|top|table|try|catch|success|break|cache|height||remove|tbody|string|guid|num|global|ready|fx|Math|curCSS|start|scrollTop|makeArray|scrollLeft|max|animate|width|offset|tagName|safari|map|toggle||done|Array|find|toUpperCase|button|special|duration|id|copy|value|handler|ownerDocument|select|new|border|exec|stack|none|opera|nextSibling|pushStack|target|html|inArray|unit|xml|bind|GET|isReady|merge|pos|timeout|delete|one|selected|px|step|jsre|position|async|preventDefault|overflow|name|which|queue|removeChild|namespace|insertBefore|nth|removeData|fixed|parseFloat|error|readyState|multiFilter|createElement|rl|re|trim|end|_|param|first|get|results|parseInt|slice|childNodes|encodeURIComponent|append|events|elems|toLowerCase|json|readyList|setTimeout|grep|mouseenter|color|is|custom|getElementsByTagName|block|stopPropagation|addEventListener|callee|proxy|mouseleave|timers|defaultView|password|disabled|last|has|appendChild|form|domManip|props|ajax|orig|set|easing|mozilla|load|prototype|curAnim|self|charCode|timerId|object|offsetChild|Width|parentOffset|src|unbind|br|currentStyle|clean|float|visible|relatedTarget|previousSibling|handlers|isXMLDoc|on|setup|nodeIndex|unique|shift|javascript|child|RegExp|_default|deep|scroll|lastModified|teardown|setRequestHeader|timeStamp|update|empty|tr|getAttribute|innerHTML|setInterval|checked|fromElement|Number|jQuery|state|active|jsonp|accepts|application|dir|input|responseText|click|styleSheets|unload|not|lastToggle|outline|mouseout|getPropertyValue|mouseover|getComputedStyle|bindReady|String|padding|pageX|metaKey|keyCode|getWH|andSelf|clientX|Left|all|visibility|container|index|init|triggered|removeAttribute|classFilter|prevObject|submit|file|after|windowData|inner|client|globalEval|sibling|jquery|absolute|clone|wrapAll|dequeue|version|triggerHandler|oldblock|ctrlKey|createTextNode|Top|handleError|getResponseHeader|parsererror|speeds|checkbox|old|00|radio|swing|href|Modified|ifModified|lastChild|safari2|startTime|offsetTop|offsetLeft|username|location|ajaxSettings|getElementById|isSimple|values|selectedIndex|runtimeStyle|rsLeft|_load|loaded|DOMContentLoaded|clientTop|clientLeft|toElement|srcElement|val|pageY|POST|unshift|Bottom|clientY|Right|fix|exclusive|detachEvent|cloneNode|removeEventListener|swap|toString|join|attachEvent|eval|substr|head|parse|textarea|reset|image|zoom|odd|even|before|prepend|exclude|expr|quickClass|quickID|uuid|quickChild|continue|Height|textContent|appendTo|contents|open|margin|evalScript|borderTopWidth|borderLeftWidth|parent|httpData|setArray|CSS1Compat|compatMode|boxModel|cssFloat|linear|def|webkit|nodeValue|speed|_toggle|eq|100|replaceWith|304|concat|200|alpha|Last|httpNotModified|getAttributeNode|httpSuccess|clearInterval|abort|beforeSend|splice|styleFloat|throw|colgroup|XMLHttpRequest|ActiveXObject|scriptCharset|callback|fieldset|multiple|processData|getBoundingClientRect|contentType|link|ajaxSend|ajaxSuccess|ajaxError|col|ajaxComplete|ajaxStop|ajaxStart|serializeArray|notmodified|keypress|keydown|change|mouseup|mousedown|dblclick|focus|blur|stylesheet|hasClass|rel|doScroll|black|hover|solid|cancelBubble|returnValue|wheelDelta|view|round|shiftKey|resize|screenY|screenX|relatedNode|mousemove|prevValue|originalTarget|offsetHeight|keyup|newValue|offsetWidth|eventPhase|detail|currentTarget|cancelable|bubbles|attrName|attrChange|altKey|originalEvent|charAt|0n|substring|animated|header|noConflict|line|enabled|innerText|contains|only|weight|font|gt|lt|uFFFF|u0128|size|417|Boolean|Date|toggleClass|removeClass|addClass|removeAttr|replaceAll|insertAfter|prependTo|wrap|contentWindow|contentDocument|iframe|children|siblings|prevAll|wrapInner|nextAll|outer|prev|scrollTo|static|marginTop|next|inline|parents|able|cellSpacing|adobeair|cellspacing|522|maxLength|maxlength|readOnly|400|readonly|fast|600|class|slow|1px|htmlFor|reverse|10000|PI|cos|compatible|Function|setData|ie|ra|it|rv|getData|userAgent|navigator|fadeTo|fadeIn|slideToggle|slideUp|slideDown|ig|responseXML|content|1223|NaN|fadeOut|300|protocol|send|setAttribute|option|dataFilter|cssText|changed|be|Accept|stop|With|Requested|Object|can|GMT|property|1970|Jan|01|Thu|Since|If|Type|Content|XMLHTTP|th|Microsoft|td|onreadystatechange|onload|cap|charset|colg|host|tfoot|specified|with|1_|thead|leg|plain|attributes|opt|embed|urlencoded|www|area|hr|ajaxSetup|meta|post|getJSON|getScript|marginLeft|img|elements|pageYOffset|pageXOffset|abbr|serialize|pixelLeft'.split('|'),0,{}))
//--------------------------------------------------
;(function($){var _remove=$.fn.remove,isFF2=$.browser.mozilla&&(parseFloat($.browser.version)<1.9);$.ui={version:"1.6rc4",plugin:{add:function(module,option,set){var proto=$.ui[module].prototype;for(var i in set){proto.plugins[i]=proto.plugins[i]||[];proto.plugins[i].push([option,set[i]]);}},call:function(instance,name,args){var set=instance.plugins[name];if(!set){return;}
for(var i=0;i<set.length;i++){if(instance.options[set[i][0]]){set[i][1].apply(instance.element,args);}}}},contains:function(a,b){var safari2=$.browser.safari&&$.browser.version<522;if(a.contains&&!safari2){return a.contains(b);}
if(a.compareDocumentPosition)
return!!(a.compareDocumentPosition(b)&16);while(b=b.parentNode)
if(b==a)return true;return false;},cssCache:{},css:function(name){if($.ui.cssCache[name]){return $.ui.cssCache[name];}
var tmp=$('<div class="ui-gen">').addClass(name).css({position:'absolute',top:'-5000px',left:'-5000px',display:'block'}).appendTo('body');$.ui.cssCache[name]=!!((!(/auto|default/).test(tmp.css('cursor'))||(/^[1-9]/).test(tmp.css('height'))||(/^[1-9]/).test(tmp.css('width'))||!(/none/).test(tmp.css('backgroundImage'))||!(/transparent|rgba\(0, 0, 0, 0\)/).test(tmp.css('backgroundColor'))));try{$('body').get(0).removeChild(tmp.get(0));}catch(e){}
return $.ui.cssCache[name];},hasScroll:function(el,a){if($(el).css('overflow')=='hidden'){return false;}
var scroll=(a&&a=='left')?'scrollLeft':'scrollTop',has=false;if(el[scroll]>0){return true;}
el[scroll]=1;has=(el[scroll]>0);el[scroll]=0;return has;},isOverAxis:function(x,reference,size){return(x>reference)&&(x<(reference+size));},isOver:function(y,x,top,left,height,width){return $.ui.isOverAxis(y,top,height)&&$.ui.isOverAxis(x,left,width);},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(isFF2){var attr=$.attr,removeAttr=$.fn.removeAttr,ariaNS="http://www.w3.org/2005/07/aaa",ariaState=/^aria-/,ariaRole=/^wairole:/;$.attr=function(elem,name,value){var set=value!==undefined;return(name=='role'?(set?attr.call(this,elem,name,"wairole:"+value):(attr.apply(this,arguments)||"").replace(ariaRole,"")):(ariaState.test(name)?(set?elem.setAttributeNS(ariaNS,name.replace(ariaState,"aaa:"),value):attr.call(this,elem,name.replace(ariaState,"aaa:"))):attr.apply(this,arguments)));};$.fn.removeAttr=function(name){return(ariaState.test(name)?this.each(function(){this.removeAttributeNS(ariaNS,name.replace(ariaState,""));}):removeAttr.call(this,name));};}
$.fn.extend({remove:function(){$("*",this).add(this).each(function(){$(this).triggerHandler("remove");});return _remove.apply(this,arguments);},enableSelection:function(){return this.attr('unselectable','off').css('MozUserSelect','').unbind('selectstart.ui');},disableSelection:function(){return this.attr('unselectable','on').css('MozUserSelect','none').bind('selectstart.ui',function(){return false;});},scrollParent:function(){var scrollParent;if(($.browser.msie&&(/(static|relative)/).test(this.css('position')))||(/absolute/).test(this.css('position'))){scrollParent=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test($.curCSS(this,'position',1))&&(/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));}).eq(0);}else{scrollParent=this.parents().filter(function(){return(/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));}).eq(0);}
return(/fixed/).test(this.css('position'))||!scrollParent.length?$(document):scrollParent;}});$.extend($.expr[':'],{data:function(a,i,m){return!!$.data(a,m[3]);},tabbable:function(a,i,m){var nodeName=a.nodeName.toLowerCase();function isVisible(element){return!($(element).is(':hidden')||$(element).parents(':hidden').length);}
return(a.tabIndex>=0&&(('a'==nodeName&&a.href)||(/input|select|textarea|button/.test(nodeName)&&'hidden'!=a.type&&!a.disabled))&&isVisible(a));}});function getter(namespace,plugin,method,args){function getMethods(type){var methods=$[namespace][plugin][type]||[];return(typeof methods=='string'?methods.split(/,?\s+/):methods);}
var methods=getMethods('getter');if(args.length==1&&typeof args[0]=='string'){methods=methods.concat(getMethods('getterSetter'));}
return($.inArray(method,methods)!=-1);}
$.widget=function(name,prototype){var namespace=name.split(".")[0];name=name.split(".")[1];$.fn[name]=function(options){var isMethodCall=(typeof options=='string'),args=Array.prototype.slice.call(arguments,1);if(isMethodCall&&options.substring(0,1)=='_'){return this;}
if(isMethodCall&&getter(namespace,name,options,args)){var instance=$.data(this[0],name);return(instance?instance[options].apply(instance,args):undefined);}
return this.each(function(){var instance=$.data(this,name);(!instance&&!isMethodCall&&$.data(this,name,new $[namespace][name](this,options)));(instance&&isMethodCall&&$.isFunction(instance[options])&&instance[options].apply(instance,args));});};$[namespace]=$[namespace]||{};$[namespace][name]=function(element,options){var self=this;this.namespace=namespace;this.widgetName=name;this.widgetEventPrefix=$[namespace][name].eventPrefix||name;this.widgetBaseClass=namespace+'-'+name;this.options=$.extend({},$.widget.defaults,$[namespace][name].defaults,$.metadata&&$.metadata.get(element)[name],options);this.element=$(element).bind('setData.'+name,function(event,key,value){if(event.target==element){return self._setData(key,value);}}).bind('getData.'+name,function(event,key){if(event.target==element){return self._getData(key);}}).bind('remove',function(){return self.destroy();});this._init();};$[namespace][name].prototype=$.extend({},$.widget.prototype,prototype);$[namespace][name].getterSetter='option';};$.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+'-disabled'+' '+this.namespace+'-state-disabled').removeAttr('aria-disabled');},option:function(key,value){var options=key,self=this;if(typeof key=="string"){if(value===undefined){return this._getData(key);}
options={};options[key]=value;}
$.each(options,function(key,value){self._setData(key,value);});},_getData:function(key){return this.options[key];},_setData:function(key,value){this.options[key]=value;if(key=='disabled'){this.element
[value?'addClass':'removeClass'](this.widgetBaseClass+'-disabled'+' '+
this.namespace+'-state-disabled').attr("aria-disabled",value);}},enable:function(){this._setData('disabled',false);},disable:function(){this._setData('disabled',true);},_trigger:function(type,event,data){var eventName=(type==this.widgetEventPrefix?type:this.widgetEventPrefix+type);event=event||$.event.fix({type:eventName,target:this.element[0]});return this.element.triggerHandler(eventName,[event,data],this.options[type]);}};$.widget.defaults={disabled:false};$.ui.mouse={_mouseInit:function(){var self=this;this.element.bind('mousedown.'+this.widgetName,function(event){return self._mouseDown(event);}).bind('click.'+this.widgetName,function(event){if(self._preventClickEvent){self._preventClickEvent=false;return false;}});if($.browser.msie){this._mouseUnselectable=this.element.attr('unselectable');this.element.attr('unselectable','on');}
this.started=false;},_mouseDestroy:function(){this.element.unbind('.'+this.widgetName);($.browser.msie&&this.element.attr('unselectable',this._mouseUnselectable));},_mouseDown:function(event){(this._mouseStarted&&this._mouseUp(event));this._mouseDownEvent=event;var self=this,btnIsLeft=(event.which==1),elIsCancel=(typeof this.options.cancel=="string"?$(event.target).parents().add(event.target).filter(this.options.cancel).length:false);if(!btnIsLeft||elIsCancel||!this._mouseCapture(event)){return true;}
this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){self.mouseDelayMet=true;},this.options.delay);}
if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(event)!==false);if(!this._mouseStarted){event.preventDefault();return true;}}
this._mouseMoveDelegate=function(event){return self._mouseMove(event);};this._mouseUpDelegate=function(event){return self._mouseUp(event);};$(document).bind('mousemove.'+this.widgetName,this._mouseMoveDelegate).bind('mouseup.'+this.widgetName,this._mouseUpDelegate);if(!$.browser.safari)event.preventDefault();return true;},_mouseMove:function(event){if($.browser.msie&&!event.button){return this._mouseUp(event);}
if(this._mouseStarted){this._mouseDrag(event);return event.preventDefault();}
if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,event)!==false);(this._mouseStarted?this._mouseDrag(event):this._mouseUp(event));}
return!this._mouseStarted;},_mouseUp:function(event){$(document).unbind('mousemove.'+this.widgetName,this._mouseMoveDelegate).unbind('mouseup.'+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=true;this._mouseStop(event);}
return false;},_mouseDistanceMet:function(event){return(Math.max(Math.abs(this._mouseDownEvent.pageX-event.pageX),Math.abs(this._mouseDownEvent.pageY-event.pageY))>=this.options.distance);},_mouseDelayMet:function(event){return this.mouseDelayMet;},_mouseStart:function(event){},_mouseDrag:function(event){},_mouseStop:function(event){},_mouseCapture:function(event){return true;}};$.ui.mouse.defaults={cancel:null,distance:1,delay:0};})(jQuery);(function($){$.widget("ui.draggable",$.extend({},$.ui.mouse,{_init:function(){if(this.options.helper=='original'&&!(/^(?:r|a|f)/).test(this.element.css("position")))
this.element[0].style.position='relative';(this.options.cssNamespace&&this.element.addClass(this.options.cssNamespace+"-draggable"));(this.options.disabled&&this.element.addClass('ui-draggable-disabled'));this._mouseInit();},destroy:function(){if(!this.element.data('draggable'))return;this.element.removeData("draggable").unbind(".draggable").removeClass('ui-draggable ui-draggable-dragging ui-draggable-disabled');this._mouseDestroy();},_mouseCapture:function(event){var o=this.options;if(this.helper||o.disabled||$(event.target).is('.ui-resizable-handle'))
return false;this.handle=this._getHandle(event);if(!this.handle)
return false;return true;},_mouseStart:function(event){var o=this.options;this.helper=this._createHelper(event);this._cacheHelperProportions();if($.ui.ddmanager)
$.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};$.extend(this.offset,{click:{left:event.pageX-this.offset.left,top:event.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});if(o.cursorAt)
this._adjustOffsetFromHelper(o.cursorAt);this.originalPosition=this._generatePosition(event);if(o.containment)
this._setContainment();this._propagate("start",event);this._cacheHelperProportions();if($.ui.ddmanager&&!o.dropBehaviour)
$.ui.ddmanager.prepareOffsets(this,event);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(event,true);return true;},_mouseDrag:function(event,noPropagation){this.position=this._generatePosition(event);this.positionAbs=this._convertPositionTo("absolute");if(!noPropagation)this.position=this._propagate("drag",event)||this.position;if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+'px';if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+'px';if($.ui.ddmanager)$.ui.ddmanager.drag(this,event);return false;},_mouseStop:function(event){var dropped=false;if($.ui.ddmanager&&!this.options.dropBehaviour)
var dropped=$.ui.ddmanager.drop(this,event);if((this.options.revert=="invalid"&&!dropped)||(this.options.revert=="valid"&&dropped)||this.options.revert===true||($.isFunction(this.options.revert)&&this.options.revert.call(this.element,dropped))){var self=this;$(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){self._propagate("stop",event);self._clear();});}else{this._propagate("stop",event);this._clear();}
return false;},_getHandle:function(event){var handle=!this.options.handle||!$(this.options.handle,this.element).length?true:false;$(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==event.target)handle=true;});return handle;},_createHelper:function(event){var o=this.options;var helper=$.isFunction(o.helper)?$(o.helper.apply(this.element[0],[event])):(o.helper=='clone'?this.element.clone():this.element);if(!helper.parents('body').length)
helper.appendTo((o.appendTo=='parent'?this.element[0].parentNode:o.appendTo));if(helper[0]!=this.element[0]&&!(/(fixed|absolute)/).test(helper.css("position")))
helper.css("position","absolute");return helper;},_adjustOffsetFromHelper:function(obj){if(obj.left!=undefined)this.offset.click.left=obj.left+this.margins.left;if(obj.right!=undefined)this.offset.click.left=this.helperProportions.width-obj.right+this.margins.left;if(obj.top!=undefined)this.offset.click.top=obj.top+this.margins.top;if(obj.bottom!=undefined)this.offset.click.top=this.helperProportions.height-obj.bottom+this.margins.top;},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var po=this.offsetParent.offset();if((this.offsetParent[0]==document.body&&$.browser.mozilla)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=='html'&&$.browser.msie))
po={top:0,left:0};return{top:po.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:po.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)};},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var p=this.element.position();return{top:p.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:p.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()};}else{return{top:0,left:0};}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)};},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};},_setContainment:function(){var o=this.options;if(o.containment=='parent')o.containment=this.helper[0].parentNode;if(o.containment=='document'||o.containment=='window')this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,$(o.containment=='document'?document:window).width()-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),($(o.containment=='document'?document:window).height()||document.body.parentNode.scrollHeight)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)];if(!(/^(document|window|parent)$/).test(o.containment)){var ce=$(o.containment)[0];var co=$(o.containment).offset();var over=($(ce).css("overflow")!='hidden');this.containment=[co.left+(parseInt($(ce).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left-this.margins.left,co.top+(parseInt($(ce).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top-this.margins.top,co.left+(over?Math.max(ce.scrollWidth,ce.offsetWidth):ce.offsetWidth)-(parseInt($(ce).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left,co.top+(over?Math.max(ce.scrollHeight,ce.offsetHeight):ce.offsetHeight)-(parseInt($(ce).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top];}},_convertPositionTo:function(d,pos){if(!pos)pos=this.position;var mod=d=="absolute"?1:-1;var scroll=this[(this.cssPosition=='absolute'?'offset':'scroll')+'Parent'],scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);return{top:(pos.top
+this.offset.relative.top*mod
+this.offset.parent.top*mod
+(this.cssPosition=='fixed'?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop()))*mod
+this.margins.top*mod),left:(pos.left
+this.offset.relative.left*mod
+this.offset.parent.left*mod
+(this.cssPosition=='fixed'?-this.scrollParent.scrollLeft():(scrollIsRootNode?0:scroll.scrollLeft()))*mod
+this.margins.left*mod)};},_generatePosition:function(event){var o=this.options,scroll=this[(this.cssPosition=='absolute'?'offset':'scroll')+'Parent'],scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);var position={top:(event.pageY
-this.offset.click.top
-this.offset.relative.top
-this.offset.parent.top
+(this.cssPosition=='fixed'?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop()))),left:(event.pageX
-this.offset.click.left
-this.offset.relative.left
-this.offset.parent.left
+(this.cssPosition=='fixed'?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft()))};if(!this.originalPosition)return position;if(this.containment){if(position.left<this.containment[0])position.left=this.containment[0];if(position.top<this.containment[1])position.top=this.containment[1];if(position.left>this.containment[2])position.left=this.containment[2];if(position.top>this.containment[3])position.top=this.containment[3];}
if(o.grid){var top=this.originalPosition.top+Math.round((position.top-this.originalPosition.top)/o.grid[1])*o.grid[1];position.top=this.containment?(!(top<this.containment[1]||top>this.containment[3])?top:(!(top<this.containment[1])?top-o.grid[1]:top+o.grid[1])):top;var left=this.originalPosition.left+Math.round((position.left-this.originalPosition.left)/o.grid[0])*o.grid[0];position.left=this.containment?(!(left<this.containment[0]||left>this.containment[2])?left:(!(left<this.containment[0])?left-o.grid[0]:left+o.grid[0])):left;}
return position;},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval)this.helper.remove();this.helper=null;this.cancelHelperRemoval=false;},_propagate:function(n,event){$.ui.plugin.call(this,n,[event,this._uiHash()]);if(n=="drag")this.positionAbs=this._convertPositionTo("absolute");return this.element.triggerHandler(n=="drag"?n:"drag"+n,[event,this._uiHash()],this.options[n]);},plugins:{},_uiHash:function(event){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,options:this.options};}}));$.extend($.ui.draggable,{version:"1.6rc4",defaults:{appendTo:"parent",axis:false,cancel:":input",connectToSortable:false,containment:false,cssNamespace:"ui",cursor:"default",cursorAt:null,delay:0,distance:1,grid:false,handle:false,helper:"original",iframeFix:false,opacity:1,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:null}});$.ui.plugin.add("draggable","connectToSortable",{start:function(event,ui){var inst=$(this).data("draggable");inst.sortables=[];$(ui.options.connectToSortable).each(function(){$(this+'').each(function(){if($.data(this,'sortable')){var sortable=$.data(this,'sortable');inst.sortables.push({instance:sortable,shouldRevert:sortable.options.revert});sortable._refreshItems();sortable._propagate("activate",event,inst);}});});},stop:function(event,ui){var inst=$(this).data("draggable");$.each(inst.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;inst.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert)this.instance.options.revert=true;this.instance._mouseStop(event);this.instance.element.triggerHandler("sortreceive",[event,$.extend(this.instance._ui(),{sender:inst.element})],this.instance.options["receive"]);this.instance.options.helper=this.instance.options._helper;if(inst.options.helper=='original'){this.instance.currentItem.css({top:'auto',left:'auto'});}}else{this.instance.cancelHelperRemoval=false;this.instance._propagate("deactivate",event,inst);}});},drag:function(event,ui){var inst=$(this).data("draggable"),self=this;var checkPos=function(o){var dyClick=this.offset.click.top,dxClick=this.offset.click.left;var helperTop=this.positionAbs.top,helperLeft=this.positionAbs.left;var itemHeight=o.height,itemWidth=o.width;var itemTop=o.top,itemLeft=o.left;return $.ui.isOver(helperTop+dyClick,helperLeft+dxClick,itemTop,itemLeft,itemHeight,itemWidth);};$.each(inst.sortables,function(i){if(checkPos.call(inst,this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=$(self).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return ui.helper[0];};event.target=this.instance.currentItem[0];this.instance._mouseCapture(event,true);this.instance._mouseStart(event,true,true);this.instance.offset.click.top=inst.offset.click.top;this.instance.offset.click.left=inst.offset.click.left;this.instance.offset.parent.left-=inst.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=inst.offset.parent.top-this.instance.offset.parent.top;inst._propagate("toSortable",event);}
if(this.instance.currentItem)this.instance._mouseDrag(event);}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._mouseStop(event,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder)this.instance.placeholder.remove();inst._propagate("fromSortable",event);}};});}});$.ui.plugin.add("draggable","cursor",{start:function(event,ui){var t=$('body');if(t.css("cursor"))ui.options._cursor=t.css("cursor");t.css("cursor",ui.options.cursor);},stop:function(event,ui){if(ui.options._cursor)$('body').css("cursor",ui.options._cursor);}});$.ui.plugin.add("draggable","iframeFix",{start:function(event,ui){$(ui.options.iframeFix===true?"iframe":ui.options.iframeFix).each(function(){$('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css($(this).offset()).appendTo("body");});},stop:function(event,ui){$("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this);});}});$.ui.plugin.add("draggable","opacity",{start:function(event,ui){var t=$(ui.helper);if(t.css("opacity"))ui.options._opacity=t.css("opacity");t.css('opacity',ui.options.opacity);},stop:function(event,ui){if(ui.options._opacity)$(ui.helper).css('opacity',ui.options._opacity);}});$.ui.plugin.add("draggable","scroll",{start:function(event,ui){var o=ui.options;var i=$(this).data("draggable");if(i.scrollParent[0]!=document&&i.scrollParent[0].tagName!='HTML')i.overflowOffset=i.scrollParent.offset();},drag:function(event,ui){var o=ui.options,scrolled=false;var i=$(this).data("draggable");if(i.scrollParent[0]!=document&&i.scrollParent[0].tagName!='HTML'){if((i.overflowOffset.top+i.scrollParent[0].offsetHeight)-event.pageY<o.scrollSensitivity)
i.scrollParent[0].scrollTop=scrolled=i.scrollParent[0].scrollTop+o.scrollSpeed;else if(event.pageY-i.overflowOffset.top<o.scrollSensitivity)
i.scrollParent[0].scrollTop=scrolled=i.scrollParent[0].scrollTop-o.scrollSpeed;if((i.overflowOffset.left+i.scrollParent[0].offsetWidth)-event.pageX<o.scrollSensitivity)
i.scrollParent[0].scrollLeft=scrolled=i.scrollParent[0].scrollLeft+o.scrollSpeed;else if(event.pageX-i.overflowOffset.left<o.scrollSensitivity)
i.scrollParent[0].scrollLeft=scrolled=i.scrollParent[0].scrollLeft-o.scrollSpeed;}else{if(event.pageY-$(document).scrollTop()<o.scrollSensitivity)
scrolled=$(document).scrollTop($(document).scrollTop()-o.scrollSpeed);else if($(window).height()-(event.pageY-$(document).scrollTop())<o.scrollSensitivity)
scrolled=$(document).scrollTop($(document).scrollTop()+o.scrollSpeed);if(event.pageX-$(document).scrollLeft()<o.scrollSensitivity)
scrolled=$(document).scrollLeft($(document).scrollLeft()-o.scrollSpeed);else if($(window).width()-(event.pageX-$(document).scrollLeft())<o.scrollSensitivity)
scrolled=$(document).scrollLeft($(document).scrollLeft()+o.scrollSpeed);}
if(scrolled!==false&&$.ui.ddmanager&&!o.dropBehaviour)
$.ui.ddmanager.prepareOffsets(i,event);if(scrolled!==false&&i.cssPosition=='absolute'&&i.scrollParent[0]!=document&&$.ui.contains(i.scrollParent[0],i.offsetParent[0])){i.offset.parent=i._getParentOffset();}
if(scrolled!==false&&i.cssPosition=='relative'&&!(i.scrollParent[0]!=document&&i.scrollParent[0]!=i.offsetParent[0])){i.offset.relative=i._getRelativeOffset();}}});$.ui.plugin.add("draggable","snap",{start:function(event,ui){var inst=$(this).data("draggable");inst.snapElements=[];$(ui.options.snap.constructor!=String?(ui.options.snap.items||':data(draggable)'):ui.options.snap).each(function(){var $t=$(this);var $o=$t.offset();if(this!=inst.element[0])inst.snapElements.push({item:this,width:$t.outerWidth(),height:$t.outerHeight(),top:$o.top,left:$o.left});});},drag:function(event,ui){var inst=$(this).data("draggable");var d=ui.options.snapTolerance;var x1=ui.absolutePosition.left,x2=x1+inst.helperProportions.width,y1=ui.absolutePosition.top,y2=y1+inst.helperProportions.height;for(var i=inst.snapElements.length-1;i>=0;i--){var l=inst.snapElements[i].left,r=l+inst.snapElements[i].width,t=inst.snapElements[i].top,b=t+inst.snapElements[i].height;if(!((l-d<x1&&x1<r+d&&t-d<y1&&y1<b+d)||(l-d<x1&&x1<r+d&&t-d<y2&&y2<b+d)||(l-d<x2&&x2<r+d&&t-d<y1&&y1<b+d)||(l-d<x2&&x2<r+d&&t-d<y2&&y2<b+d))){if(inst.snapElements[i].snapping)(inst.options.snap.release&&inst.options.snap.release.call(inst.element,event,$.extend(inst._uiHash(),{snapItem:inst.snapElements[i].item})));inst.snapElements[i].snapping=false;continue;}
if(ui.options.snapMode!='inner'){var ts=Math.abs(t-y2)<=d;var bs=Math.abs(b-y1)<=d;var ls=Math.abs(l-x2)<=d;var rs=Math.abs(r-x1)<=d;if(ts)ui.position.top=inst._convertPositionTo("relative",{top:t-inst.helperProportions.height,left:0}).top;if(bs)ui.position.top=inst._convertPositionTo("relative",{top:b,left:0}).top;if(ls)ui.position.left=inst._convertPositionTo("relative",{top:0,left:l-inst.helperProportions.width}).left;if(rs)ui.position.left=inst._convertPositionTo("relative",{top:0,left:r}).left;}
var first=(ts||bs||ls||rs);if(ui.options.snapMode!='outer'){var ts=Math.abs(t-y1)<=d;var bs=Math.abs(b-y2)<=d;var ls=Math.abs(l-x1)<=d;var rs=Math.abs(r-x2)<=d;if(ts)ui.position.top=inst._convertPositionTo("relative",{top:t,left:0}).top;if(bs)ui.position.top=inst._convertPositionTo("relative",{top:b-inst.helperProportions.height,left:0}).top;if(ls)ui.position.left=inst._convertPositionTo("relative",{top:0,left:l}).left;if(rs)ui.position.left=inst._convertPositionTo("relative",{top:0,left:r-inst.helperProportions.width}).left;}
if(!inst.snapElements[i].snapping&&(ts||bs||ls||rs||first))
(inst.options.snap.snap&&inst.options.snap.snap.call(inst.element,event,$.extend(inst._uiHash(),{snapItem:inst.snapElements[i].item})));inst.snapElements[i].snapping=(ts||bs||ls||rs||first);};}});$.ui.plugin.add("draggable","stack",{start:function(event,ui){var group=$.makeArray($(ui.options.stack.group)).sort(function(a,b){return(parseInt($(a).css("zIndex"),10)||ui.options.stack.min)-(parseInt($(b).css("zIndex"),10)||ui.options.stack.min);});$(group).each(function(i){this.style.zIndex=ui.options.stack.min+i;});this[0].style.zIndex=ui.options.stack.min+group.length;}});$.ui.plugin.add("draggable","zIndex",{start:function(event,ui){var t=$(ui.helper);if(t.css("zIndex"))ui.options._zIndex=t.css("zIndex");t.css('zIndex',ui.options.zIndex);},stop:function(event,ui){if(ui.options._zIndex)$(ui.helper).css('zIndex',ui.options._zIndex);}});})(jQuery);(function($){$.widget("ui.tabs",{_init:function(){this._tabify(true);},destroy:function(){var o=this.options;this.element.unbind('.tabs').removeClass(o.navClass).removeData('tabs');this.$tabs.each(function(){var href=$.data(this,'href.tabs');if(href)
this.href=href;var $this=$(this).unbind('.tabs');$.each(['href','load','cache'],function(i,prefix){$this.removeData(prefix+'.tabs');});});this.$lis.add(this.$panels).each(function(){if($.data(this,'destroy.tabs'))
$(this).remove();else
$(this).removeClass([o.tabClass,o.selectedClass,o.deselectableClass,o.disabledClass,o.panelClass,o.hideClass].join(' '));});if(o.cookie)
this._cookie(null,o.cookie);},_setData:function(key,value){if((/^selected/).test(key))
this.select(value);else{this.options[key]=value;this._tabify();}},length:function(){return this.$tabs.length;},_tabId:function(a){return a.title&&a.title.replace(/\s/g,'_').replace(/[^A-Za-z0-9\-_:\.]/g,'')||this.options.idPrefix+$.data(a);},_sanitizeSelector:function(hash){return hash.replace(/:/g,'\\:');},_cookie:function(){var cookie=this.cookie||(this.cookie='ui-tabs-'+$.data(this.element[0]));return $.cookie.apply(null,[cookie].concat($.makeArray(arguments)));},_tabify:function(init){this.$lis=$('li:has(a[href])',this.element.is('div')?$('> ul:first',this.element):this.element);this.$tabs=this.$lis.map(function(){return $('a',this)[0];});this.$panels=$([]);var self=this,o=this.options;this.$lis.hover(function(){$(this).addClass('ui-state-hover');},function(){$(this).removeClass('ui-state-hover');});this.$tabs.focus(function(){$(this).parent().addClass('ui-state-focus');}).blur(function(){$(this).parent().removeClass('ui-state-focus');});this.$tabs.each(function(i,a){if(a.hash&&a.hash.replace('#',''))
self.$panels=self.$panels.add(self._sanitizeSelector(a.hash));else if($(a).attr('href')!='#'){$.data(a,'href.tabs',a.href);$.data(a,'load.tabs',a.href);var id=self._tabId(a);a.href='#'+id;var $panel=$('#'+id);if(!$panel.length){$panel=$(o.panelTemplate).attr('id',id).addClass(o.panelClass).insertAfter(self.$panels[i-1]||self.element);$panel.data('destroy.tabs',true);}
self.$panels=self.$panels.add($panel);}
else
o.disabled.push(i+1);});if(init){if(this.element.is('div')){this.element.addClass('ui-tabs ui-widget ui-widget-content ui-corner-all');$('> ul:first',this.element).addClass(o.navClass);}
else{this.element.addClass(o.navClass);}
this.$lis.addClass(o.tabClass);this.$panels.addClass(o.panelClass);if(o.selected===undefined){if(location.hash){this.$tabs.each(function(i,a){if(a.hash==location.hash){o.selected=i;return false;}});}
else if(o.cookie){var index=parseInt(self._cookie(),10);if(index&&self.$tabs[index])o.selected=index;}
else if(self.$lis.filter('.'+o.selectedClass).length)
o.selected=self.$lis.index(self.$lis.filter('.'+o.selectedClass)[0]);}
o.selected=o.selected===null||o.selected!==undefined?o.selected:0;o.disabled=$.unique(o.disabled.concat($.map(this.$lis.filter('.'+o.disabledClass),function(n,i){return self.$lis.index(n);}))).sort();if($.inArray(o.selected,o.disabled)!=-1)
o.disabled.splice($.inArray(o.selected,o.disabled),1);this.$panels.addClass(o.hideClass);this.$lis.removeClass(o.selectedClass);if(o.selected!==null){this.$panels.eq(o.selected).removeClass(o.hideClass);var classes=[o.selectedClass];if(o.deselectable)classes.push(o.deselectableClass);this.$lis.eq(o.selected).addClass(classes.join(' '));var onShow=function(){self._trigger('show',null,self.ui(self.$tabs[o.selected],self.$panels[o.selected]));};if($.data(this.$tabs[o.selected],'load.tabs'))
this.load(o.selected,onShow);else onShow();}
$(window).bind('unload',function(){self.$tabs.unbind('.tabs');self.$lis=self.$tabs=self.$panels=null;});}
else
o.selected=this.$lis.index(this.$lis.filter('.'+o.selectedClass)[0]);if(o.cookie)this._cookie(o.selected,o.cookie);for(var i=0,li;li=this.$lis[i];i++)
$(li)[$.inArray(i,o.disabled)!=-1&&!$(li).hasClass(o.selectedClass)?'addClass':'removeClass'](o.disabledClass);if(o.cache===false)this.$tabs.removeData('cache.tabs');var hideFx,showFx;if(o.fx){if(o.fx.constructor==Array){hideFx=o.fx[0];showFx=o.fx[1];}
else hideFx=showFx=o.fx;}
function resetStyle($el,fx){$el.css({display:''});if($.browser.msie&&fx.opacity)$el[0].style.removeAttribute('filter');}
var showTab=showFx?function(clicked,$show){$show.animate(showFx,showFx.duration||'normal',function(){$show.removeClass(o.hideClass);resetStyle($show,showFx);self._trigger('show',null,self.ui(clicked,$show[0]));});}:function(clicked,$show){$show.removeClass(o.hideClass);self._trigger('show',null,self.ui(clicked,$show[0]));};var hideTab=hideFx?function(clicked,$hide,$show){$hide.animate(hideFx,hideFx.duration||'normal',function(){$hide.addClass(o.hideClass);resetStyle($hide,hideFx);if($show)showTab(clicked,$show,$hide);});}:function(clicked,$hide,$show){$hide.addClass(o.hideClass);if($show)showTab(clicked,$show);};function switchTab(clicked,$li,$hide,$show){var classes=[o.selectedClass];if(o.deselectable)classes.push(o.deselectableClass);$li.removeClass('ui-state-default').addClass(classes.join(' ')).siblings().removeClass(classes.join(' ')).addClass('ui-state-default');hideTab(clicked,$hide,$show);}
this.$tabs.unbind('.tabs').bind(o.event+'.tabs',function(){var $li=$(this).parents('li:eq(0)'),$hide=self.$panels.filter(':visible'),$show=$(self._sanitizeSelector(this.hash));if(($li.hasClass('ui-state-active')&&!o.deselectable)||$li.hasClass(o.disabledClass)||$(this).hasClass(o.loadingClass)||self._trigger('select',null,self.ui(this,$show[0]))===false){this.blur();return false;}
o.selected=self.$tabs.index(this);if(o.deselectable){if($li.hasClass('ui-state-active')){self.options.selected=null;$li.removeClass([o.selectedClass,o.deselectableClass].join(' ')).addClass('ui-state-default');self.$panels.stop();hideTab(this,$hide);this.blur();return false;}else if(!$hide.length){self.$panels.stop();var a=this;self.load(self.$tabs.index(this),function(){$li.addClass([o.selectedClass,o.deselectableClass].join(' ')).removeClass('ui-state-default');showTab(a,$show);});this.blur();return false;}}
if(o.cookie)self._cookie(o.selected,o.cookie);self.$panels.stop();if($show.length){var a=this;self.load(self.$tabs.index(this),$hide.length?function(){switchTab(a,$li,$hide,$show);}:function(){$li.addClass(o.selectedClass).removeClass('ui-state-default');showTab(a,$show);});}else
throw'jQuery UI Tabs: Mismatching fragment identifier.';if($.browser.msie)this.blur();return false;});if(o.event!='click')this.$tabs.bind('click.tabs',function(){return false;});},add:function(url,label,index){if(index==undefined)
index=this.$tabs.length;var o=this.options;var $li=$(o.tabTemplate.replace(/#\{href\}/g,url).replace(/#\{label\}/g,label));$li.addClass(o.tabClass).data('destroy.tabs',true);var id=url.indexOf('#')==0?url.replace('#',''):this._tabId($('a:first-child',$li)[0]);var $panel=$('#'+id);if(!$panel.length){$panel=$(o.panelTemplate).attr('id',id).addClass(o.hideClass).data('destroy.tabs',true);}
$panel.addClass(o.panelClass);if(index>=this.$lis.length){$li.appendTo(this.element);$panel.appendTo(this.element[0].parentNode);}
else{$li.insertBefore(this.$lis[index]);$panel.insertBefore(this.$panels[index]);}
o.disabled=$.map(o.disabled,function(n,i){return n>=index?++n:n});this._tabify();if(this.$tabs.length==1){$li.addClass(o.selectedClass);$panel.removeClass(o.hideClass);var href=$.data(this.$tabs[0],'load.tabs');if(href)this.load(index,href);}
this._trigger('add',null,this.ui(this.$tabs[index],this.$panels[index]));},remove:function(index){var o=this.options,$li=this.$lis.eq(index).remove(),$panel=this.$panels.eq(index).remove();if($li.hasClass(o.selectedClass)&&this.$tabs.length>1)
this.select(index+(index+1<this.$tabs.length?1:-1));o.disabled=$.map($.grep(o.disabled,function(n,i){return n!=index;}),function(n,i){return n>=index?--n:n});this._tabify();this._trigger('remove',null,this.ui($li.find('a')[0],$panel[0]));},enable:function(index){var o=this.options;if($.inArray(index,o.disabled)==-1)
return;var $li=this.$lis.eq(index).removeClass(o.disabledClass);if($.browser.safari){$li.css('display','inline-block');setTimeout(function(){$li.css('display','block');},0);}
o.disabled=$.grep(o.disabled,function(n,i){return n!=index;});this._trigger('enable',null,this.ui(this.$tabs[index],this.$panels[index]));},disable:function(index){var self=this,o=this.options;if(index!=o.selected){this.$lis.eq(index).addClass(o.disabledClass);o.disabled.push(index);o.disabled.sort();this._trigger('disable',null,this.ui(this.$tabs[index],this.$panels[index]));}},select:function(index){if(typeof index=='string')
index=this.$tabs.index(this.$tabs.filter('[href$='+index+']')[0]);this.$tabs.eq(index).trigger(this.options.event+'.tabs');},load:function(index,callback){var self=this,o=this.options,$a=this.$tabs.eq(index),a=$a[0],bypassCache=callback==undefined||callback===false,url=$a.data('load.tabs');callback=callback||function(){};if(!url||!bypassCache&&$.data(a,'cache.tabs')){callback();return;}
var inner=function(parent){var $parent=$(parent),$inner=$parent.find('*:last');return $inner.length&&$inner.is(':not(img)')&&$inner||$parent;};var cleanup=function(){self.$tabs.filter('.'+o.loadingClass).removeClass(o.loadingClass).each(function(){if(o.spinner)
inner(this).parent().html(inner(this).data('label.tabs'));});self.xhr=null;};if(o.spinner){var label=inner(a).html();inner(a).wrapInner('<em></em>').find('em').data('label.tabs',label).html(o.spinner);}
var ajaxOptions=$.extend({},o.ajaxOptions,{url:url,success:function(r,s){$(self._sanitizeSelector(a.hash)).html(r);cleanup();if(o.cache)
$.data(a,'cache.tabs',true);self._trigger('load',null,self.ui(self.$tabs[index],self.$panels[index]));try{o.ajaxOptions.success(r,s);}
catch(event){}
callback();}});if(this.xhr){this.xhr.abort();cleanup();}
$a.addClass(o.loadingClass);self.xhr=$.ajax(ajaxOptions);},url:function(index,url){this.$tabs.eq(index).removeData('cache.tabs').data('load.tabs',url);},ui:function(tab,panel){return{options:this.options,tab:tab,panel:panel,index:this.$tabs.index(tab)};}});$.extend($.ui.tabs,{version:'1.6rc4',getter:'length',defaults:{ajaxOptions:null,cache:false,cookie:null,deselectable:false,deselectableClass:'ui-tabs-deselectable',disabled:[],disabledClass:'ui-state-disabled',event:'click',fx:null,hideClass:'ui-tabs-hide',idPrefix:'ui-tabs-',loadingClass:'ui-tabs-loading',navClass:'ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all',tabClass:'ui-state-default ui-corner-top',panelClass:'ui-tabs-panel ui-widget-content ui-corner-bottom',panelTemplate:'<div></div>',selectedClass:'ui-tabs-selected ui-state-active',spinner:'Loading&#8230;',tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>'}});$.extend($.ui.tabs.prototype,{rotation:null,rotate:function(ms,continuing){continuing=continuing||false;var self=this,t=this.options.selected;function start(){self.rotation=setInterval(function(){t=++t<self.$tabs.length?t:0;self.select(t);},ms);}
function stop(event){if(!event||event.clientX){clearInterval(self.rotation);}}
if(ms){start();if(!continuing)
this.$tabs.bind(this.options.event+'.tabs',stop);else
this.$tabs.bind(this.options.event+'.tabs',function(){stop();t=self.options.selected;start();});}
else{stop();this.$tabs.unbind(this.options.event+'.tabs',stop);}}});})(jQuery);
//--------------------------------------------------
/*
 * jQuery history plugin
 *
 * Copyright (c) 2006 Taku Sano (Mikage Sawatari)
 * Licensed under the MIT License:
 *   http://www.opensource.org/licenses/mit-license.php
 *
 * Modified by Lincoln Cooper to add Safari support and only call the callback once during initialization
 * for msie when no initial hash supplied.
 */


jQuery.extend({
	historyCurrentHash: undefined,
	
	historyCleanHash: function (hash){
		var regex = new RegExp("^.*#");
		var regex2 = new RegExp("^"+rootwwwhttp);
		var regex3 = new RegExp("^"+rootWWW);
		var regex4 = new RegExp("^"+sLangShort+'/');

		hash = hash.replace(regex , '');
		hash = hash.replace(regex2 , '');
		hash = hash.replace(regex3 , '');
		hash = hash.replace(regex4 , '');		
		return hash;
	},
	
	historyCallback: undefined,
	
	historyInit: function(callback){
		jQuery.historyCallback = callback;
		
		/*
		 * Added for the IE6:  +location.search; 
		 */
		
		var current_hash = jQuery.historyCleanHash(location.hash + location.search);

		/* alert('init: '+current_hash);*/
		jQuery.historyCurrentHash = current_hash;
		if(jQuery.browser.msie) {
			// To stop the callback firing twice during initilization if no hash present
			if (jQuery.historyCurrentHash == '') {
			jQuery.historyCurrentHash = '#';
		}
		
			// add hidden iframe for IE
			$("body").prepend('<iframe id="jQuery_history" style="display: none;"></iframe>');
			var ihistory = $("#jQuery_history")[0];
			var iframe = ihistory.contentWindow.document;
			iframe.open();
			iframe.close();
			new_hash = current_hash.replace('?','QUERYSTRING');
			iframe.location.hash = new_hash;
		}
		else if ($.browser.safari) {
			// etablish back/forward stacks
			jQuery.historyBackStack = [];
			jQuery.historyBackStack.length = history.length;
			jQuery.historyForwardStack = [];
			
			jQuery.isFirst = true;
		}
		if(current_hash.length){
			jQuery.historyCallback(current_hash.replace(/^#/, ''));
		}
		setInterval(jQuery.historyCheck, 100);
	},
	
	historyAddHistory: function(hash) {
		// This makes the looping function do something
		jQuery.historyBackStack.push(hash);
		
		jQuery.historyForwardStack.length = 0; // clear forwardStack (true click occured)
		this.isFirst = true;
	},
	
	historyCheck: function(){

		if(jQuery.browser.msie) {
			// On IE, check for location.hash of iframe
			var ihistory = $("#jQuery_history")[0];
			var iframe = ihistory.contentDocument || ihistory.contentWindow.document;
			var current_hash = jQuery.historyCleanHash(iframe.location.hash);

			current_hash = current_hash.replace('QUERYSTRING', '?');
			jQuery.historyCurrentHash = jQuery.historyCleanHash(jQuery.historyCurrentHash)
			
			if(current_hash != jQuery.historyCurrentHash) {
/*			alert('IE: ' + current_hash + ' '+ jQuery.historyCurrentHash); */ 
				
				location.hash = current_hash;
				jQuery.historyCurrentHash = current_hash;
				jQuery.historyCallback(current_hash.replace(/^#/, ''));
				
			}
		} else if ($.browser.safari) {
			if (!jQuery.dontCheck) {
				var historyDelta = history.length - jQuery.historyBackStack.length;
				
				if (historyDelta) { // back or forward button has been pushed
					jQuery.isFirst = false;
					if (historyDelta < 0) { // back button has been pushed
						// move items to forward stack
						for (var i = 0; i < Math.abs(historyDelta); i++) jQuery.historyForwardStack.unshift(jQuery.historyBackStack.pop());
					} else { // forward button has been pushed
						// move items to back stack
						for (var i = 0; i < historyDelta; i++) jQuery.historyBackStack.push(jQuery.historyForwardStack.shift());
					}
					var cachedHash = jQuery.historyBackStack[jQuery.historyBackStack.length - 1];
					if (cachedHash != undefined) {
						jQuery.historyCurrentHash = jQuery.historyCleanHash(location.hash);
						jQuery.historyCallback(cachedHash);
					}
				} else if (jQuery.historyBackStack[jQuery.historyBackStack.length - 1] == undefined && !jQuery.isFirst) {
					// back button has been pushed to beginning and URL already pointed to hash (e.g. a bookmark)
					// document.URL doesn't change in Safari
					if (document.URL.indexOf('#') >= 0) {
						jQuery.historyCallback(document.URL.split('#')[1]);
					} else {
						var current_hash = location.hash;
						jQuery.historyCallback('');
					}
					jQuery.isFirst = true;
				}
			}
		} else {
			// otherwise, check for location.hash
			var current_hash = jQuery.historyCleanHash(location.hash);
			jQuery.historyCurrentHash = jQuery.historyCleanHash(jQuery.historyCurrentHash);
			
			if(current_hash != jQuery.historyCurrentHash) {
			/*	alert(current_hash +' <>  '+ jQuery.historyCurrentHash); */
				jQuery.historyCurrentHash = current_hash;
				jQuery.historyCallback(current_hash.replace(/^#/, ''));
			}
		}
	},
	historyLoad: function(hash , options){
		hash = jQuery.historyCleanHash(hash);
		
		var newhash = new String;
		
		if (jQuery.browser.safari) {
			newhash = hash;
		}
		else {
			newhash = '#' + hash;
			location.hash = newhash;
		}
		jQuery.historyCurrentHash = newhash;
		
		if(jQuery.browser.msie) {
			var ihistory = $("#jQuery_history")[0];
			var iframe = ihistory.contentWindow.document;
			iframe.open();
			iframe.close();
			newhash = newhash.replace('?','QUERYSTRING');
			iframe.location.hash = newhash;
/*			alert('Setze: ' + jQuery.historyCurrentHash );
			alert('Setze: ' + newhash);
			alert('Gesetzt: ' + iframe.location.hash );  */
			jQuery.historyCallback(hash, options);
		}
		else if (jQuery.browser.safari) {
			jQuery.dontCheck = true;
			// Manually keep track of the history values for Safari
			this.historyAddHistory(hash);
			
			// Wait a while before allowing checking so that Safari has time to update the "history" object
			// correctly (otherwise the check loop would detect a false change in hash).
			var fn = function() {jQuery.dontCheck = false;};
			window.setTimeout(fn, 200);
			jQuery.historyCallback(hash , options);
			// N.B. "location.hash=" must be the last line of code for Safari as execution stops afterwards.
			//      By explicitly using the "location.hash" command (instead of using a variable set to "location.hash") the
			//      URL in the browser and the "history" object are both updated correctly.
			location.hash = newhash;
		}
		else {
		  jQuery.historyCallback(hash , options);
		}
	}
});



//--------------------------------------------------
/*
 * jQuery Tooltip plugin 1.3
 *
 * http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/
 * http://docs.jquery.com/Plugins/Tooltip
 *
 * Copyright (c) 2006 - 2008 JÃ¶rn Zaefferer
 *
 * $Id: jquery.tooltip.js 5741 2008-06-21 15:22:16Z joern.zaefferer $
 * 
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */;(function($){var helper={},current,title,tID,IE=$.browser.msie&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent),track=false;$.tooltip={blocked:false,defaults:{delay:200,fade:false,showURL:true,extraClass:"",top:15,left:15,id:"tooltip"},block:function(){$.tooltip.blocked=!$.tooltip.blocked;}};$.fn.extend({tooltip:function(settings){settings=$.extend({},$.tooltip.defaults,settings);createHelper(settings);return this.each(function(){$.data(this,"tooltip",settings);this.tOpacity=helper.parent.css("opacity");this.tooltipText=this.title;$(this).removeAttr("title");this.alt="";}).mouseover(save).mouseout(hide).click(hide);},fixPNG:IE?function(){return this.each(function(){var image=$(this).css('backgroundImage');if(image.match(/^url\(["']?(.*\.png)["']?\)$/i)){image=RegExp.$1;$(this).css({'backgroundImage':'none','filter':"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+image+"')"}).each(function(){var position=$(this).css('position');if(position!='absolute'&&position!='relative')$(this).css('position','relative');});}});}:function(){return this;},unfixPNG:IE?function(){return this.each(function(){$(this).css({'filter':'',backgroundImage:''});});}:function(){return this;},hideWhenEmpty:function(){return this.each(function(){$(this)[$(this).html()?"show":"hide"]();});},url:function(){return this.attr('href')||this.attr('src');}});function createHelper(settings){if(helper.parent)return;helper.parent=$('<div id="'+settings.id+'"><h3></h3><div class="body"></div><div class="url"></div></div>').appendTo(document.body).hide();if($.fn.bgiframe)helper.parent.bgiframe();helper.title=$('h3',helper.parent);helper.body=$('div.body',helper.parent);helper.url=$('div.url',helper.parent);}function settings(element){return $.data(element,"tooltip");}function handle(event){if(settings(this).delay)tID=setTimeout(show,settings(this).delay);else
show();track=!!settings(this).track;$(document.body).bind('mousemove',update);update(event);}function save(){if($.tooltip.blocked||this==current||(!this.tooltipText&&!settings(this).bodyHandler))return;current=this;title=this.tooltipText;if(settings(this).bodyHandler){helper.title.hide();var bodyContent=settings(this).bodyHandler.call(this);if(bodyContent.nodeType||bodyContent.jquery){helper.body.empty().append(bodyContent)}else{helper.body.html(bodyContent);}helper.body.show();}else if(settings(this).showBody){var parts=title.split(settings(this).showBody);helper.title.html(parts.shift()).show();helper.body.empty();for(var i=0,part;(part=parts[i]);i++){if(i>0)helper.body.append("<br/>");helper.body.append(part);}helper.body.hideWhenEmpty();}else{helper.title.html(title).show();helper.body.hide();}if(settings(this).showURL&&$(this).url())helper.url.html($(this).url().replace('http://','')).show();else
helper.url.hide();helper.parent.addClass(settings(this).extraClass);if(settings(this).fixPNG)helper.parent.fixPNG();handle.apply(this,arguments);}function show(){tID=null;if((!IE||!$.fn.bgiframe)&&settings(current).fade){if(helper.parent.is(":animated"))helper.parent.stop().show().fadeTo(settings(current).fade,current.tOpacity);else
helper.parent.is(':visible')?helper.parent.fadeTo(settings(current).fade,current.tOpacity):helper.parent.fadeIn(settings(current).fade);}else{helper.parent.show();}update();}function update(event){if($.tooltip.blocked)return;if(event&&event.target.tagName=="OPTION"){return;}if(!track&&helper.parent.is(":visible")){$(document.body).unbind('mousemove',update)}if(current==null){$(document.body).unbind('mousemove',update);return;}helper.parent.removeClass("viewport-right").removeClass("viewport-bottom");var left=helper.parent[0].offsetLeft;var top=helper.parent[0].offsetTop;if(event){left=event.pageX+settings(current).left;top=event.pageY+settings(current).top;var right='auto';if(settings(current).positionLeft){right=$(window).width()-left;left='auto';}helper.parent.css({left:left,right:right,top:top});}var v=viewport(),h=helper.parent[0];if(v.x+v.cx<h.offsetLeft+h.offsetWidth){left-=h.offsetWidth+20+settings(current).left;helper.parent.css({left:left+'px'}).addClass("viewport-right");}if(v.y+v.cy<h.offsetTop+h.offsetHeight){top-=h.offsetHeight+20+settings(current).top;helper.parent.css({top:top+'px'}).addClass("viewport-bottom");}}function viewport(){return{x:$(window).scrollLeft(),y:$(window).scrollTop(),cx:$(window).width(),cy:$(window).height()};}function hide(event){if($.tooltip.blocked)return;if(tID)clearTimeout(tID);current=null;var tsettings=settings(this);function complete(){helper.parent.removeClass(tsettings.extraClass).hide().css("opacity","");}if((!IE||!$.fn.bgiframe)&&tsettings.fade){if(helper.parent.is(':animated'))helper.parent.stop().fadeTo(tsettings.fade,0,complete);else
helper.parent.stop().fadeOut(tsettings.fade,complete);}else
complete();if(settings(this).fixPNG)helper.parent.unfixPNG();}})(jQuery);
//--------------------------------------------------
/* --------------------------------------------------------------------------------------------------------------
*	API:			JSMX (JavaScript MX) - Universal Ajax API for ColdFusion, PHP, .NET, or anything other language.
*	AUTHOR: 		Todd Kingham [todd@lalabird.com] with contributions by Jan Jannek [jan.jannek@Cetecom.de] and Yin Zhao [bugz_podder@yahoo.com]
*	CREATED:		8.21.2005
*	VERSION:		2.6.3
*	DESCRIPTION:	This API uses XMLHttpRequest to post/get data from a ColdFusion interface.
*					The CFC's/CFM's will return a string representation of a JS variable: response_param.
*					The "onreadystatechange event handler" will eval() the string into a JS variable 
*					and pass the value back to the "return function". To Download a full copy of the sample 
*					application visit: http://www.lalabird.com/JSMX/?fa=JSMX.downloads
*
*	HISTORY:		2.0.0:	Todd: Scripted Out Original Version
*					2.1.0:	Todd: Modified for Download
*					2.2.0:	Todd: Modified the firstWord() function to be backward compatable with
*								  CF5 and to be more stable all-around.
*					2.3.0:	Todd: Added "wait div" functionality
*					2.4.0:	Todd: XML!!!! Now JSMX will allow you to pass XML Documents to the API in
*								  addition to the original JavaScript method.
*					2.4.1:	Jan:  2006-02-16, XMLHTTP requests can now handle more than one request at once. By placing the onreadystatechange event as a local variable inside the actual http() function.
*							Jan:  Added fix for strange IE bug that returned Header Info.
*							Todd: Added the jsmx object to allow users to override defaults and set custom "async", "wait" and "error" methods
*					2.5.0:	Todd: Added JSON Support! So now you can pass JavaScript, XML, or JSON.
*					2.5.1:	Todd: Version 2.5.0 was premature. Needed to fix an eval() bug when I introduced JSON.
*					2.5.2:	Todd: Fixed a bug in the onreadystatechange. Based on the order you call the event handler... "State Change 1" gets called twice. Added code to only process code inside 'CASE 1:' once
*					2.5.3:	Todd: Fixed a bug in the try/catch of the parser by placing the callback() call within the try/catch statement. This caused errors in the callback function to be "masked" and appear as "parsing errors", even when the parse was successful.
*					2.6.0: 	Todd: Added WDDX Parser! Now you can return WDDX Strings as well.
*					2.6.1:	Todd: Streamlined the ClassicMode and JSON parser into one function.
*					2.6.2:	Todd: Replaced ParseInt() with ParseFloat() in the my WDDX Parser.
*							Yin: _escape_utf8() to allow UTF-8 Chars. (modified from Cal Henderson's <cal@iamcal.com> version)
*					2.6.3:	Todd: _escape_utf8() was choking on CR+LF: chr(13) && chr(10) ... modified function to correct problem.
*
*
*	LICENSE:		THIS IS AN OPEN SOURCE API. YOU ARE FREE TO USE THIS API IN ANY APPLICATION,
*               	TO COPY IT OR MODIFY THE FUNCTIONS FOR YOUR OWN NEEDS, AS LONG THIS HEADER INFORMATION
*              	 	REMAINS IN TACT AND YOU DON'T CHARGE ANY MONEY FOR IT. USE THIS API AT YOUR OWN
*               	RISK. NO WARRANTY IS EXPRESSED OR IMPLIED, AND NO LIABILITY ASSUMED FOR THE RESULT OF
*               	USING THIS API.
*
*               	THIS API IS LICENSED UNDER THE CREATIVE COMMONS ATTRIBUTION-SHAREALIKE LICENSE.
*               	FOR THE FULL LICENSE TEXT PLEASE VISIT: http://creativecommons.org/licenses/by-sa/2.5/
*
-----------------------------------------------------------------------------------------------------------------*/
// UNCOMMENT THE FOLLOWING LINE IF YOU WILL BE RETURNING QUERY OBJECTS. (note: you may need to point the SRC to an alternate location.
/*document.writeln('<SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript" SRC="/CFIDE/scripts/wddx.js"></SCRIPT >');*/

var jsmx = new jsmxConstructor();
function jsmxConstructor(){
	this.isJSMX = true;
	this.async = true;
	this.debug = false;
	this.waitDiv = 'JSMX_loading';
	this.http = http;
	this.onWait = _popWait;
	this.onWaitEnd = _killWait;
	this.onError = _onError;
}
// perform the XMLHttpRequest();
function http(verb,url,cb,q) {
	var self = (this.isJSMX) ? this : jsmx ;
	//reference our arguments
	var qryStr = (!q) ? '' : _toQueryString(q);
	var calledOnce = false; //this is to prevent a bug in onreadystatechange... "state 1" gets called twice.
	try{//this should work for most modern browsers excluding: IE Mac
		var xhr = ( window.XMLHttpRequest ) ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP") ;
			xhr.onreadystatechange = function(){
				switch(xhr.readyState){
					case 1: 
						if(!calledOnce){ 
							self.onWait(self.waitDiv); 
							calledOnce = true;
						} 	break;
					case 2: break;
					case 3: break;
					case 4:
						self.onWaitEnd(self.waitDiv);
						if ( xhr.status == 200 ){// only if "OK"
							var success = true;
							try{
								var rObj = _parseResponse( xhr );
							}catch(e){ 
								self.onError(xhr,self,1);
								success = false;
							}
							if(success){ cb( rObj ); }
						}else{
							self.onError(xhr,self,2);
						}
					delete xhr; //clean this function from memory once we re done with it.
					break;
				}
			};
			xhr.open( verb , _noCache(url) , self.async );
			if(verb.toLowerCase() == 'post') { xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); }
			xhr.send(qryStr);
	}catch(e){
		self.onError(xhr,self,3);
	}
}

/*--- BEGIN: RESPONSE PARSING FUNCTIONS ---*/
function _parseResponse($$){
	 var str = _cleanString($$.responseText);
	 var xml = $$.responseXML;
	//FIRST TRY IT AS XML
		if(xml != null && xml.childNodes.length){ return xml; } 
	//NEXT TRY IT AS WDDX
		if(str.indexOf("<wddxPacket") == 0){ return _parseWDDX(str); }
	//NEXT TRY IT AS JSON
		try{ return eval('('+str+')'); }
	//NEXT TRY IT AS JavaScript
		catch(e){ return _parseJS(str); }
}
// jan.jannek@cetecom.de, 2006-02-16, weird error: some IEs show the responseText followed by the complete response (header and body again) 
function _cleanString(str){ 
	//Left Trim
	var rex = /\S/i;
	str = str.substring(str.search(rex),str.length);
	
	var i = str.indexOf("HTTP/1");
	if (i > -1) {
		str = str.substring(i, str.length);
		i = str.indexOf(String.fromCharCode(13, 10, 13, 10));
		if (i > -1) { str = str.substring(i + 2, str.length); }
	}
	return str;	
}
function _parseJS(str){ 
	eval(str);
	var r = eval(str.split('=')[0].replace(/\s/g,''));
	return r;
}
function _parseWDDX(str){ var wddx = xmlStr2Doc(str); var data = wddx.getElementsByTagName("data"); return _parseWDDXnode(data[0].firstChild); } function xmlStr2Doc(str){ var xml; if(typeof(DOMParser) == 'undefined'){ xml=new ActiveXObject("Microsoft.XMLDOM"); xml.async="false"; xml.loadXML(str); }else{ var domParser = new DOMParser(); xml = domParser.parseFromString(str, 'application/xml'); } return xml; } function _parseWDDXnode(n){ var val; switch(n.tagName){ case 'string': val = _parseWDDXstring(n); break; case 'number': val = parseFloat(n.firstChild.data); break; case 'boolean': val = n.getAttribute('value'); break; case 'dateTime': val = Date(n.firstChild.data); break; case 'array': val = _parseWDDXarray(n); break; case 'struct': val = _parseWDDXstruct(n); break; case 'recordset': val = _parseWDDXrecordset(n); break; case 'binary': val = n.firstChild.data; break; case 'char': val = _parseWDDXchar(n);; break; case 'null': val = ''; break; default: val = n.tagName; break; } return val; } function _parseWDDXstring(node){ var items = node.childNodes; var str = ''; for(var x=0;x < items.length;x++){ if(typeof(items[x].data) != 'undefined') str += items[x].data; else str += _parseWDDXnode(items[x]); } return str; } function _parseWDDXchar(node){ switch(node.getAttribute('code')){ case '0d': return '\r'; case '0c': return '\f'; case '0a': return '\n'; case '09': return '\t'; } } function _parseWDDXarray(node){ var items = node.childNodes; var arr = new Array(); for(var i=0;i < items.length;i++){ arr[i] = _parseWDDXnode(items[i]); } return arr; } function _parseWDDXstruct(node){ var items = node.childNodes; var obj = new Object(); for(var i=0;i < items.length;i++){ obj[items[i].getAttribute('name').toLowerCase()] = _parseWDDXnode(items[i].childNodes[0]); } return obj; } function _parseWDDXrecordset(node){ var qry = new Object(); var fields = node.getElementsByTagName("field"); var items; var dataType; var values; for(var x = 0; x < fields.length; x++){ items = fields[x].childNodes; values = new Array(); for(var i = 0; i < items.length; i++){ values[values.length] = _parseWDDXnode(items[i]); } qry[fields[x].getAttribute('name').toLowerCase()] = values; } return qry; }
/*--- END: RESPONSE PARSING FUNCTIONS ---*/


/*--- BEGIN: REQUEST PARAMETER FUNCTIONS ---*/
	function _toQueryString(obj){
		//determine the variable type
		if(typeof(obj) == 'string') { return obj; }
		if(typeof(obj) == 'object'){
			if(typeof obj.elements == 'undefined') {return _object2queryString(obj); }//It's an Object()!
			else{ return _form2queryString(obj); }//It's a form!
		}	
	}	
	function _object2queryString(obj){
		var ar = new Array();
		for(x in obj){ ar[ar.length] = _escape_utf8(x)+'='+_escape_utf8(obj[x]); }
		return ar.join('&');
	}	
	function _form2queryString(form){
		var obj = new Object();
		var ar = new Array();
		for(var i=0;i < form.elements.length;i++){
			try {
				elm = form.elements[i];
				nm = elm.name;
				if(nm != ''){
					switch(elm.type.split('-')[0]){
						case "select":
							for(var s=0;s < elm.options.length;s++){
								if(elm.options[s].selected){
									if(typeof(obj[nm]) == 'undefined'){ obj[nm] = new Array(); }
									obj[nm][obj[nm].length] = _escape_utf8(elm.options[s].value);
								}	
							}
							break;						
						case "radio":
							if(elm.checked){
								if(typeof(obj[nm]) == 'undefined'){ obj[nm] = new Array(); }
								obj[nm][obj[nm].length] = _escape_utf8(elm.value);
							}	
							break;						
						case "checkbox":
							if(elm.checked){
								if(typeof(obj[nm]) == 'undefined'){ obj[nm] = new Array(); }
								obj[nm][obj[nm].length] = _escape_utf8(elm.value);
							}	
							break;						
						default:
							if(typeof(obj[nm]) == 'undefined'){ obj[nm] = new Array(); }
							obj[nm][obj[nm].length] = _escape_utf8(elm.value);
							break;
					}
				}
			}catch(e){}
		}
		for(x in obj){ ar[ar.length] = x+'='+obj[x].join(','); }
	return ar.join('&');
	}
/*--- END: REQUEST PARAMETER FUNCTIONS ---*/

//IE likes to cache so we will fix it's wagon!
function _noCache(url){
	var qs = new Array();
	var arr = url.split('?');
	var scr = arr[0];
	if(arr[1]){ qs = arr[1].split('&'); }
	qs[qs.length]='noCache='+new Date().getTime();
return scr+'?'+qs.join('&');
}
function _popWait(id){ 
	proc = document.getElementById(id);
	if( proc == null ){
		var p = document.createElement("div");
		p.id = id;
		document.body.appendChild(p);
	}
}
function _killWait(id){
	proc = document.getElementById(id);
	if( proc != null ){ document.body.removeChild(proc); }
}
function _onError(obj,inst,errCode){ 
	var msg;
	switch(errCode){
		case 1:/*parsing error*/
			msg = (inst.debug) ? obj.responseText : 'Parsing Error: The value returned could not be evaluated.';
			break;
		case 2:/*server error*/
			msg = (inst.debug) ? obj.responseText : 'There was a problem retrieving the data:\n' + obj.status+' : '+obj.statusText;
			break;
		case 3:/*browser not equiped to handle XMLHttp*/
			msg = 'Unsupported browser detected.';
			return;/*you can remove this return to send a message to the screen*/
			break;		
	}		
	if(inst.debug){
		var debugWin = window.open('','error');
		debugWin.document.write(msg);
		debugWin.focus();
	}else{
		alert(msg);
	}
}

function _escape_utf8(data) {
	if (data=="" || data == null){ return ""; }
	data = data.toString();
	var buf = "";
	for (var i=0;i<data.length;i++) {
		var c=data.charCodeAt(i);
		var bs = [];				
		if (c>0x10000) {
			bs[0] = 0xF0 | ((c & 0x1C0000) >>> 18);
			bs[1] = 0x80 | ((c & 0x3F000) >>> 12);
			bs[2] = 0x80 | ((c & 0xFC0) >>> 6);
			bs[3] = 0x80 | (c & 0x3F);
		} else if (c>0x800) {
			bs[0] = 0xE0 | ((c & 0xF000) >>> 12);
			bs[1] = 0x80 | ((c & 0xFC0) >>> 6);
			bs[2] = 0x80 | (c & 0x3F);
		} else  if (c>0x80) {
			bs[0] = 0xC0 | ((c & 0x7C0) >>> 6);
			bs[1] = 0x80 | (c & 0x3F);
		}
		else{
			bs[0] = c;
		}
		
		if (c == 10 || c == 13){ buf += '%0'+c.toString(16); }//added to correct problem with hard returns
		else if (bs.length == 1 && c>=48 && c<127 && c!=92){buf += data.charAt(i);}
		else{ for(var j=0;j<bs.length;j++){ buf+='%'+bs[j].toString(16);} }
	}/**/
	return buf;
}
function $(id){ return document.getElementById(id); }
//--------------------------------------------------
function arrayToList(aArrayList)
{
	return aArrayList.join(",");
}

function listToArray(lListArray)
{
	return lListArray.split(",");
}

function listGetAt(lList,iPos)
{
	var sDelimiter = ",";
	if (arguments.length > 2)
	{
		sDelimiter = arguments[2];
	}
	var aList = lList.split(sDelimiter);

	if (iPos > 0 && iPos < aList.length+1)
	{
		return aList[iPos - 1];
	}
	else
	{
		return 0;
	}
}

function listSetAt(lList,iPos,sValue)
{
	var aList = lList.split(",");

	if (iPos > 0 && iPos < aList.length+1)
	{
		aList[iPos - 1] = sValue;
		return aList.join(",");
	}
	else
	{
		return lList;
	}	
}

function listDeleteAt(lList,iPos)
{
	var aList = lList.split(",");

	if(aList.length > 1)
	{ 
		if (iPos > 0 && iPos < aList.length+1)
		{
	
			if (sBrowser == "IE" && sVersion < "5.5")
			{
				if (aList.length > iPos)
				{
					for (i = iPos-1; i < aList.length-1; i++)
					{
						aList[i] = aList[i + 1];
					}
					
					aList.length --;
				}
				else
				{
					aList.length --;
				}	
			}
			else
			{
				aList.splice(iPos-1, 1);
			}	
			
			return aList.join(",");
		
		}
		else
		{
			return lList;
		}
	}
	else
	{
		return "";
	}		
}

function listFind(lList,sValue)
{
	var aList = lList.split(",");
	//alert(sValue.toLowerCase());
	
	for (i = 0; i < aList.length; i++)
	{
		if(sValue.toString().toLowerCase() == aList[i].toString().toLowerCase())
		{
			return i+1;
		}
	}
	return 0;
}

function listAppend(lList,sValue)
{

	if(lList.length > 0)
	{
		var aList = lList.split(",");
	
		/* keine doppelten hinzufügen
		for (i = 0; i < aList.length; i++)
		{
			if(sValue.toString().toLowerCase() == aList[i].toString().toLowerCase())
			{
				return i;
			}
		}
		*/
		
		if (sBrowser == "IE" && sVersion < "5.5")
		{
			aList.length ++;
			aList[aList.length-1] = sValue;
		}
		else
		{
			aList.push(sValue);
		}	
		
		
		return aList.join(",");
	}
	else
	{
		return sValue;
	}
}
//--------------------------------------------------
sOver = "a";
sNormal = "n";

function setClass(f_obj)
{
	if (stBrowser.sType == "IELAYER" || stBrowser.sType == "DOM")
	{
		
		sClassName = f_obj.className;
		sMainClassName = sClassName.substr(0,sClassName.length-1);
		sEndClassName = sClassName.substr(sMainClassName.length,sClassName.length);
	
		if (sEndClassName == sNormal)
		{
			f_obj.className = sMainClassName + sOver;
			setCursor(f_obj);
		}
		else
		{
			f_obj.className = sMainClassName + sNormal;
		}
	
	}
	
}

function setClassName(f_sObj)
{
	if (stBrowser.sType == "IELAYER" || stBrowser.sType == "DOM")
	{
		obj = getObject(f_sObj);
		sClassName = obj.className;
		sMainClassName = sClassName.substr(0,sClassName.length-1);
		sEndClassName = sClassName.substr(sMainClassName.length,sClassName.length);
		
		if (sEndClassName == sNormal)
		{
			obj.className = sMainClassName + sOver;
			setCursor(obj);
		}
		else
		{
			obj.className = sMainClassName + sNormal;
		}
	
	}
	
}

function setCursor(f_obj)
{

	if (stBrowser.sBrowser == "NS")
	{
		f_obj.style.cursor  = "pointer";
	}
	else
	{
		f_obj.style.cursor  = "hand";
	}
}

function setCursorNormal(f_obj)
{
	if (stBrowser.sBrowser == "NS")
	{
		f_obj.style.cursor  = "";
	}
	else
	{
		f_obj.style.cursor  = "";
	}
}

function setLoc(f_sLoc)
{
	document.location.href=f_sLoc;
}

function setExpColor(f_sObj,f_iSwitch)
{
	if (stBrowser.sType == "IELAYER" || stBrowser.sType == "DOM")
	{
		
		if (f_iSwitch == 0)
		{
			f_sObj.style.backgroundColor = "";
		}
		else
		{
			f_sObj.style.backgroundColor = "FDB15D";
		}
	
	}

}


//--------------------------------------------------
/**
 * Application : CF WCMS CORE
 * File        : _js/openPopUp.js
 * @version    : 1.0
 * @author     : acn <acn@getunik.com>
 * @copyright  : copyright 01.01.2000 by http://www.getunik.com
 * 
 * Long desc:
 * Function library to enable to open a new browser window (aka popup)
 * with a assigned behaviour (see parameter list).
 * The function checks if already a popup with the same name exists.<b> 
 * If a popup with the same name exists, it close-it first.
 *
 * Version-History:
 * 01.01.2000.private.acn : initial release
 */
 

/**
 * main function to open a popup window by entered specificas
 *   - check if a old window instance exists - close this first before open a new one 
 *   - use the function openWin() to setup a new window instance
 *
 * @param  string   sUrl         the source file for the window instance
 * @param  intiger  iWidth       width of the new window (0 - n)
 * @param  intiger  iHeight      height of the new window (0 - n)
 * @param  intiger  bToolbar     toolbar displayed or not (0|1)
 * @param  intiger  bScrollbars  scrollbars displayed or not (0|1)
 * @param  intiger  bResizable   windwo by user resizable or not (0|1)
 */
function openPopUp(sUrl, iWidth, iHeight, bToolbar, bScrollbars, bResizable){  
  if(window.popup){
    if(!(popup.closed)){
      popup.close();
	}
    openWin(sUrl, iWidth, iHeight, bToolbar, bScrollbars, bResizable);
  }
  else{
    openWin(sUrl, iWidth, iHeight, bToolbar, bScrollbars, bResizable);
  }
}

/**
 * sub function used within the function openPopUp()
 *
 * @param  string   sUrl         the source file for the window instance
 * @param  intiger  iWidth       width of the new window (0 - n)
 * @param  intiger  iHeight      height of the new window (0 - n)
 * @param  intiger  bToolbar     toolbar displayed or not (0|1)
 * @param  intiger  bScrollbars  scrollbars displayed or not (0|1)
 * @param  intiger  bResizable   windwo by user resizable or not (0|1)
 */
function openWin(sUrl, iWidth, iHeight, bToolbar, bScrollbars, bResizable){
  popup = window.open(sUrl, "PopUp","toolbar=" + bToolbar + ",location=0,directories=0,status=0,menubar=0,scrollbars=" + bScrollbars +",resizable=" + bResizable + ",width=" + iWidth + ",height=" + iHeight);
  if (navigator.appName == "Microsoft Internet Explorer"){
    popup.resizeTo((parseInt(iWidth)+10),(parseInt(iHeight)+50));
  }
  else{
    popup.resizeTo(iWidth, iHeight);
  }
  if(navigator.userAgent.indexOf("Mozilla/3.0") != -1  || navigator.userAgent.indexOf("Mozilla/4.0") != -1){
    popup.focus();
  }
}
//--------------------------------------------------

function protectMail(){
	$('a[domain]').each(function(){
		var elem = $(this);
		elem.text(elem.text() + '@' + elem.attr('domain'));
		elem.attr('href','mailto:' + elem.text());
	});
}

$().ready(function(){protectMail()});

//<a domain="mydomain.com">firstname.lastname</a>

//--------------------------------------------------
/*	sIFR v2.0.7
	Copyright 2004 - 2008 Mark Wubben and Mike Davidson. Prior contributions by Shaun Inman and Tomas Jogin.
	
	This software is licensed under the CC-GNU LGPL <http://creativecommons.org/licenses/LGPL/2.1/>
*/

var hasFlash=function(){var a=6;if(navigator.appVersion.indexOf("MSIE")!=-1&&navigator.appVersion.indexOf("Windows")>-1){document.write('<script language="VBScript"\> \non error resume next \nhasFlash = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & '+a+'))) \n</script\> \n');if(window.hasFlash!=null)return window.hasFlash}if(navigator.mimeTypes&&navigator.mimeTypes["application/x-shockwave-flash"]&&navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){var b=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description;return parseInt(b.substr(b.indexOf(".")-2,2),10)>=a}return false}();String.prototype.normalize=function(){return this.replace(/\s+/g," ")};if(Array.prototype.push==null){Array.prototype.push=function(){var i=0,a=this.length,b=arguments.length;while(i<b){this[a++]=arguments[i++]}return this.length}}if(!Function.prototype.apply){Function.prototype.apply=function(a,b){var c=[];var d,e;if(!a)a=window;if(!b)b=[];for(var i=0;i<b.length;i++){c[i]="b["+i+"]"}e="a.__applyTemp__("+c.join(",")+");";a.__applyTemp__=this;d=eval(e);a.__applyTemp__=null;return d}}function named(a){return new named.Arguments(a)}named.Arguments=function(a){this.oArgs=a};named.Arguments.prototype.constructor=named.Arguments;named.extract=function(a,b){var c,d;var i=a.length;while(i--){d=a[i];if(d!=null&&d.constructor!=null&&d.constructor==named.Arguments){c=a[i].oArgs;break}}if(c==null)return;for(e in c)if(b[e]!=null)b[e](c[e]);return};var parseSelector=function(){var a=/^([^#.>`]*)(#|\.|\>|\`)(.+)$/;function r(s,t){var u=s.split(/\s*\,\s*/);var v=[];for(var i=0;i<u.length;i++)v=v.concat(b(u[i],t));return v}function b(c,d,e){c=c.normalize().replace(" ","`");var f=c.match(a);var g,h,i,j,k,n;var l=[];if(f==null)f=[c,c];if(f[1]=="")f[1]="*";if(e==null)e="`";if(d==null)d=document;switch(f[2]){case "#":k=f[3].match(a);if(k==null)k=[null,f[3]];g=document.getElementById(k[1]);if(g==null||(f[1]!="*"&&!o(g,f[1])))return l;if(k.length==2){l.push(g);return l}return b(k[3],g,k[2]);case ".":if(e!=">")h=m(d,f[1]);else h=d.childNodes;for(i=0,n=h.length;i<n;i++){g=h[i];if(g.nodeType!=1)continue;k=f[3].match(a);if(k!=null){if(g.className==null||g.className.match("(\\s|^)"+k[1]+"(\\s|$)")==null)continue;j=b(k[3],g,k[2]);l=l.concat(j)}else if(g.className!=null&&g.className.match("(\\s|^)"+f[3]+"(\\s|$)")!=null)l.push(g)}return l;case ">":if(e!=">")h=m(d,f[1]);else h=d.childNodes;for(i=0,n=h.length;i<n;i++){g=h[i];if(g.nodeType!=1)continue;if(!o(g,f[1]))continue;j=b(f[3],g,">");l=l.concat(j)}return l;case "`":h=m(d,f[1]);for(i=0,n=h.length;i<n;i++){g=h[i];j=b(f[3],g,"`");l=l.concat(j)}return l;default:if(e!=">")h=m(d,f[1]);else h=d.childNodes;for(i=0,n=h.length;i<n;i++){g=h[i];if(g.nodeType!=1)continue;if(!o(g,f[1]))continue;l.push(g)}return l}}function m(d,o){if(o=="*"&&d.all!=null)return d.all;return d.getElementsByTagName(o)}function o(p,q){return q=="*"?true:p.nodeName.toLowerCase().replace("html:", "")==q.toLowerCase()}return r}();var sIFR=function(){var a="http://www.w3.org/1999/xhtml";var b=false;var c=false;var d;var ah=[];var al=document;var ak=al.documentElement;var am=window;var au=al.addEventListener;var av=am.addEventListener;var f=function(){var g=navigator.userAgent.toLowerCase();var f={a:g.indexOf("applewebkit")>-1,b:g.indexOf("safari")>-1,c:navigator.product!=null&&navigator.product.toLowerCase().indexOf("konqueror")>-1,d:g.indexOf("opera")>-1,e:al.contentType!=null&&al.contentType.indexOf("xml")>-1,f:true,g:true,h:null,i:null,j:null,k:null};f.l=f.a||f.c;f.m=!f.a&&navigator.product!=null&&navigator.product.toLowerCase()=="gecko";if(f.m&&g.match(/.*gecko\/(\d{8}).*/))f.j=new Number(g.match(/.*gecko\/(\d{8}).*/)[1]);f.n=g.indexOf("msie")>-1&&!f.d&&!f.l&&!f.m;f.o=f.n&&g.match(/.*mac.*/)!=null;if(f.d&&g.match(/.*opera(\s|\/)(\d+\.\d+)/))f.i=new Number(g.match(/.*opera(\s|\/)(\d+\.\d+)/)[2]);if(f.n||(f.d&&f.i<7.6))f.g=false;if(f.a&&g.match(/.*applewebkit\/(\d+).*/))f.k=new Number(g.match(/.*applewebkit\/(\d+).*/)[1]);if(am.hasFlash&&(!f.n||f.o)){var aj=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description;f.h=parseInt(aj.substr(aj.indexOf(".")-2,2),10)}if(g.match(/.*(windows|mac).*/)==null||f.o||f.c||(f.d&&(g.match(/.*mac.*/)!=null||f.i<7.6))||(f.b&&f.h<7)||(!f.b&&f.a&&f.k<312)||(f.m&&f.j<20020523))f.f=false;if(!f.o&&!f.m&&al.createElementNS)try{al.createElementNS(a,"i").innerHTML=""}catch(e){f.e=true}f.p=f.c||(f.a&&f.k<312);return f}();function at(){return{bIsWebKit:f.a,bIsSafari:f.b,bIsKonq:f.c,bIsOpera:f.d,bIsXML:f.e,bHasTransparencySupport:f.f,bUseDOM:f.g,nFlashVersion:f.h,nOperaVersion:f.i,nGeckoBuildDate:f.j,nWebKitVersion:f.k,bIsKHTML:f.l,bIsGecko:f.m,bIsIE:f.n,bIsIEMac:f.o,bUseInnerHTMLHack:f.p}}if(am.hasFlash==false||!al.getElementsByTagName||!al.getElementById||(f.e&&(f.p||f.n)))return{UA:at()};function af(e){if((!k.bAutoInit&&(am.event||e)!=null)||!l(e))return;b=true;for(var i=0,h=ah.length;i<h;i++)j.apply(null,ah[i]);ah=[]}var k=af;function l(e){if(c==false||k.bIsDisabled==true||((f.e&&f.m||f.l)&&e==null&&b==false)||al.getElementsByTagName("body").length==0)return false;return true}function m(n){if(f.n)return n.replace(new RegExp("%\d{0}","g"),"%25");return n.replace(new RegExp("%(?!\d)","g"),"%25")}function as(p,q){return q=="*"?true:p.nodeName.toLowerCase().replace("html:", "")==q.toLowerCase()}function o(p,q,r,s,t){var u="";var v=p.firstChild;var w,x,y,z;if(s==null)s=0;if(t==null)t="";while(v){if(v.nodeType==3){z=v.nodeValue.replace("<","&lt;");switch(r){case "lower":u+=z.toLowerCase();break;case "upper":u+=z.toUpperCase();break;default:u+=z}}else if(v.nodeType==1){if(as(v,"a")&&!v.getAttribute("href")==false){if(v.getAttribute("target"))t+="&sifr_url_"+s+"_target="+v.getAttribute("target");t+="&sifr_url_"+s+"="+m(v.getAttribute("href")).replace(/&/g,"%26");u+='<a href="asfunction:_root.launchURL,'+s+'">';s++}else if(as(v,"br"))u+="<br/>";if(v.hasChildNodes()){y=o(v,null,r,s,t);u+=y.u;s=y.s;t=y.t}if(as(v,"a"))u+="</a>"}w=v;v=v.nextSibling;if(q!=null){x=w.parentNode.removeChild(w);q.appendChild(x)}}return{"u":u,"s":s,"t":t}}function A(B){if(al.createElementNS&&f.g)return al.createElementNS(a,B);return al.createElement(B)}function C(D,E,z){var p=A("param");p.setAttribute("name",E);p.setAttribute("value",z);D.appendChild(p)}function F(p,G){var H=p.className;if(H==null)H=G;else H=H.normalize()+(H==""?"":" ")+G;p.className=H}function aq(ar){var a=ak;if(k.bHideBrowserText==false)a=al.getElementsByTagName("body")[0];if((k.bHideBrowserText==false||ar)&&a)if(a.className==null||a.className.match(/\bsIFR\-hasFlash\b/)==null)F(a, "sIFR-hasFlash")}function j(I,J,K,L,M,N,O,P,Q,R,S,r,T){if(!l())return ah.push(arguments);aq();named.extract(arguments,{sSelector:function(ap){I=ap},sFlashSrc:function(ap){J=ap},sColor:function(ap){K=ap},sLinkColor:function(ap){L=ap},sHoverColor:function(ap){M=ap},sBgColor:function(ap){N=ap},nPaddingTop:function(ap){O=ap},nPaddingRight:function(ap){P=ap},nPaddingBottom:function(ap){Q=ap},nPaddingLeft:function(ap){R=ap},sFlashVars:function(ap){S=ap},sCase:function(ap){r=ap},sWmode:function(ap){T=ap}});var U=parseSelector(I);if(U.length==0)return false;if(S!=null)S="&"+S.normalize();else S="";if(K!=null)S+="&textcolor="+K;if(M!=null)S+="&hovercolor="+M;if(M!=null||L!=null)S+="&linkcolor="+(L||K);if(O==null)O=0;if(P==null)P=0;if(Q==null)Q=0;if(R==null)R=0;if(N==null)N="#FFFFFF";if(T=="transparent")if(!f.f)T="opaque";else N="transparent";if(T==null)T="";var p,V,W,X,Y,Z,aa,ab,ac;var ad=null;for(var i=0,h=U.length;i<h;i++){p=U[i];if(p.className!=null&&p.className.match(/\bsIFR\-replaced\b/)!=null)continue;V=p.offsetWidth-R-P;W=p.offsetHeight-O-Q;aa=A("span");aa.className="sIFR-alternate";ac=o(p,aa,r);Z="txt="+m(ac.u).replace(/\+/g,"%2B").replace(/&/g,"%26").replace(/\"/g, "%22").normalize() + S + "&w=" + V + "&h=" + W + ac.t;F(p,"sIFR-replaced");if(ad==null||!f.g){if(!f.g){if(!f.n)p.innerHTML=['<embed class="sIFR-flash" type="application/x-shockwave-flash" src="',J,'" quality="best" wmode="',T,'" bgcolor="',N,'" flashvars="',Z,'" width="',V,'" height="',W,'" sifr="true"></embed>'].join("");else p.innerHTML=['<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" sifr="true" width="',V,'" height="',W,'" class="sIFR-flash"><param name="movie" value="',J,'"></param><param name="flashvars" value="',Z,'"></param><param name="quality" value="best"></param><param name="wmode" value="',T,'"></param><param name="bgcolor" value="',N,'"></param> </object>'].join('')}else{if(f.d){ab=A("object");ab.setAttribute("data",J);C(ab,"quality","best");C(ab,"wmode",T);C(ab,"bgcolor",N)}else{ab=A("embed");ab.setAttribute("src",J);ab.setAttribute("quality","best");ab.setAttribute("flashvars",Z);ab.setAttribute("wmode",T);ab.setAttribute("bgcolor",N)}ab.setAttribute("sifr","true");ab.setAttribute("type","application/x-shockwave-flash");ab.className="sIFR-flash";if(!f.l||!f.e)ad=ab.cloneNode(true)}}else ab=ad.cloneNode(true);if(f.g){if(f.d)C(ab,"flashvars",Z);else ab.setAttribute("flashvars",Z);ab.setAttribute("width",V);ab.setAttribute("height",W);ab.style.width=V+"px";ab.style.height=W+"px";p.appendChild(ab)}p.appendChild(aa);if(f.p)p.innerHTML+=""}if(f.n&&k.bFixFragIdBug)setTimeout(function(){al.title=d},0)}function ai(){d=al.title}function ae(){if(k.bIsDisabled==true)return;c=true;if(k.bHideBrowserText)aq(true);if(am.attachEvent)am.attachEvent("onload",af);else if(!f.c&&(al.addEventListener||am.addEventListener)){if(f.a&&f.k>=132&&am.addEventListener)am.addEventListener("load",function(){setTimeout("sIFR({})",1)},false);else{if(al.addEventListener)al.addEventListener("load",af,false);if(am.addEventListener)am.addEventListener("load",af,false)}}else if(typeof am.onload=="function"){var ag=am.onload;am.onload=function(){ag();af()}}else am.onload=af;if(!f.n||am.location.hash=="")k.bFixFragIdBug=false;else ai()}k.UA=at();k.bAutoInit=true;k.bFixFragIdBug=true;k.replaceElement=j;k.updateDocumentTitle=ai;k.appendToClassName=F;k.setup=ae;k.debug=function(){aq(true)};k.debug.replaceNow=function(){ae();k()};k.bIsDisabled=false;k.bHideBrowserText=true;return k}();
/*
if(typeof sIFR == "function"){
    // sIFR.setup();
   // sIFR.debug();

};
*/



if(typeof sIFR == "function" && !sIFR.UA.bIsIEMac && (!sIFR.UA.bIsWebKit || sIFR.UA.nWebKitVersion >= 100)){
	sIFR.setup();

};


//--------------------------------------------------
/*
        Unobtrusive Slider Control by frequency decoder v2.4 (http://www.frequency-decoder.com/)

        Released under a creative commons Attribution-Share Alike 3.0 Unported license (http://creativecommons.org/licenses/by-sa/3.0/)

        You are free:

        * to copy, distribute, display, and perform the work
        * to make derivative works
        * to make commercial use of the work

        Under the following conditions:

                by Attribution.
                --------------
                You must attribute the work in the manner specified by the author or licensor.

                sa
                --
                Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under a license identical to this one.

        * For any reuse or distribution, you must make clear to others the license terms of this work.
        * Any of these conditions can be waived if you get permission from the copyright holder.
*/

var fdSliderController = (function() {
        var sliders           = {},
            uniqueid          = 0,
            mouseWheelEnabled = true;
                
        var removeMouseWheelSupport = function() {
                mouseWheelEnabled = false;
        };                       
        var addEvent = function(obj, type, fn) {
                if( obj.attachEvent ) {
                        obj["e"+type+fn] = fn;
                        obj[type+fn] = function(){obj["e"+type+fn]( window.event );};
                        obj.attachEvent( "on"+type, obj[type+fn] );
                } else { obj.addEventListener( type, fn, true ); }
        };
        var removeEvent = function(obj, type, fn) {
                if( obj.detachEvent ) {
                        try {
                                obj.detachEvent( "on"+type, obj[type+fn] );
                                obj[type+fn] = null;
                        } catch(err) { };
                } else { obj.removeEventListener( type, fn, true ); }
        };
        var stopEvent = function(e) {
                if(e == null) e = document.parentWindow.event;
                if(e.stopPropagation) {
                        e.stopPropagation();
                        e.preventDefault();
                };
                
                /*@cc_on@*/
                /*@if(@_win32)
                e.cancelBubble = true;
                e.returnValue = false;
                /*@end@*/
                
                return false;
        };                                           
        var joinNodeLists = function() {
                if(!arguments.length) { return []; };
                var nodeList = [];
                for (var i = 0; i < arguments.length; i++) {
                        for (var j = 0, item; item = arguments[i][j]; j++) { nodeList[nodeList.length] = item; };
                };
                return nodeList;
        };

        // Function by Artem B. with a minor change by f.d.
        var parseCallbacks = function(cbs) {
                if(cbs == null) { return {}; };
                var func,
                    type,
                    cbObj = {},
                    parts,
                    obj;
                for(var i = 0, fn; fn = cbs[i]; i++) {
                        type = fn.match(/(fd_slider_cb_(update|create|destroy|redraw|move|focus|blur)_)([^\s|$]+)/i)[1];
                        fn   = fn.replace(new RegExp("^"+type), "").replace(/-/g, ".");
                        type = type.replace(/^fd_slider_cb_/i, "").replace(/_$/, "");

                        try {
                                if(fn.indexOf(".") != -1) {
                                        parts = fn.split('.');
                                        obj   = window;
                                        for (var x = 0, part; part = obj[parts[x]]; x++) {
                                                if(part instanceof Function) {
                                                        (function() {
                                                                var method = part;
                                                                func = function (data) { method.apply(obj, [data]) };
                                                        })();
                                                } else {
                                                obj = part;
                                                };
                                        };
                                } else {
                                        func = window[fn];
                                };
                            
                                if(!(func instanceof Function)) continue;
                                if(!(type in cbObj)) { cbObj[type] = []; };
                                cbObj[type][cbObj[type].length] = func;
                        } catch (err) {};
                };
                return cbObj;
        };
                
        var parseClassNames = function(cbs) {
                if(cbs == null) { return ""; };
                var cns = [];                    
                for(var i = 0, cn; cn = cbs[i]; i++) { 
                        cns[cns.length] = cn.replace(/^fd_slider_cn_/, "");                                                                 
                };                 
                return cns.join(" ");
        };
        var createSlider = function(options) {
                if(!options.inp || !options.inp.id) { return false; };
                destroySingleSlider(options.inp.id);
                sliders[options.inp.id] = new fdSlider(options);
                return true;
        };                
        var init = function( elem) {
                var ranges     = /fd_range_([-]{0,1}[0-9]+(d[0-9]+){0,1}){1}_([-]{0,1}[0-9]+(d[0-9]+){0,1}){1}/i,
                    increment  = /fd_inc_([-]{0,1}[0-9]+(d[0-9]+){0,1}){1}/,
                    height  = /fd_height_([-]{0,1}[0-9]+(d[0-9]+){0,1}){1}/,
                    kIncrement = /fd_maxinc_([-]{0,1}[0-9]+(d[0-9]+){0,1}){1}/,
                    callbacks  = /((fd_slider_cb_(update|create|destroy|redraw|move|focus|blur)_)([^\s|$]+))/ig, 
                    classnames = /(fd_slider_cn_([a-zA-Z0-9_\-]+))/ig,
                    inputs     = elem && elem.tagName && elem.tagName.search(/input|select/i) != -1 ? [elem] : joinNodeLists(document.getElementsByTagName('input'), document.getElementsByTagName('select')),
                    range, 
                    tmp, 
                    options;

                for(var i = 0, inp; inp = inputs[i]; i++) {
                        if((inp.tagName.toLowerCase() == "input" && inp.type == "text" && (inp.className.search(ranges) != -1 || inp.className.search(/fd_slider/) != -1)) || (inp.tagName.toLowerCase() == "select" && inp.className.search(/fd_slider/) != -1)) {
                                // If we haven't been passed a specific id and the slider exists then continue
                                if(!elem && inp.id && document.getElementById("fd-slider-"+inp.id)) { continue; };
                                        
                                // Create an id if necessary
                                if(!inp.id) { inp.id == "sldr" + uniqueid++; };                       
                                       
 								test=          inp.className.search(height) != -1 ? inp.className.match(height)[0].replace("fd_height_", "").replace("d",".") : "19";
                                options = {
                                        inp:            inp,
                                        inc:            inp.className.search(increment)  != -1 ? inp.className.match(increment)[0].replace("fd_inc_", "").replace("d",".") : "1",
                                        maxInc:         inp.className.search(kIncrement) != -1 ? inp.className.match(kIncrement)[0].replace("fd_maxinc_", "").replace("d",".") : false,
                                        range:          [0,100],
                                        h: test,
                                        callbacks:      parseCallbacks(inp.className.match(callbacks)),
                                        classNames:     parseClassNames(inp.className.match(classnames)),
                                        tween:          inp.className.search(/fd_tween/i) != -1,
                                        vertical:       inp.className.search(/fd_vertical/i) != -1,
                                        hideInput:      inp.className.search(/fd_hide_input/i) != -1,
                                        clickJump:      inp.className.search(/fd_jump/i) != -1,
                                        fullARIA:       inp.className.search(/fd_full_aria/i) != -1,
                                        noMouseWheel:   inp.className.search(/fd_disable_mousewheel/i) != -1
                                };
                                        
                                if(inp.tagName.toLowerCase() == "select") {
                                        options.range = [0, inp.options.length - 1];                                                
                                } else if(inp.className.search(ranges) != -1) {                                                
                                        range = inp.className.match(ranges)[0].replace("fd_range_", "").replace(/d/g,".").split("_");                                                 
                                        options.range = [range[0], range[1]];                                                                                                  
                                };                                       
                                        
                                createSlider(options);                                        
                        };
                };
                return true;
        };
        var destroySingleSlider = function(id) {
                if(id in sliders) { 
                        sliders[id].destroy(); 
                        delete sliders[id]; 
                        return true;
                };
                return false;
        };
        var destroyAllsliders = function(e) {
                for(slider in sliders) { sliders[slider].destroy(); };                        
        };
        var unload = function(e) {
                destroyAllsliders();
                sliders = null;                         
                removeEvent(window, "unload", unload);
                removeEvent(window, "resize", resize);
                removeOnloadEvent();
        };                  
        var resize = function(e) {
                for(slider in sliders) { sliders[slider].onResize(); };        
        };                 
        var removeOnloadEvent = function() {
                removeEvent(window, "load", init);
                /*@cc_on@*/
                /*@if(@_win32)
                removeEvent(window, "load",   function() { setTimeout(onload, 200) });
                /*@end@*/
        };              
        function fdSlider(options) {
                var inp         = options.inp,
                    tagName     = inp.tagName.toLowerCase(),                      
                    min         = +options.range[0],
                    max         = +options.range[1], 
                    range       = Math.abs(max - min),
                    inc         = tagName == "select" ? 1 : +options.inc||1,
                    maxInc      = options.maxInc ? options.maxInc : inc * 2,
                    precision   = options.inc.search(".") != -1 ? options.inc.substr(options.inc.indexOf(".")+1, options.inc.length - 1).length : 0,
                    steps       = Math.ceil(range / inc),
                    useTween    = !!options.tween,
                    fullARIA    = !!options.fullARIA,
                    hideInput   = !!options.hideInput,                                                 
                    clickJump   = useTween ? false : !!options.clickJump,                                        
                    vertical    = !!options.vertical,
                    callbacks   = options.callbacks,
                    classNames  = options.classNames,
                    noMWheel    = !!options.noMouseWheel,                    
                    timer       = null,
                    kbEnabled   = true,                    
                    sliderH     = 0,
                    sliderW     = 0, 
                    tweenX      = 0,
                    tweenB      = 0,
                    tweenC      = 0,
                    tweenD      = 0,
                    frame       = 0,
                    x           = 0,                    
                    y           = 0, 
                    h			= options.h,                
                    maxPx       = 0,
                    handlePos   = 0,                    
                    destPos     = 0,                    
                    mousePos    = 0,
                    deltaPx     = 0, 
                    stepPx      = 0,
                    self        = this,
                    changeList  = {},
                    initVal     = null,
                    outerWrapper,
                    wrapper,
                    handle,
                    bar;                                 
                
                if(max < min) {
                        inc    = -inc;
                        maxInc = -maxInc;
                };
                 
                function destroySlider() {
                        try {                                         
                                removeEvent(outerWrapper, "mouseover", onMouseOver);
                                removeEvent(outerWrapper, "mouseout",  onMouseOut);
                                removeEvent(outerWrapper, "mousedown", onMouseDown);
                                removeEvent(handle, "focus",     onFocus);
                                removeEvent(handle, "blur",      onBlur);                        
                                if(!window.opera) {
                                        removeEvent(handle, "keydown",   onKeyDown);  
                                        removeEvent(handle, "keypress",  onKeyPress); 
                                } else {
                                        removeEvent(handle, "keypress",  onKeyDown);
                                };                                             
                                removeEvent(handle, "mousedown", onHandleMouseDown);
                                removeEvent(handle, "mouseup",   onHandleMouseUp);

                                if(mouseWheelEnabled && !noMWheel) {
                                        if (window.addEventListener && !window.devicePixelRatio) window.removeEventListener('DOMMouseScroll', trackMouseWheel, false);
                                        else {
                                                removeEvent(document, "mousewheel", trackMouseWheel);
                                                removeEvent(window,   "mousewheel", trackMouseWheel);
                                        };
                                };
                        } catch(err) {};
                        wrapper = bar = handle = outerWrapper = timer = null;
                        callback("destroy");
                        callbacks = null;
                };
                
                function redraw() {
                        locate();
                        // Internet Explorer requires the try catch
                        try {
                                var sW = outerWrapper.offsetWidth,
                                    sH = outerWrapper.offsetHeight,
                                    hW = handle.offsetWidth,
                                    hH = handle.offsetHeight,
                                    bH = bar.offsetHeight,
                                    bW = bar.offsetWidth; 
                                
                                maxPx     = vertical ? sH - hH : sW - hW;
                                stepPx    = maxPx / steps;                                                 
                                deltaPx   = maxPx / Math.ceil(range / maxInc);
                                
                                sliderW = sW;
                                sliderH = sH;
                                
                                valueToPixels();
                        } catch(err) { };
                        callback("redraw");
                };
                
                function callback(type) {
                        
                        var cbObj = {"elem":inp, "value":tagName == "select" ? inp.options[inp.selectedIndex].value : inp.value};
                        if(type in callbacks) {
                                for(var i = 0, func; func = callbacks[type][i]; i++) {
                                        func(cbObj);
                                };
                        }; 
                };

                function onFocus(e) {
                        outerWrapper.className = outerWrapper.className.replace('focused','') + ' focused';
                        if(mouseWheelEnabled && !noMWheel) {
                                addEvent(window, 'DOMMouseScroll', trackMouseWheel);
                                addEvent(document, 'mousewheel', trackMouseWheel);
                                if(!window.opera) addEvent(window,   'mousewheel', trackMouseWheel); 
                        }; 
                        callback("focus");                      
                };
                
                function onBlur(e) {
                        outerWrapper.className = outerWrapper.className.replace(/focused|fd-fc-slider-hover|fd-slider-hover/g,'');
                        if(mouseWheelEnabled && !noMWheel) {
                                removeEvent(document, 'mousewheel', trackMouseWheel);
                                removeEvent(window, 'DOMMouseScroll', trackMouseWheel);
                                if(!window.opera) removeEvent(window,   'mousewheel', trackMouseWheel);
                        };
                        callback("blur");
                };
                
                function trackMouseWheel(e) {
                        if(!kbEnabled) return;
                        e = e || window.event;
                        var delta = 0;
                            
                        if (e.wheelDelta) {
                                delta = e.wheelDelta/120;
                                if (window.opera && window.opera.version() < 9.2) delta = -delta;
                        } else if(e.detail) {
                                delta = -e.detail/3;
                        };
                        
                        if(vertical) { delta = -delta; };
                        
                        if(delta) {
                                var xtmp = vertical ? handle.offsetTop : handle.offsetLeft;
                                xtmp = (delta < 0) ? Math.ceil(xtmp + deltaPx) : Math.floor(xtmp - deltaPx);                                
                                pixelsToValue(Math.min(Math.max(xtmp, 0), maxPx));
                        }
                        return stopEvent(e);
                };                  
                
                function onKeyPress(e) {                        
                        e = e || document.parentWindow.event;                         
                        if ((e.keyCode >= 33 && e.keyCode <= 40) || !kbEnabled || e.keyCode == 45 || e.keyCode == 46) {                                 
                                return stopEvent(e);
                        };
                        return true;
                };               
                        
                function onKeyDown(e) {
                        if(!kbEnabled) return true;

                        e = e || document.parentWindow.event;
                        var kc = e.keyCode != null ? e.keyCode : e.charCode;
                        
                        if ( kc < 33 || (kc > 40 && (kc != 45 && kc != 46))) return true;

                        var value = tagName == "input" ? parseFloat(inp.value) : inp.selectedIndex;
                        if(isNaN(value) || value < Math.min(min,max)) value = Math.min(min,max);    
                        
                        if( kc == 37 || kc == 40 || kc == 46 || kc == 34) {
                                // left, down, ins, page down                                                              
                                value -= (e.ctrlKey || kc == 34 ? maxInc : inc)
                        } else if( kc == 39 || kc == 38 || kc == 45 || kc == 33) {
                                // right, up, del, page up                                                                  
                                value += (e.ctrlKey || kc == 33 ? maxInc : inc)
                        } else if( kc == 35 ) {
                                // max                                
                                value = max;
                        } else if( kc == 36 ) {
                                // min                                
                                value = min;
                        };  
                        
                        valueToPixels(value);
                        callback("update");
                        
                        // Opera doesn't let us cancel key events so the up/down arrows and home/end buttons will scroll the screen - which sucks
                        return stopEvent(e);
                };                                     
                               
                function onMouseOver( e ) {
                        /*@cc_on@*/
                        /*@if(@_jscript_version <= 5.6)
                        if(this.className.search(/focused/) != -1) {
                                this.className = this.className.replace("fd-fc-slider-hover", "") +' fd-fc-slider-hover';
                                return;
                        }
                        /*@end@*/
                        this.className = this.className.replace(/fd\-slider\-hover/g,"") +' fd-slider-hover';
                };  
                              
                function onMouseOut( e ) {
                        /*@cc_on@*/
                        /*@if(@_jscript_version <= 5.6)
                        if(this.className.search(/focused/) != -1) {
                                this.className = this.className.replace("fd-fc-slider-hover", "");
                                return;
                        }
                        /*@end@*/
                        this.className = this.className.replace(/fd\-slider\-hover/g,"");
                };
                
                function onHandleMouseUp(e) {
                        e = e || window.event;
                        removeEvent(document, 'mousemove', trackMouse);
                        removeEvent(document, 'mouseup',   onHandleMouseUp);
                        
                        kbEnabled = true;

                        // Opera fires the blur event when the mouseup event occurs on a button, so we attept to force a focus
                        if(window.opera) try { setTimeout(function() { onfocus(); }, 0); } catch(err) {};
                        document.body.className = document.body.className.replace(/slider-drag-vertical|slider-drag-horizontal/g, "");
                              
                        return stopEvent(e);
                };
                
                function onHandleMouseDown(e) {
                        e = e || window.event;
                        mousePos  = vertical ? e.clientY : e.clientX;
                        handlePos = parseInt(vertical ? handle.offsetTop : handle.offsetLeft)||0;                        
                        kbEnabled = false;
                        
                        clearTimeout(timer);
                        timer = null;
                                
                        addEvent(document, 'mousemove', trackMouse);
                        addEvent(document, 'mouseup', onHandleMouseUp);
                                
                        // Force a "focus" on the button on mouse events
                        if(window.devicePixelRatio || (document.all && !window.opera)) try { setTimeout(function() { handle.focus(); }, 0); } catch(err) {};
                        
                        document.body.className += " slider-drag-" + (vertical ? "vertical" : "horizontal");
                };
                
                function onMouseUp( e ) {
                        e = e || window.event;
                        removeEvent(document, 'mouseup', onMouseUp);
                        if(!useTween) {
                                clearTimeout(timer);
                                timer = null;
                                kbEnabled = true;
                        };                        
                        return stopEvent(e);
                };
                
                function trackMouse( e ) {                                                  
                        e = e || window.event;                        
                        pixelsToValue(snapToNearestValue(handlePos + (vertical ? e.clientY - mousePos : e.clientX - mousePos)));                                          
                };
                
                function onMouseDown( e ) {
                        e = e || window.event;
                        var targ;                          
                        if (e.target) targ = e.target;
                        else if (e.srcElement) targ = e.srcElement;
                        if (targ.nodeType == 3) targ = targ.parentNode;

                        if(targ.className.search("fd-slider-handle") != -1) { return true; };
                                
                        try { setTimeout(function() { handle.focus(); }, 0); } catch(err) { };                                               
                        
                        clearTimeout(timer);
                        locate();
                        
                        timer     = null;
                        kbEnabled = false;                           
                        
                        var posx        = 0,
                            sLft        = 0,
                            sTop        = 0;

                        // Internet Explorer doctype woes
                        if (document.documentElement && document.documentElement.scrollTop) {
                                sTop = document.documentElement.scrollTop;
                                sLft = document.documentElement.scrollLeft;
                        } else if (document.body) {
                                sTop = document.body.scrollTop;
                                sLft = document.body.scrollLeft;
                        };

                        if (e.pageX)            posx = vertical ? e.pageY : e.pageX;
                        else if (e.clientX)     posx = vertical ? e.clientY + sTop : e.clientX + sLft;
                        posx -= vertical ? y + Math.round(handle.offsetHeight / 2) : x + Math.round(handle.offsetWidth / 2);                         
                        posx = snapToNearestValue(posx);                         
                        
                        if(useTween) {
                                tweenTo(posx);
                        } else if(clickJump) {
                                pixelsToValue(posx);
                        } else {
                                addEvent(document, 'mouseup', onMouseUp);
                                destPos = posx;
                                onTimer();
                        };                    
                };

                function incrementHandle(numOfSteps) { 
                        var value = tagName == "input" ? parseFloat(inp.value) : inp.selectedIndex;
                        if(isNaN(value) || value < Math.min(min,max)) value = Math.min(min,max);  
                        value += inc * numOfSteps;
                        valueToPixels(value);                                               
                };
                
                function snapToNearestValue(px) {
                        var rem = px % stepPx;
                        if(rem && rem >= (stepPx / 2)) { px += (stepPx - rem); } 
                        else { px -= rem;  };                        
                        return Math.min(Math.max(parseInt(px, 10), 0), maxPx);        
                };                 
                
                function locate(){
                        var curleft = 0,
                            curtop  = 0,
                            obj     = outerWrapper;
                            
                        // Try catch for IE's benefit
                        try {
                                while (obj.offsetParent) {
                                        curleft += obj.offsetLeft;
                                        curtop  += obj.offsetTop;
                                        obj      = obj.offsetParent;
                                };
                        } catch(err) {};
                        x = curleft;
                        y = curtop;
                };
                
                function onTimer() {
                        var xtmp = vertical ? handle.offsetTop : handle.offsetLeft;
                        xtmp = Math.round((destPos < xtmp) ? Math.max(destPos, Math.floor(xtmp - deltaPx)) : Math.min(destPos, Math.ceil(xtmp + deltaPx)));                  
                        pixelsToValue(xtmp);
                        if(xtmp != destPos) timer = setTimeout(onTimer, steps > 20 ? 50 : 100);
                        else kbEnabled = true;
                };

                var tween = function(){
                        frame++;
                        var c = tweenC,
                            d = 20,
                            t = frame,
                            b = tweenB,
                            x = Math.ceil((t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b);

                        pixelsToValue(t == d ? tweenX : x);
                        callback("move");
                        if(t!=d) timer = setTimeout(tween, 20);
                        else {
                                clearTimeout(timer);
                                timer     = null;
                                kbEnabled = true;
                        };
                };

                function tweenTo(tx){
                        kbEnabled = false;
                        tweenX = parseInt(tx, 10);
                        tweenB = parseInt(vertical ? handle.style.top : handle.style.left, 10);
                        tweenC = tweenX - tweenB;
                        tweenD = 20;
                        frame  = 0;
                        if(!timer) timer = setTimeout(tween, 20);
                };
                
                function pixelsToValue(px) {                       
                        handle.style[vertical ? "top" : "left"] = px + "px";                                                                                                                              
                        var val = min + (Math.round(px / stepPx) * inc);                                                                                                                                                      
                        setInputValue((tagName == "select" || inc == 1) ? Math.round(val) : val);                         
                };
                
                function valueToPixels(val) {
                        var value = isNaN(val) ? tagName == "input" ? parseFloat(inp.value) : inp.selectedIndex : val;
                        if(isNaN(value) || value < Math.min(min,max)) value = Math.min(min,max);
                        else if(value > Math.max(min,max)) value = Math.max(min,max);                         
                        setInputValue(value);                                                                    
                        handle.style[vertical ? "top" : "left"] = Math.round(((value - min) / inc) * stepPx) + "px";                                                                                                                                 
                };

                function setInputValue(val) {                                             
                        val = isNaN(val) ? min : val; 
                        if(tagName == "select") {
                                try {                                               
                                        val = parseInt(val, 10);
                                        if(inp.selectedIndex == val) return;
                                        inp.options[val].selected = true;                                                                             
                                } catch (err) {};
                        } else {                                                                                                                                                                                                                                                                               
                                val = (min + (Math.round((val - min) / inc) * inc)).toFixed(precision);    
                                if(inp.value == val) return;
                                inp.value = val;                                 
                        };
                        updateAriaValues();                        
                        callback("update");
                };
                
                function findLabel() {
                        var label;
                        if(inp.parentNode && inp.parentNode.tagName.toLowerCase() == "label") label = inp.parentNode;
                        else {
                                var labelList = document.getElementsByTagName('label');
                                // loop through label array attempting to match each 'for' attribute to the id of the current element
                                for(var i = 0, lbl; lbl = labelList[i]; i++) {
                                        // Internet Explorer requires the htmlFor test
                                        if((lbl['htmlFor'] && lbl['htmlFor'] == inp.id) || (lbl.getAttribute('for') == inp.id)) {
                                                label = lbl;
                                                break;
                                        };
                                };
                        };
                        if(label && !label.id) { label.id = inp.id + "_label"; };
                        return label;
                };
                
                function updateAriaValues() {
                        handle.setAttribute("aria-valuenow",  tagName == "select" ? inp.options[inp.selectedIndex].value : inp.value);
                        handle.setAttribute("aria-valuetext", tagName == "select" ? inp.options[inp.selectedIndex].text  : inp.value);
                };
                
                function onChange( e ) {
                        valueToPixels();
                        callback("update"); 
                        return true;
                };                  
              
                (function() { 
                        if(hideInput) { inp.className += " fd_hide_slider_input"; }
                        else { addEvent(inp, 'change', onChange); };

                        outerWrapper              = document.createElement('div');
                        outerWrapper.className    = "fd-slider" + (vertical ? "-vertical " : " ") + classNames;
                        outerWrapper.id           = "fd-slider-" + inp.id;

                        wrapper                   = document.createElement('span');
                        wrapper.className         = "fd-slider-inner";

                        bar                       = document.createElement('span');
                        bar.className             = "fd-slider-bar";

                        if(fullARIA) {
                                handle            = document.createElement('span');
                                handle.setAttribute(!/*@cc_on!@*/false ? "tabIndex" : "tabindex", "0");
                        } else {
                                handle            = document.createElement('button');                                 
                                handle.setAttribute("type", "button");
                        };
                        
                        handle.className          = "fd-slider-handle";
						handle.style.height = h+'px'; 
                        handle.appendChild(document.createTextNode(String.fromCharCode(160)));                         
                        
                        outerWrapper.appendChild(wrapper);
                        outerWrapper.appendChild(bar);
                        outerWrapper.appendChild(handle);
                        
                        inp.parentNode.insertBefore(outerWrapper, inp);

                        /*@cc_on@*/
                        /*@if(@_win32)
                        handle.unselectable       = "on";
                        bar.unselectable          = "on";
                        wrapper.unselectable      = "on";
                        outerWrapper.unselectable = "on";
                        /*@end@*/

                        addEvent(outerWrapper, "mouseover", onMouseOver);
                        addEvent(outerWrapper, "mouseout",  onMouseOut);
                        addEvent(outerWrapper, "mousedown", onMouseDown);                        
                        if(!window.opera) {
                                addEvent(handle, "keydown",   onKeyDown);  
                                addEvent(handle, "keypress",  onKeyPress); 
                        } else {
                                addEvent(handle, "keypress",  onKeyDown);
                        };
                        addEvent(handle, "focus",     onFocus);
                        addEvent(handle, "blur",      onBlur);                       
                        addEvent(handle, "mousedown", onHandleMouseDown);
                        addEvent(handle, "mouseup",   onHandleMouseUp); 
                        
                        // Add ARIA accessibility info programmatically                         
                        handle.setAttribute("role",           "slider");
                        handle.setAttribute("aria-valuemin",  min);
                        handle.setAttribute("aria-valuemax",  max);                     
                        
                        var lbl = findLabel();
                        if(lbl) {                                 
                                handle.setAttribute("aria-labelledby", lbl.id);
                                handle.id = "fd-slider-handle-" + inp.id;
                                /*@cc_on
                                /*@if(@_win32)
                                lbl.setAttribute("htmlFor", handle.id);
                                @else @*/
                                lbl.setAttribute("for", handle.id);
                                /*@end
                                @*/
                        };
                        
                        // Are there page instructions - the creation of the instructions has been left up to you fine reader...
                        if(document.getElementById("fd_slider_describedby")) {                                  
                                handle.setAttribute("aria-describedby", "fd_slider_describedby");  // aaa:describedby
                        };
                                                       
                        updateAriaValues();                        
                        callback("create");                            
                        redraw();                                                                                  
                })();
               
                return {
                        onResize:       function(e) { if(outerWrapper.offsetHeight != sliderH || outerWrapper.offsetWidth != sliderW) { redraw(); }; },
                        destroy:        function()  { destroySlider(); },
                        reset:          function()  { valueToPixels(); },
                        increment:      function(n) { incrementHandle(n); }
                };
        }; 
           
//        addEvent(window, "load",   init);
        addEvent(window, "unload", unload);
        addEvent(window, "resize", resize);
        /*@cc_on@*/
        /*@if(@_win32)
        var onload = function(e) {
                for(slider in sliders) { sliders[slider].reset(); }
        };                   
        addEvent(window, "load", function() { setTimeout(onload, 200) });
        /*@end@*/
                
        return {                          
                        create:                 function(elem) { init(elem) },                        
                        destroyAll:             function() { destroyAllsliders(); },
                        destroySlider:          function(id) { return destroySingleSlider(id); },
                        redrawAll:              function() { resize(); },
                        increment:              function(id, numSteps) { if(!(id in sliders)) { return false; }; sliders[id].increment(numSteps); },
                        addEvent:               addEvent,
                        removeEvent:            removeEvent,
                        stopEvent:              stopEvent,
                        disableMouseWheel:      function() { removeMouseWheelSupport(); },
                        removeOnLoadEvent:      function() { removeOnloadEvent(); }                      
        }
})();             
                       
     
//--------------------------------------------------
/**
 * Application : CF WCMS CORE
 * File        : _js/swfLiveConnect.js
 * @version    : 0.1
 * @author     : acn <acn@getunik.com>
 * @copyright  : copyright 17.07.2006 by http://www.getunik.com
 * 
 * Long desc:
 * Object oriented javascript function library to communicate with flash variables.
 * Please recognise that the flash variables must be accordingly prepared!
 *
 * Version-History:
 * 17.07.2006.getunik.acn : initial release
 */


/**
 * main function to initiate a new swf object
 *   - open a own data storage container, containing the specified swf movie as an object.
 *
 * @param  string  sSwfObjectName  the name oft the html element id containing the swf embed code 
 */
function swfLiveConnect(sSwfObjectName)
{
	
	this.sSwfObjectName = "";
	this.oSwfObject     = new Object();
	this.bProcStat      = false;
	this.bSwfDone       = false;
	
	if(sSwfObjectName != undefined && sSwfObjectName != '' || typeof(sSwfObjectName) == 'string')
	{
		this.sSwfObjectName = sSwfObjectName;
		
		// initiate the flash movie as js object depending on browser version
		// ie
		if(!this.bSwfDone)
		{
			if(document.all)
			{
				if(document.all[this.sSwfObjectName]){
					this.oSwfObject = document.all[this.sSwfObjectName];
					this.bSwfDone = true;
				}
				// opera
				if(window.opera)
				{
					var movie = eval(window.document + this.sSwfObjectName);
			    if(movie.SetVariable)
					{
						this.oSwfObject = movie;
						this.bSwfDone = true;
					}
				}
				return;
			}
		}
		
		// netscape
		if(!this.bSwfDone)
		{
			if(document.layers)
			{
				if(document.embeds)
				{
					var movie = document.embeds[this.sSwfObjectName];
					if(movie.SetVariable)
					{
						this.oSwfObject = movie;
						this.bSwfDone = true;
					}
				}
				return;
			}
		}
		
		// firefox
		if(!this.bSwfDone)
		{
			if(document.getElementById)
			{
				var movie = document.getElementById(this.sSwfObjectName);
				if(movie.SetVariable)
				{
					this.oSwfObject = movie;
					this.bSwfDone = true;
				}
				return;
			}
		}
		
		if(!this.bSwfDone)
		{
			alert('swfLiveConnect.js\nError within swfLiveConnect():\nProblem to initiate the object \'oSwfObject\'!');
			this.bProcStat = false;
		}
		else
		{
			this.bProcStat = true;
		}
		
	}
	else
	{
		alert('swfLiveConnect.js\nError within swfLiveConnect():\nSubmitted data are corrupt!');
	}
}


/**
 * function to set swf variables, using the object initiated by 'swfLiveConnect()'
 *
 * @param  string  sParamName   the name of the parameter which should be set
 * @param  string  sParamValue  the value of the parameter which should be set
 */
swfLiveConnect.prototype.setSwfParam = function(sParamName, sParamValue)
{
	if(sParamName != undefined && sParamName != '' && typeof(sParamName) == 'string' && sParamValue != undefined)
	{
		this.oSwfObject.SetVariable(sParamName, sParamValue);
	}
	else
	{
		alert('swfLiveConnect.js\nError within setSwfParam():\nSubmitted data are corrupt!');
	}
}


/**
 * function to get swf variables, using the object initiated by 'swfLiveConnect()'
 *
 * @param  string  sParamName  the name of the parameter which should be readed
*/
swfLiveConnect.prototype.getSwfParam = function(sParamName)
{
	if(sParamName != undefined && sParamName != '' && typeof(sParamName) == 'string')
	{
		sSwfParamValue = "";
		sSwfParamValue = this.oSwfObject.GetVariable(sParamName);
		return sSwfParamValue;
	}
	else
	{
		alert('swfLiveConnect.js\nError within getSwfParam():\nPlease specify the param name!');
	}
}
//--------------------------------------------------
/* SWFObject v2.1 <http://code.google.com/p/swfobject/>
	Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
	This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return }f(H);if(h.ie&&h.win){try{K.write("<script id=__ie_ondomload defer=true src=//:><\/script>");J=C("__ie_ondomload");if(J){I(J,"onreadystatechange",S)}}catch(q){}}if(h.webkit&&typeof K.readyState!=b){Z=setInterval(function(){if(/loaded|complete/.test(K.readyState)){E()}},10)}if(typeof K.addEventListener!=b){K.addEventListener("DOMContentLoaded",E,null)}R(E)}();function S(){if(J.readyState=="complete"){J.parentNode.removeChild(J);E()}}function E(){if(e){return }if(h.ie&&h.win){var v=a("span");try{var u=K.getElementsByTagName("body")[0].appendChild(v);u.parentNode.removeChild(u)}catch(w){return }}e=true;if(Z){clearInterval(Z);Z=null}var q=o.length;for(var r=0;r<q;r++){o[r]()}}function f(q){if(e){q()}else{o[o.length]=q}}function R(r){if(typeof j.addEventListener!=b){j.addEventListener("load",r,false)}else{if(typeof K.addEventListener!=b){K.addEventListener("load",r,false)}else{if(typeof j.attachEvent!=b){I(j,"onload",r)}else{if(typeof j.onload=="function"){var q=j.onload;j.onload=function(){q();r()}}else{j.onload=r}}}}}function H(){var t=N.length;for(var q=0;q<t;q++){var u=N[q].id;if(h.pv[0]>0){var r=C(u);if(r){N[q].width=r.getAttribute("width")?r.getAttribute("width"):"0";N[q].height=r.getAttribute("height")?r.getAttribute("height"):"0";if(c(N[q].swfVersion)){if(h.webkit&&h.webkit<312){Y(r)}W(u,true)}else{if(N[q].expressInstall&&!A&&c("6.0.65")&&(h.win||h.mac)){k(N[q])}else{O(r)}}}}else{W(u,true)}}}function Y(t){var q=t.getElementsByTagName(Q)[0];if(q){var w=a("embed"),y=q.attributes;if(y){var v=y.length;for(var u=0;u<v;u++){if(y[u].nodeName=="DATA"){w.setAttribute("src",y[u].nodeValue)}else{w.setAttribute(y[u].nodeName,y[u].nodeValue)}}}var x=q.childNodes;if(x){var z=x.length;for(var r=0;r<z;r++){if(x[r].nodeType==1&&x[r].nodeName=="PARAM"){w.setAttribute(x[r].getAttribute("name"),x[r].getAttribute("value"))}}}t.parentNode.replaceChild(w,t)}}function k(w){A=true;var u=C(w.id);if(u){if(w.altContentId){var y=C(w.altContentId);if(y){M=y;l=w.altContentId}}else{M=G(u)}if(!(/%$/.test(w.width))&&parseInt(w.width,10)<310){w.width="310"}if(!(/%$/.test(w.height))&&parseInt(w.height,10)<137){w.height="137"}K.title=K.title.slice(0,47)+" - Flash Player Installation";var z=h.ie&&h.win?"ActiveX":"PlugIn",q=K.title,r="MMredirectURL="+j.location+"&MMplayerType="+z+"&MMdoctitle="+q,x=w.id;if(h.ie&&h.win&&u.readyState!=4){var t=a("div");x+="SWFObjectNew";t.setAttribute("id",x);u.parentNode.insertBefore(t,u);u.style.display="none";var v=function(){u.parentNode.removeChild(u)};I(j,"onload",v)}U({data:w.expressInstall,id:m,width:w.width,height:w.height},{flashvars:r},x)}}function O(t){if(h.ie&&h.win&&t.readyState!=4){var r=a("div");t.parentNode.insertBefore(r,t);r.parentNode.replaceChild(G(t),r);t.style.display="none";var q=function(){t.parentNode.removeChild(t)};I(j,"onload",q)}else{t.parentNode.replaceChild(G(t),t)}}function G(v){var u=a("div");if(h.win&&h.ie){u.innerHTML=v.innerHTML}else{var r=v.getElementsByTagName(Q)[0];if(r){var w=r.childNodes;if(w){var q=w.length;for(var t=0;t<q;t++){if(!(w[t].nodeType==1&&w[t].nodeName=="PARAM")&&!(w[t].nodeType==8)){u.appendChild(w[t].cloneNode(true))}}}}}return u}function U(AG,AE,t){var q,v=C(t);if(v){if(typeof AG.id==b){AG.id=t}if(h.ie&&h.win){var AF="";for(var AB in AG){if(AG[AB]!=Object.prototype[AB]){if(AB.toLowerCase()=="data"){AE.movie=AG[AB]}else{if(AB.toLowerCase()=="styleclass"){AF+=' class="'+AG[AB]+'"'}else{if(AB.toLowerCase()!="classid"){AF+=" "+AB+'="'+AG[AB]+'"'}}}}}var AD="";for(var AA in AE){if(AE[AA]!=Object.prototype[AA]){AD+='<param name="'+AA+'" value="'+AE[AA]+'" />'}}v.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AF+">"+AD+"</object>";i[i.length]=AG.id;q=C(AG.id)}else{if(h.webkit&&h.webkit<312){var AC=a("embed");AC.setAttribute("type",P);for(var z in AG){if(AG[z]!=Object.prototype[z]){if(z.toLowerCase()=="data"){AC.setAttribute("src",AG[z])}else{if(z.toLowerCase()=="styleclass"){AC.setAttribute("class",AG[z])}else{if(z.toLowerCase()!="classid"){AC.setAttribute(z,AG[z])}}}}}for(var y in AE){if(AE[y]!=Object.prototype[y]){if(y.toLowerCase()!="movie"){AC.setAttribute(y,AE[y])}}}v.parentNode.replaceChild(AC,v);q=AC}else{var u=a(Q);u.setAttribute("type",P);for(var x in AG){if(AG[x]!=Object.prototype[x]){if(x.toLowerCase()=="styleclass"){u.setAttribute("class",AG[x])}else{if(x.toLowerCase()!="classid"){u.setAttribute(x,AG[x])}}}}for(var w in AE){if(AE[w]!=Object.prototype[w]&&w.toLowerCase()!="movie"){F(u,w,AE[w])}}v.parentNode.replaceChild(u,v);q=u}}}return q}function F(t,q,r){var u=a("param");u.setAttribute("name",q);u.setAttribute("value",r);t.appendChild(u)}function X(r){var q=C(r);if(q&&(q.nodeName=="OBJECT"||q.nodeName=="EMBED")){if(h.ie&&h.win){if(q.readyState==4){B(r)}else{j.attachEvent("onload",function(){B(r)})}}else{q.parentNode.removeChild(q)}}}function B(t){var r=C(t);if(r){for(var q in r){if(typeof r[q]=="function"){r[q]=null}}r.parentNode.removeChild(r)}}function C(t){var q=null;try{q=K.getElementById(t)}catch(r){}return q}function a(q){return K.createElement(q)}function I(t,q,r){t.attachEvent(q,r);d[d.length]=[t,q,r]}function c(t){var r=h.pv,q=t.split(".");q[0]=parseInt(q[0],10);q[1]=parseInt(q[1],10)||0;q[2]=parseInt(q[2],10)||0;return(r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?true:false}function V(v,r){if(h.ie&&h.mac){return }var u=K.getElementsByTagName("head")[0],t=a("style");t.setAttribute("type","text/css");t.setAttribute("media","screen");if(!(h.ie&&h.win)&&typeof K.createTextNode!=b){t.appendChild(K.createTextNode(v+" {"+r+"}"))}u.appendChild(t);if(h.ie&&h.win&&typeof K.styleSheets!=b&&K.styleSheets.length>0){var q=K.styleSheets[K.styleSheets.length-1];if(typeof q.addRule==Q){q.addRule(v,r)}}}function W(t,q){var r=q?"visible":"hidden";if(e&&C(t)){C(t).style.visibility=r}else{V("#"+t,"visibility:"+r)}}function g(s){var r=/[\\\"<>\.;]/;var q=r.exec(s)!=null;return q?encodeURIComponent(s):s}var D=function(){if(h.ie&&h.win){window.attachEvent("onunload",function(){var w=d.length;for(var v=0;v<w;v++){d[v][0].detachEvent(d[v][1],d[v][2])}var t=i.length;for(var u=0;u<t;u++){X(i[u])}for(var r in h){h[r]=null}h=null;for(var q in swfobject){swfobject[q]=null}swfobject=null})}}();return{registerObject:function(u,q,t){if(!h.w3cdom||!u||!q){return }var r={};r.id=u;r.swfVersion=q;r.expressInstall=t?t:false;N[N.length]=r;W(u,false)},getObjectById:function(v){var q=null;if(h.w3cdom){var t=C(v);if(t){var u=t.getElementsByTagName(Q)[0];if(!u||(u&&typeof t.SetVariable!=b)){q=t}else{if(typeof u.SetVariable!=b){q=u}}}}return q},embedSWF:function(x,AE,AB,AD,q,w,r,z,AC){if(!h.w3cdom||!x||!AE||!AB||!AD||!q){return }AB+="";AD+="";if(c(q)){W(AE,false);var AA={};if(AC&&typeof AC===Q){for(var v in AC){if(AC[v]!=Object.prototype[v]){AA[v]=AC[v]}}}AA.data=x;AA.width=AB;AA.height=AD;var y={};if(z&&typeof z===Q){for(var u in z){if(z[u]!=Object.prototype[u]){y[u]=z[u]}}}if(r&&typeof r===Q){for(var t in r){if(r[t]!=Object.prototype[t]){if(typeof y.flashvars!=b){y.flashvars+="&"+t+"="+r[t]}else{y.flashvars=t+"="+r[t]}}}}f(function(){U(AA,y,AE);if(AA.id==AE){W(AE,true)}})}else{if(w&&!A&&c("6.0.65")&&(h.win||h.mac)){A=true;W(AE,false);f(function(){var AF={};AF.id=AF.altContentId=AE;AF.width=AB;AF.height=AD;AF.expressInstall=w;k(AF)})}}},getFlashPlayerVersion:function(){return{major:h.pv[0],minor:h.pv[1],release:h.pv[2]}},hasFlashPlayerVersion:c,createSWF:function(t,r,q){if(h.w3cdom){return U(t,r,q)}else{return undefined}},removeSWF:function(q){if(h.w3cdom){X(q)}},createCSS:function(r,q){if(h.w3cdom){V(r,q)}},addDomLoadEvent:f,addLoadEvent:R,getQueryParamValue:function(v){var u=K.location.search||K.location.hash;if(v==null){return g(u)}if(u){var t=u.substring(1).split("&");for(var r=0;r<t.length;r++){if(t[r].substring(0,t[r].indexOf("="))==v){return g(t[r].substring((t[r].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(A&&M){var q=C(m);if(q){q.parentNode.replaceChild(M,q);if(l){W(l,true);if(h.ie&&h.win){M.style.display="block"}}M=null;l=null;A=false}}}}}();
//--------------------------------------------------
/**
 * SWFObject v1.4: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * **SWFObject is the SWF embed script formerly known as FlashObject. The name was changed for
 *   legal reasons.
 */
if(typeof deconcept=="undefined"){var deconcept=new Object();}
if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}
if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}
deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){
if(!document.createElement||!document.getElementById){return;}
this.DETECT_KEY=_b?_b:"detectflash";
this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);
this.params=new Object();
this.variables=new Object();
this.attributes=new Array();
if(_1){this.setAttribute("swf",_1);}
if(id){this.setAttribute("id",id);}
if(w){this.setAttribute("width",w);}
if(h){this.setAttribute("height",h);}
if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}
this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion(this.getAttribute("version"),_7);
if(c){this.addParam("bgcolor",c);}
var q=_8?_8:"high";
this.addParam("quality",q);
this.setAttribute("useExpressInstall",_7);
this.setAttribute("doExpressInstall",false);
var _d=(_9)?_9:window.location;
this.setAttribute("xiRedirectUrl",_d);
this.setAttribute("redirectUrl","");
if(_a){this.setAttribute("redirectUrl",_a);}};
deconcept.SWFObject.prototype={setAttribute:function(_e,_f){
this.attributes[_e]=_f;
},getAttribute:function(_10){
return this.attributes[_10];
},addParam:function(_11,_12){
this.params[_11]=_12;
},getParams:function(){
return this.params;
},addVariable:function(_13,_14){
this.variables[_13]=_14;
},getVariable:function(_15){
return this.variables[_15];
},getVariables:function(){
return this.variables;
},getVariablePairs:function(){
var _16=new Array();
var key;
var _18=this.getVariables();
for(key in _18){
_16.push(key+"="+_18[key]);}
return _16;
},getSWFHTML:function(){
var _19="";
if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");}
_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";
_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";
var _1a=this.getParams();
for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}
var _1c=this.getVariablePairs().join("&");
if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}
_19+="/>";
}else{
if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";
_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";
var _1d=this.getParams();
for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}
var _1f=this.getVariablePairs().join("&");
if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}
_19+="</object>";}
return _19;
},write:function(_20){
if(this.getAttribute("useExpressInstall")){
var _21=new deconcept.PlayerVersion([6,0,65]);
if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){
this.setAttribute("doExpressInstall",true);
this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));
document.title=document.title.slice(0,47)+" - Flash Player Installation";
this.addVariable("MMdoctitle",document.title);}}
if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){
var n=(typeof _20=="string")?document.getElementById(_20):_20;
n.innerHTML=this.getSWFHTML();
return true;
}else{
if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}
return false;}};
deconcept.SWFObjectUtil.getPlayerVersion=function(_23,_24){
var _25=new deconcept.PlayerVersion([0,0,0]);
if(navigator.plugins&&navigator.mimeTypes.length){
var x=navigator.plugins["Shockwave Flash"];
if(x&&x.description){_25=new deconcept.PlayerVersion(x.description.replace(/([a-z]|[A-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}
}else{try{
var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
for(var i=3;axo!=null;i++){
axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i);
_25=new deconcept.PlayerVersion([i,0,0]);}}
catch(e){}
if(_23&&_25.major>_23.major){return _25;}
if(!_23||((_23.minor!=0||_23.rev!=0)&&_25.major==_23.major)||_25.major!=6||_24){
try{_25=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}
catch(e){}}}
return _25;};
deconcept.PlayerVersion=function(_29){
this.major=parseInt(_29[0])!=null?parseInt(_29[0]):0;
this.minor=parseInt(_29[1])||0;
this.rev=parseInt(_29[2])||0;};
deconcept.PlayerVersion.prototype.versionIsValid=function(fv){
if(this.major<fv.major){return false;}
if(this.major>fv.major){return true;}
if(this.minor<fv.minor){return false;}
if(this.minor>fv.minor){return true;}
if(this.rev<fv.rev){return false;}return true;};
deconcept.util={getRequestParameter:function(_2b){
var q=document.location.search||document.location.hash;
if(q){
var _2d=q.indexOf(_2b+"=");
var _2e=(q.indexOf("&",_2d)>-1)?q.indexOf("&",_2d):q.length;
if(q.length>1&&_2d>-1){
return q.substring(q.indexOf("=",_2d)+1,_2e);
}}return "";}};
if(Array.prototype.push==null){
Array.prototype.push=function(_2f){
this[this.length]=_2f;
return this.length;};}
var getQueryParamValue=deconcept.util.getRequestParameter;
var FlashObject=deconcept.SWFObject; // for backwards compatibility
var SWFObject=deconcept.SWFObject;


//--------------------------------------------------
/* 
Methods for resizing the flash stage at runtime.

setFlashWidth(divid, newW)
divid: id of the div containing the flash movie.
newW: new width for flash movie

setFlashWidth(divid, newH)
divid: id of the div containing the flash movie.
newH: new height for flash movie

setFlashSize(divid, newW, newH)
divid: id of the div containing the flash movie.
newW: new width for flash movie
newH: new height for flash movie

canResizeFlash()
returns true if browser supports resizing flash, false if not. 
*/
function setFlashWidth(divid, newW){
	document.getElementById(divid).style.width = newW+"px";
}
function setFlashHeight(divid, newH){
	document.getElementById(divid).style.height = newH+"px";		
}
function setFlashSize(divid, newW, newH){
	setFlashWidth(divid, newW);
	setFlashHeight(divid, newH);
}
function canResizeFlash(){
	var ua = navigator.userAgent.toLowerCase();
	var opera = ua.indexOf("opera");
	if( document.getElementById ){
		if(opera == -1) return true;
		else if(parseInt(ua.substr(opera+6, 1)) >= 7) return true;
	}
	return false;
}
//--------------------------------------------------
/*	Unobtrusive Flash Objects (UFO) v3.20 <http://www.bobbyvandersluis.com/ufo/>
	Copyright 2005, 2006 Bobby van der Sluis
	This software is licensed under the CC-GNU LGPL <http://creativecommons.org/licenses/LGPL/2.1/>
*/

var UFO = {
	req: ["movie", "width", "height", "majorversion", "build"],
	opt: ["play", "loop", "menu", "quality", "scale", "salign", "wmode", "bgcolor", "base", "flashvars", "devicefont", "allowscriptaccess", "seamlesstabbing"],
	optAtt: ["id", "name", "align"],
	optExc: ["swliveconnect"],
	ximovie: "ufo.swf",
	xiwidth: "215",
	xiheight: "138",
	ua: navigator.userAgent.toLowerCase(),
	pluginType: "",
	fv: [0,0],
	foList: [],
		
	create: function(FO, id) {
		if (!UFO.uaHas("w3cdom") || UFO.uaHas("ieMac")) return;
		UFO.getFlashVersion();
		UFO.foList[id] = UFO.updateFO(FO);
		UFO.createCSS("#" + id, "visibility:hidden;");
		UFO.domLoad(id);
	},

	updateFO: function(FO) {
		if (typeof FO.xi != "undefined" && FO.xi == "true") {
			if (typeof FO.ximovie == "undefined") FO.ximovie = UFO.ximovie;
			if (typeof FO.xiwidth == "undefined") FO.xiwidth = UFO.xiwidth;
			if (typeof FO.xiheight == "undefined") FO.xiheight = UFO.xiheight;
		}
		FO.mainCalled = false;
		return FO;
	},

	domLoad: function(id) {
		var _t = setInterval(function() {
			if ((document.getElementsByTagName("body")[0] != null || document.body != null) && document.getElementById(id) != null) {
				UFO.main(id);
				clearInterval(_t);
			}
		}, 250);
		if (typeof document.addEventListener != "undefined") {
			document.addEventListener("DOMContentLoaded", function() { UFO.main(id); clearInterval(_t); } , null); // Gecko, Opera 9+
		}
	},

	main: function(id) {
		var _fo = UFO.foList[id];
		if (_fo.mainCalled) return;
		UFO.foList[id].mainCalled = true;
		document.getElementById(id).style.visibility = "hidden";
		if (UFO.hasRequired(id)) {
			if (UFO.hasFlashVersion(parseInt(_fo.majorversion, 10), parseInt(_fo.build, 10))) {
				if (typeof _fo.setcontainercss != "undefined" && _fo.setcontainercss == "true") UFO.setContainerCSS(id);
				UFO.writeSWF(id);
			}
			else if (_fo.xi == "true" && UFO.hasFlashVersion(6, 65)) {
				UFO.createDialog(id);
			}
		}
		document.getElementById(id).style.visibility = "visible";
	},
	
	createCSS: function(selector, declaration) {
		var _h = document.getElementsByTagName("head")[0]; 
		var _s = UFO.createElement("style");
		if (!UFO.uaHas("ieWin")) _s.appendChild(document.createTextNode(selector + " {" + declaration + "}")); // bugs in IE/Win
		_s.setAttribute("type", "text/css");
		_s.setAttribute("media", "screen"); 
		_h.appendChild(_s);
		if (UFO.uaHas("ieWin") && document.styleSheets && document.styleSheets.length > 0) {
			var _ls = document.styleSheets[document.styleSheets.length - 1];
			if (typeof _ls.addRule == "object") _ls.addRule(selector, declaration);
		}
	},
	
	setContainerCSS: function(id) {
		var _fo = UFO.foList[id];
		var _w = /%/.test(_fo.width) ? "" : "px";
		var _h = /%/.test(_fo.height) ? "" : "px";
		UFO.createCSS("#" + id, "width:" + _fo.width + _w +"; height:" + _fo.height + _h +";");
		if (_fo.width == "100%") {
			UFO.createCSS("body", "margin-left:0; margin-right:0; padding-left:0; padding-right:0;");
		}
		if (_fo.height == "100%") {
			UFO.createCSS("html", "height:100%; overflow:hidden;");
			UFO.createCSS("body", "margin-top:0; margin-bottom:0; padding-top:0; padding-bottom:0; height:100%;");
		}
	},

	createElement: function(el) {
		return (UFO.uaHas("xml") && typeof document.createElementNS != "undefined") ?  document.createElementNS("http://www.w3.org/1999/xhtml", el) : document.createElement(el);
	},

	createObjParam: function(el, aName, aValue) {
		var _p = UFO.createElement("param");
		_p.setAttribute("name", aName);	
		_p.setAttribute("value", aValue);
		el.appendChild(_p);
	},

	uaHas: function(ft) {
		var _u = UFO.ua;
		switch(ft) {
			case "w3cdom":
				return (typeof document.getElementById != "undefined" && typeof document.getElementsByTagName != "undefined" && (typeof document.createElement != "undefined" || typeof document.createElementNS != "undefined"));
			case "xml":
				var _m = document.getElementsByTagName("meta");
				var _l = _m.length;
				for (var i = 0; i < _l; i++) {
					if (/content-type/i.test(_m[i].getAttribute("http-equiv")) && /xml/i.test(_m[i].getAttribute("content"))) return true;
				}
				return false;
			case "ieMac":
				return /msie/.test(_u) && !/opera/.test(_u) && /mac/.test(_u);
			case "ieWin":
				return /msie/.test(_u) && !/opera/.test(_u) && /win/.test(_u);
			case "gecko":
				return /gecko/.test(_u) && !/applewebkit/.test(_u);
			case "opera":
				return /opera/.test(_u);
			case "safari":
				return /applewebkit/.test(_u);
			default:
				return false;
		}
	},
	
	getFlashVersion: function() {
		if (UFO.fv[0] != 0) return;  
		if (navigator.plugins && typeof navigator.plugins["Shockwave Flash"] == "object") {
			UFO.pluginType = "npapi";
			var _d = navigator.plugins["Shockwave Flash"].description;
			if (typeof _d != "undefined") {
				_d = _d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
				var _m = parseInt(_d.replace(/^(.*)\..*$/, "$1"), 10);
				var _r = /r/.test(_d) ? parseInt(_d.replace(/^.*r(.*)$/, "$1"), 10) : 0;
				UFO.fv = [_m, _r];
			}
		}
		else if (window.ActiveXObject) {
			UFO.pluginType = "ax";
			try { // avoid fp 6 crashes
				var _a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
			}
			catch(e) {
				try { 
					var _a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
					UFO.fv = [6, 0];
					_a.AllowScriptAccess = "always"; // throws if fp < 6.47 
				}
				catch(e) {
					if (UFO.fv[0] == 6) return;
				}
				try {
					var _a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
				}
				catch(e) {}
			}
			if (typeof _a == "object") {
				var _d = _a.GetVariable("$version"); // bugs in fp 6.21/6.23
				if (typeof _d != "undefined") {
					_d = _d.replace(/^\S+\s+(.*)$/, "$1").split(",");
					UFO.fv = [parseInt(_d[0], 10), parseInt(_d[2], 10)];
				}
			}
		}
	},

	hasRequired: function(id) {
		var _l = UFO.req.length;
		for (var i = 0; i < _l; i++) {
			if (typeof UFO.foList[id][UFO.req[i]] == "undefined") return false;
		}
		return true;
	},
	
	hasFlashVersion: function(major, release) {
		return (UFO.fv[0] > major || (UFO.fv[0] == major && UFO.fv[1] >= release)) ? true : false;
	},

	writeSWF: function(id) {
		var _fo = UFO.foList[id];
		var _e = document.getElementById(id);
		if (UFO.pluginType == "npapi") {
			if (UFO.uaHas("gecko") || UFO.uaHas("xml")) {
				while(_e.hasChildNodes()) {
					_e.removeChild(_e.firstChild);
				}
				var _obj = UFO.createElement("object");
				_obj.setAttribute("type", "application/x-shockwave-flash");
				_obj.setAttribute("data", _fo.movie);
				_obj.setAttribute("width", _fo.width);
				_obj.setAttribute("height", _fo.height);
				var _l = UFO.optAtt.length;
				for (var i = 0; i < _l; i++) {
					if (typeof _fo[UFO.optAtt[i]] != "undefined") _obj.setAttribute(UFO.optAtt[i], _fo[UFO.optAtt[i]]);
				}
				var _o = UFO.opt.concat(UFO.optExc);
				var _l = _o.length;
				for (var i = 0; i < _l; i++) {
					if (typeof _fo[_o[i]] != "undefined") UFO.createObjParam(_obj, _o[i], _fo[_o[i]]);
				}
				_e.appendChild(_obj);
			}
			else {
				var _emb = "";
				var _o = UFO.opt.concat(UFO.optAtt).concat(UFO.optExc);
				var _l = _o.length;
				for (var i = 0; i < _l; i++) {
					if (typeof _fo[_o[i]] != "undefined") _emb += ' ' + _o[i] + '="' + _fo[_o[i]] + '"';
				}
				_e.innerHTML = '<embed type="application/x-shockwave-flash" src="' + _fo.movie + '" width="' + _fo.width + '" height="' + _fo.height + '" pluginspage="http://www.macromedia.com/go/getflashplayer"' + _emb + '></embed>';
			}
		}
		else if (UFO.pluginType == "ax") {
			var _objAtt = "";
			var _l = UFO.optAtt.length;
			for (var i = 0; i < _l; i++) {
				if (typeof _fo[UFO.optAtt[i]] != "undefined") _objAtt += ' ' + UFO.optAtt[i] + '="' + _fo[UFO.optAtt[i]] + '"';
			}
			var _objPar = "";
			var _l = UFO.opt.length;
			for (var i = 0; i < _l; i++) {
				if (typeof _fo[UFO.opt[i]] != "undefined") _objPar += '<param name="' + UFO.opt[i] + '" value="' + _fo[UFO.opt[i]] + '" />';
			}
			var _p = window.location.protocol == "https:" ? "https:" : "http:";
			_e.innerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + _objAtt + ' width="' + _fo.width + '" height="' + _fo.height + '" codebase="' + _p + '//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=' + _fo.majorversion + ',0,' + _fo.build + ',0"><param name="movie" value="' + _fo.movie + '" />' + _objPar + '</object>';
		}
	},
		
	createDialog: function(id) {
		var _fo = UFO.foList[id];
		UFO.createCSS("html", "height:100%; overflow:hidden;");
		UFO.createCSS("body", "height:100%; overflow:hidden;");
		UFO.createCSS("#xi-con", "position:absolute; left:0; top:0; z-index:1000; width:100%; height:100%; background-color:#fff; filter:alpha(opacity:75); opacity:0.75;");
		UFO.createCSS("#xi-dia", "position:absolute; left:50%; top:50%; margin-left: -" + Math.round(parseInt(_fo.xiwidth, 10) / 2) + "px; margin-top: -" + Math.round(parseInt(_fo.xiheight, 10) / 2) + "px; width:" + _fo.xiwidth + "px; height:" + _fo.xiheight + "px;");
		var _b = document.getElementsByTagName("body")[0];
		var _c = UFO.createElement("div");
		_c.setAttribute("id", "xi-con");
		var _d = UFO.createElement("div");
		_d.setAttribute("id", "xi-dia");
		_c.appendChild(_d);
		_b.appendChild(_c);
		var _mmu = window.location;
		if (UFO.uaHas("xml") && UFO.uaHas("safari")) {
			var _mmd = document.getElementsByTagName("title")[0].firstChild.nodeValue = document.getElementsByTagName("title")[0].firstChild.nodeValue.slice(0, 47) + " - Flash Player Installation";
		}
		else {
			var _mmd = document.title = document.title.slice(0, 47) + " - Flash Player Installation";
		}
		var _mmp = UFO.pluginType == "ax" ? "ActiveX" : "PlugIn";
		var _uc = typeof _fo.xiurlcancel != "undefined" ? "&xiUrlCancel=" + _fo.xiurlcancel : "";
		var _uf = typeof _fo.xiurlfailed != "undefined" ? "&xiUrlFailed=" + _fo.xiurlfailed : "";
		UFO.foList["xi-dia"] = { movie:_fo.ximovie, width:_fo.xiwidth, height:_fo.xiheight, majorversion:"6", build:"65", flashvars:"MMredirectURL=" + _mmu + "&MMplayerType=" + _mmp + "&MMdoctitle=" + _mmd + _uc + _uf };
		UFO.writeSWF("xi-dia");
	},

	expressInstallCallback: function() {
		var _b = document.getElementsByTagName("body")[0];
		var _c = document.getElementById("xi-con");
		_b.removeChild(_c);
		UFO.createCSS("body", "height:auto; overflow:auto;");
		UFO.createCSS("html", "height:auto; overflow:auto;");
	},

	cleanupIELeaks: function() {
		var _o = document.getElementsByTagName("object");
		var _l = _o.length
		for (var i = 0; i < _l; i++) {
			_o[i].style.display = "none";
			for (var x in _o[i]) {
				if (typeof _o[i][x] == "function") {
					_o[i][x] = null;
				}
			}
		}
	}

};

if (typeof window.attachEvent != "undefined" && UFO.uaHas("ieWin")) {
	window.attachEvent("onunload", UFO.cleanupIELeaks);
}

//--------------------------------------------------
/**
 * Application : CF WCMS CUSTOM CORE
 * File        : _js/umt.js
 * @version    : 0.1
 * @author     : acn <acn@getunik.com>
 * @copyright  : copyright 03.11.2006 by http://www.getunik.com
 * 
 * Long desc:
 * Object oriented javascript function library which provide several methods in the context of the UMT.
 *
 * Version-History:
 * 03.11.2006.getunik.acn : initial release
 * 28.11.2006.getunik.acn : several functions within the context of user administration added
 * 01.12.2006.getunik.acn : functions for moving options from one to a other select box added
 */


/**
 * main function to initiate a new umt object
 *
 * @param  object  oFormDomObject  the DOM object oft the html form from which data are gathered and manipulated. 
 */
function umt(oFormDomObject)
{
	
	// internal definitions, a.e. error messages
	this.sFileName       = "- umt.js -\n";
	this.iErrorId        = 0;
	this.aErrorMsg       = new Array();
	this.aErrorMsg[0]    = this.sFileName + "OK!";
	this.aErrorMsg[1]    = this.sFileName + "Unable to initiate the HTML form as a JS object!";
	this.aErrorMsg[2]    = "Please select a CSV file for upload!";
	this.aErrorMsg[3]    = "Please define a number for the start row!";
	this.aErrorMsg[4]    = "Please define a number greater or equals then 1 for the start row!";
	this.aErrorMsg[5]    = "Please insert the username!";
	this.aErrorMsg[6]    = "Please insert a password!";
	this.aErrorMsg[7]    = "The password must contain at least 6 characters!";
	this.aErrorMsg[8]    = "The retyped password is wrong!";
	this.aErrorMsg[9]    = "Please insert the firstname!";
	this.aErrorMsg[10]   = "Please insert the lastname!";
	this.aErrorMsg[11]   = "Please insert the residential address!";
	this.aErrorMsg[12]   = "Please insert the ZIP!";
	this.aErrorMsg[13]   = "Please insert the city!";
	this.aErrorMsg[14]   = "Please select the country!";
	this.aErrorMsg[15]   = "Please insert the e-mail address!";
	this.aErrorMsg[16]   = "Please insert a correct e-mail address!";
	this.aErrorMsg[17]   = "As photosource there are only GIF, JPEG or PNG files possible!";
	this.aErrorMsg[18]   = "Form action is not supported!";
	this.aImageFormat    = new Array();
	this.aImageFormat[0] = "jpg";
	this.aImageFormat[1] = "jpeg";
	this.aImageFormat[2] = "gif";
	this.aImageFormat[3] = "png";
	
	// internal data
	this.oForm     = new Object();
	this.bProcStat = false;
	
	// pretreat data
	if(oFormDomObject == undefined || oFormDomObject == '' || typeof(oFormDomObject) != 'object')
	{
		if(document.forms[0])
		{
			this.oForm     = document.forms[0];
			this.bProcStat = true;
		}
	}
	else
	{
		this.oForm     = oFormDomObject;
		this.bProcStat = true;
	}
	
	if(this.oForm == undefined || this.oForm == '' || typeof(this.oForm) != 'object')
	{
		this.bProcStat = false;
		this.iErrorId  = 1;
		alert(this.aErrorMsg[this.iErrorId]);
	}
	
} // eof umt()


/**
 * build a random string
 */
umt.prototype.randomString = function()
{
	
	// internal data
	var sChars        = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
	var istringLength = 8;
	var sRandomString = "";
	
	// build random string
	for(var i=0; i<istringLength; i++)
	{
		var iRandomPos = Math.floor(Math.random() * sChars.length);
		sRandomString += sChars.substring(iRandomPos, iRandomPos+1);
	}
	
	// return random string
	return sRandomString;
	
} // eof randomString


/**
 * trim a string as known from other programming languages like PHP or JAVA,
 * removes whitespaces at the beginning and ending of sString
 * 
 * @param  string  sString  string for treatment
 */
umt.prototype.trimString = function(sString)
{
	
	// trim string by using regexp
	sString = sString.replace(/^\s+|\s+$/g, "");
	
	// return trimmed string
	return sString;
	
} // eof trimString



/**
 * change the visibility status of the layer
 * 
 * @param  string  sLayerName  the id of the layer for which the visibility has to be changed (id="myLayer").
 */
umt.prototype.changeVisibility = function(sLayerName)
{
	
	// check which DOM model
	if(document.layers)
	{
		// change visibility
		var visi = document.layers[sLayerName].visibility;
		(visi == "hide") ? document.layers[sLayerName].visibility = "show" : document.layers[sLayerName].visibility = "hide";
	}
	else if(document.getElementById)
	{
		// change visibility
		var visi = document.getElementById(sLayerName).style.visibility;
		(visi == "hidden") ? document.getElementById(sLayerName).style.visibility = "visible" : document.getElementById(sLayerName).style.visibility = "hidden";
	}
	else if(document.all)
	{
		// change visibility
		var visi = document.all[sLayerName].style.visibility;
		(visi == "hidden") ? document.all[sLayerName].style.visibility = "visible" : document.all[sLayerName].style.visibility = "hidden";
	}
	
} // eof changeVisibility



/**
 * move selected select box option from one select box to the other
 * 
 * @param  string  sSelectNameFrom  name of the select box from which selected option should be removed
 * @param  string  sSelectNameTo    name of the select box on which the selected option should be added
 */
umt.prototype.selectMoveFromTo = function(sSelectNameFrom, sSelectNameTo)
{
	
	// if select boxes exists
	if(this.bProcStat && this.oForm.elements[sSelectNameFrom] && this.oForm.elements[sSelectNameTo])
	{
		// loop options
		for(i=0; i<this.oForm.elements[sSelectNameFrom].length; i++)
		{
			// check if option is selected ...
			if(this.oForm.elements[sSelectNameFrom].options[i].selected)
			{
				// ... save text and value for further processing
				sText  = this.oForm.elements[sSelectNameFrom].options[i].text;
				sValue = this.oForm.elements[sSelectNameFrom].options[i].value;
				// ... delete option from the actual select box
				this.oForm.elements[sSelectNameFrom].options[i] = null;
				// ... and add-it if its not the default option (value="0") to the target select box
				if(sValue != 0)
				{
					oNewOption = new Option(sText, sValue);
					this.oForm.elements[sSelectNameTo].options[this.oForm.elements[sSelectNameTo].length] = oNewOption;
				}
			}
		}
	}
	
} // eof selectMoveFromTo


/**
 * set the default option within a select box
 * 
 * @param  string   sSelectName       the name of the selectbox
 * @param  string   sText             visible text of the new option
 * @param  string   sValue            hidden value of the new option
 * @param  integer  iIdx              optional (default: 0); index of the option within the select box
 * @param  boolean  bDefaultSelected  optional (default: false); defines if the options should be the per default selected option
 * @param  boolean  bSelected         optional (default: false); defines if the new options should be selected or not
 */
umt.prototype.selectSetDefault = function(sSelectName, sText, sValue, iIdx, bDefaultSelected, bSelected)
{
	
	iFIdx             = 0;
	bFDefaultSelected = false;
	bFSelected        = false;
	
	// if select box exists but she is empty
	if(this.bProcStat && this.oForm.elements[sSelectName] && this.oForm.elements[sSelectName].length == 0 && arguments.length >= 2)
	{
			
		// if optional paramters are set
		if(arguments.length > 3)
		{
			// treat paramters
			for(i=3; i<arguments.length; i++)
			{
				alert(i + "/" + arguments.length + " : " + arguments[i]);
				if(i == 3)
				{
					iFIdx = iIdx;
				}
				if(i == 4)
				{
					bFDefaultSelected = bDefaultSelected;
				}
				if(i == 5)
				{
					bFSelected = bSelected;
				}
			}
		}
		
		// create new option
		oNewOption = new Option(sText, sValue, bFDefaultSelected, bFSelected);
		// add-it to the select box
		this.oForm.elements[sSelectName].options[iFIdx] = oNewOption;
			
	}
	
} // eof selectSetDefault


/**
 * remove default options in select boxes when adding a value from a source select box
 * 
 * @param  string   sSelectNameFrom  the name of the source box (needed for check)
 * @param  string   sSelectNameTo    name of the target select box
 * @param  integer  iIdx             index of the option within the select box which should be replaced
 * @param  string   sText            optional (default: ""); visible text of existing option. when set, check before removement if text is equals or not
 * @param  string   sValue           optional (default: ""); hidden value of existing option. when set, check before removement if value is equals or not
 */
umt.prototype.selectRemoveDefault = function(sSelectNameFrom, sSelectNameTo, iIdx, sText, sValue)
{
	sFText      = "";
	bCheckText  = false;
	sFValue     = "";
	bCheckValue = false;
	bCheck      = false;
	
	// if select box exists
	if(this.bProcStat && this.oForm.elements[sSelectNameTo] && arguments.length >= 3)
	{
		bSelected = false
		// check if at the source select box at least one option is selected
		for(i=0; i<this.oForm.elements[sSelectNameFrom].length; i++)
		{
			if(this.oForm.elements[sSelectNameFrom].options[i].selected)
			{
				bSelected = true;
				break;
			}
		}
		// if at least one option is selected, process
		if(bSelected)
		{
			// if there are optional parameters, remember them for further processing
			for(i=3; i<arguments.length; i++)
			{
				if(i == 3)
				{
					sFText     = sText;
					bCheckText = true;
				}
				if(i == 4)
				{
					sFValue     = sValue;
					bCheckValue = true;
				}
			}
			if(this.oForm.elements[sSelectNameTo].options[iIdx])
			{
				bCheck = true;
			}
			// if optional parameter is set, check
			if(bCheck && bCheckText)
			{
				if(this.oForm.elements[sSelectNameTo].options[iIdx].text == sFText)
				{
					bCheck = true;
				}
				else
				{
					bCheck = false;
				}
			}
			if(bCheck && bCheckValue)
			{
				if(this.oForm.elements[sSelectNameTo].options[iIdx].value == sFValue)
				{
					bCheck = true;
				}
				else
				{
					bCheck = false;
				}
			}
			// delete option
			if(bCheck)
			{
				this.oForm.elements[sSelectNameTo].options[iIdx] = null;
			}
		}
	}
} // eof selectRemoveDefault


/**
 * ceck and submit form data on umt_user_import.cfm
 * 
 * @param  string  sFormAction  the form action (the CFM processing file)
 * @param  string  sMode        the valid and available mode for the CFM processing file
 */
umt.prototype.userImportSubmit = function(sFormAction, sMode)
{
	
	// possible form modes
	aMode    = new Array();
	aMode[0] = "import";
	
	// check form action
	var iCounter = 0;
	for(i=0; i<aMode.length; i++)
	{
		if(aMode[i] == sMode)
		{
			break;
		}
		iCounter += 1;
	}
	if(iCounter == aMode.length)
	{
		this.bProcStat = false;
		this.iErrorId  = 18;
		alert(this.aErrorMsg[this.iErrorId]);
	}
	
	// check data
	if(this.bProcStat)
	{
		// csv file
		sCsvFile = this.oForm.fUmtUserImportCsv.value;
		if(sCsvFile != "" && sCsvFile.length >= 1)
		{
			// check for the file ending "csv"
			iLastIndexOf = this.oForm.fUmtUserImportCsv.value.lastIndexOf(".");
			sFileEnding  = sCsvFile.substring(iLastIndexOf + 1, sCsvFile.length).toLowerCase();
			if(iLastIndexOf < 1 || sFileEnding != "csv")
			{
				this.bProcStat = false;
				this.iErrorId  = 2;
				alert(this.aErrorMsg[this.iErrorId]);
			}
			else
			{
				this.bProcStat = true;
				this.iErrorId  = 0;
			}
		}
		else
		{
			this.bProcStat = false;
			this.iErrorId  = 2;
			alert(this.aErrorMsg[this.iErrorId]);
		}
		
		// start import at (>=1)
		if(this.bProcStat)
		{
			iStartAt = this.oForm.fUmtUserImportStartAt.value;
			if(isNaN(iStartAt))
			{
				this.bProcStat = false;
				this.iErrorId  = 3;
				alert(this.aErrorMsg[this.iErrorId]);
			}
			if(iStartAt < 1)
			{
				this.bProcStat = false;
				this.iErrorId  = 4;
				alert(this.aErrorMsg[this.iErrorId]);
			}
		}
	}
	
	// set hidden form fields
	if(this.bProcStat)
	{
		sUsergroups = "";
		// set mode value
		this.oForm.fUmtUserImportMode.value       = sMode;
		this.oForm.fUmtUserImportUsergroups.value = "";
		// set usergroup id's as a comma separated string (a.e.: 1,3,6)
		for(i=0; i<this.oForm.fUmtUserImportSelectedUG.length; i++)
		{
			sUsergroups += this.oForm.fUmtUserImportSelectedUG.options[i].value + ',';
		}
		if(sUsergroups != "" && sUsergroups.length > 0)
		{
			sUsergroups = sUsergroups.slice(0, sUsergroups.length - 1);
			this.oForm.fUmtUserImportUsergroups.value = sUsergroups;
		}
		// set the original file path into a hidden field for further processing
		this.oForm.fUmtUserImportCsvFilePath.value = this.oForm.fUmtUserImportCsv.value;
	}
	
	// submit form
	if(this.bProcStat)
	{
		// set form action
		this.oForm.action = sFormAction + "?uNC=" + this.randomString() + "&uMode=" + sMode;
		this.oForm.submit();
	}
	
	this.bProcStat = true;
} // eof userImportSubmit


/**
 * check and submit form data on umt_user_add.cfm
 * 
 * @param  string  sFormAction  the form action (the CFM processing file)
 * @param  string  sMode        the valid and available mode for the CFM processing file
 */
umt.prototype.userAddSubmit = function(sFormAction, sMode)
{
	
	aMode    = new Array();
	aMode[0] = "new";
	aMode[1] = "update";
	aMode[2] = "delete";
	
	// form action
	var iCounter = 0;
	for(i=0; i<aMode.length; i++)
	{
		if(aMode[i] == sMode)
		{
			break;
		}
		iCounter += 1;
	}
	if(iCounter == aMode.length)
	{
		this.bProcStat = false;
		this.iErrorId  = 18;
		alert(this.aErrorMsg[this.iErrorId]);
	}
	
	// username
	/*
	if(this.bProcStat)
	{
		if(this.trimString(this.oForm.fUmtUserAddUsername.value) == "")
		{
			this.bProcStat = false;
			this.iErrorId  = 5;
			alert(this.aErrorMsg[this.iErrorId]);
		}
	}
	* */
	
	// password AND retype password
	if(this.bProcStat)
	{
		if(this.trimString(this.oForm.fUmtUserAddPassword.value) != "")
		{
			if(this.trimString(this.oForm.fUmtUserAddPassword.value).length < 6)
			{
				this.bProcStat = false;
				this.iErrorId  = 7;
				alert(this.aErrorMsg[this.iErrorId]);
			}
			else
			{
				// retype password
				if(this.trimString(this.oForm.fUmtUserAddPassword.value) != this.trimString(this.oForm.fUmtUserAddRetypePassword.value))
				{
					this.bProcStat = false;
					this.iErrorId  = 8;
					alert(this.aErrorMsg[this.iErrorId]);
				}
			}
		}
	}
		
	// firstname
	if(this.bProcStat)
	{
		if(this.trimString(this.oForm.fUmtUserAddFirstname.value) == "")
		{
			this.bProcStat = false;
			this.iErrorId  = 9;
			alert(this.aErrorMsg[this.iErrorId]);
		}
	}
	
	// lastname
	if(this.bProcStat)
	{
		if(this.trimString(this.oForm.fUmtUserAddLastname.value) == "")
		{
			this.bProcStat = false;
			this.iErrorId  = 10;
			alert(this.aErrorMsg[this.iErrorId]);
		}
	}
		
	// address1
	/*
	if(this.bProcStat)
	{
		if(this.trimString(this.oForm.fUmtUserAddAddress1.value) == "")
		{
			this.bProcStat = false;
			this.iErrorId  = 11;
			alert(this.aErrorMsg[this.iErrorId]);
		}
	}
	*/
		
	// zip
	/*
	if(this.bProcStat)
	{
		if(this.trimString(this.oForm.fUmtUserAddZip.value) == "")
		{
			this.bProcStat = false;
			this.iErrorId  = 12;
			alert(this.aErrorMsg[this.iErrorId]);
		}
	}
	*/
		
	// city
	/*
	if(this.bProcStat)
	{
		if(this.trimString(this.oForm.fUmtUserAddCity.value) == "")
		{
			this.bProcStat = false;
			this.iErrorId  = 13;
			alert(this.aErrorMsg[this.iErrorId]);
		}
	}
	*/
		
	// country
	/*
	if(this.bProcStat)
	{
		if(this.oForm.fUmtUserAddCountryId.value <= 0)
		{
			this.bProcStat = false;
			this.iErrorId  = 14;
			alert(this.aErrorMsg[this.iErrorId]);
		}
	}
	*/
		
	// e-mail
	if(this.bProcStat)
	{
		if(this.trimString(this.oForm.fUmtUserAddEmail.value) == "")
		{
			this.bProcStat = false;
			this.iErrorId  = 15;
			alert(this.aErrorMsg[this.iErrorId]);
		}
		else
		{
			if(!testEmail(this.trimString(this.oForm.fUmtUserAddEmail.value)))
			{
				this.bProcStat = false;
				this.iErrorId  = 16;
				alert(this.aErrorMsg[this.iErrorId]);
			}
		}
	}
		
	// photosource
	if(this.bProcStat)
	{
		if(this.trimString(this.oForm.fUmtUserAddPhotosource.value) != "")
		{
			// check file ending
			aFileEnding = this.oForm.fUmtUserAddPhotosource.value.split(".");
			sFileEnding = aFileEnding[aFileEnding.length - 1].toLowerCase();
			var iCounter = 0;
			for(i=0; i<this.aImageFormat.length; i++)
			{
				if(this.aImageFormat[i] == sFileEnding)
				{
					break;
				}
				iCounter += 1;
			}
			if(iCounter == this.aImageFormat.length)
			{
				this.bProcStat = false;
				this.iErrorId  = 17;
				alert(this.aErrorMsg[this.iErrorId]);
			}
		}
	}
	
	// set hidden form fields
	if(this.bProcStat)
	{
		// set method action
		this.oForm.fUmtUserAddMode.value = sMode;
		// set the original file path into a hidden field for further processing
		this.oForm.fUmtUserAddFilePath.value = this.oForm.fUmtUserAddPhotosource.value;
	}
	
	// submit form
	if(this.bProcStat)
	{
		this.oForm.action = sFormAction + "?uNC=" + this.randomString() + "&uMode=" + sMode;
		// set form action
		this.oForm.submit();
	}
	
	this.bProcStat = true;
} // eof userAddSubmit







/**
 * check and submit form data on ecrm_groupadd.cfm
 * 
 * @param  string  sFormAction  the form action (the CFM processing file)
 * @param  string  sMode        the valid and available mode for the CFM processing file
 */
umt.prototype.groupAddSubmit = function(sFormAction, sMode)
{
	
	aMode    = new Array();
	aMode[0] = "new";
	aMode[1] = "update";
	aMode[2] = "delete";
	
	// form action
	var iCounter = 0;
	for(i=0; i<aMode.length; i++)
	{
		if(aMode[i] == sMode)
		{
			break;
		}
		iCounter += 1;
	}
	if(iCounter == aMode.length)
	{
		this.bProcStat = false;
		this.iErrorId  = 18;
		alert(this.aErrorMsg[this.iErrorId]);
	}

	// submit form
	if(this.bProcStat)
	{
		//this.oForm.fecrmGroupId.value  = iUserId;
		this.oForm.action = sFormAction + "?uNC=" + this.randomString() + "&uMode=" + sMode;
		// set form action
		this.oForm.submit();
	}
	
	this.bProcStat = true;
} // eof groupAddSubmit



/**
 * alerts a confirmation box with user group name and sets the user group id and the user id into hidden form fields before submitting form.
 * 
 * @param  string   sUsergroupName  the name of the user group which should be deleted for this user
 * @param  integer  iUserId         the user id
 * @param  integer  iUsergroupId    the user group id
 */
umt.prototype.userAddGroupDelGroup = function(sUsergroupName, iUserId, iUsergroupId)
{
	
	if(this.bProcStat)
	{
		// check parameters
		if(iUsergroupId > 0 && iUserId > 0)
		{
			// alert confirmation box
			del = window.confirm("Do you want to remove the user from the user group \"" + sUsergroupName + "\"?");
			// if "yes"
			if(del)
			{
				// set hidden fields
				this.oForm.fUmtUserAddGroupMode.value    = "delete";
				this.oForm.fUmtUserAddGroupUserId.value  = iUserId;
				this.oForm.fUmtUserAddGroupGroupId.value = iUsergroupId;
				// set form action
				this.oForm.action = "umt_useraddgroup.cfm?uNC=" + this.randomString() + "&uMode=delete";
				// submit
				this.oForm.submit();
			}
		}
	}
	
} // eof userAddGroupDelGroup


/**
 * adds a user to a user group, set hidden form fields
 * 
 * @param  string  sFormAction  the form action (the CFM processing file)
 * @param  string  sMode        the valid and available mode for the CFM processing file
 */
umt.prototype.userAddGroupSubmit = function(sFormAction, sMode)
{
	
	// possible form modes
	aMode    = new Array();
	aMode[0] = "new";
	
	// check form action
	var iCounter = 0;
	for(i=0; i<aMode.length; i++)
	{
		if(aMode[i] == sMode)
		{
			break;
		}
		iCounter += 1;
	}
	if(iCounter == aMode.length)
	{
		this.bProcStat = false;
		this.iErrorId  = 18;
		alert(this.aErrorMsg[this.iErrorId]);
	}
	
	// set hidden form fields
	if(this.bProcStat)
	{
		// set method action
		this.oForm.fUmtUserAddGroupMode.value = sMode;
		this.oForm.fUmtUserAddGroupGroupId.value = this.oForm.fGroupId.options[this.oForm.fGroupId.selectedIndex].value;
		this.oForm.fUmtUserAddGroupStatusId.value = this.oForm.fStatusId.options[this.oForm.fStatusId.selectedIndex].value;
	}
	
	// submit form
	if(this.bProcStat)
	{
		// set form action
		this.oForm.action = sFormAction + "?uNC=" + this.randomString() + "&uMode=" + sMode;
		this.oForm.submit();
	}
	
	this.bProcStat = true;
	
} // eof userAddGroupSubmit






/**
 * Edit...
 * 
 * @param  string  sFormAction  the form action (the CFM processing file)
 * @param  string  sMode        the valid and available mode for the CFM processing file
 */
umt.prototype.userEditGroupSubmit = function(sFormAction, sMode)
{
	
	// possible form modes
	aMode    = new Array();
	aMode[0] = "edit";
	
	// check form action
	var iCounter = 0;
	for(i=0; i<aMode.length; i++)
	{
		if(aMode[i] == sMode)
		{
			break;
		}
		iCounter += 1;
	}
	if(iCounter == aMode.length)
	{
		this.bProcStat = false;
		this.iErrorId  = 18;
		alert(this.aErrorMsg[this.iErrorId]);
	}
	
	// set hidden form fields
	if(this.bProcStat)
	{
		// set method action
		this.oForm.fUmtUserAddGroupMode.value = sMode;
		this.oForm.fUmtUserAddGroupGroupId.value = this.oForm.fGroupId.options[this.oForm.fGroupId.selectedIndex].value;
		this.oForm.fUmtUserAddGroupStatusId.value = this.oForm.fStatusId.options[this.oForm.fStatusId.selectedIndex].value;
	}
	
	// submit form
	if(this.bProcStat)
	{
		// set form action
		this.oForm.action = sFormAction + "?uNC=" + this.randomString() + "&uMode=" + sMode;
		this.oForm.submit();
	}
	
	this.bProcStat = true;
	
} // eof userEditGroupSubmit



/**
 * adds a language to a user, set hidden form fields
 * 
 * @param  string  sFormAction  the form action (the CFM processing file)
 * @param  string  sMode        the valid and available mode for the CFM processing file
 */
umt.prototype.userAddLanguageSubmit = function(sFormAction, sMode)
{
	
	// possible form modes
	aMode    = new Array();
	aMode[0] = "new";
	
	// check form action
	var iCounter = 0;
	for(i=0; i<aMode.length; i++)
	{
		if(aMode[i] == sMode)
		{
			break;
		}
		iCounter += 1;
	}
	if(iCounter == aMode.length)
	{
		this.bProcStat = false;
		this.iErrorId  = 18;
		alert(this.aErrorMsg[this.iErrorId]);
	}
	
	// set hidden form fields
	if(this.bProcStat)
	{
		// set method action
		this.oForm.fUmtUserAddLanguageMode.value       = sMode;
		this.oForm.fUmtUserAddLanguageLanguageId.value = this.oForm.fLanguageId.options[this.oForm.fLanguageId.selectedIndex].value;
	}
	
	// submit form
	if(this.bProcStat)
	{
		// set form action
		this.oForm.action = sFormAction + "?uNC=" + this.randomString() + "&uMode=" + sMode;
		this.oForm.submit();
	}
	
	this.bProcStat = true;
	
} // userAddLanguageSubmit


/**
 * removes a language from a user, set hidden form fields
 * 
 * @param  string   sLanguageName  name of the language
 * @param  integer  iUserId        the user id
 * @param  integer  iLanguageId    the language id
 * @param  integer  iOrder         the order id
 */
umt.prototype.userAddLanguageDelLanguage = function(sLanguageName, iUserId, iLanguageId, iOrder)
{
	
	if(this.bProcStat)
	{
		// check parameters
		if(iLanguageId > 0 && iUserId > 0)
		{
			// alert confirmation box
			del = window.confirm("Do you want to remove the language \"" + sLanguageName + "\" from this user?");
			// if "yes"
			if(del)
			{
				// set hidden fields
				this.oForm.fUmtUserAddLanguageMode.value       = "delete";
				this.oForm.fUmtUserAddLanguageUserId.value     = iUserId;
				this.oForm.fUmtUserAddLanguageLanguageId.value = iLanguageId;
				this.oForm.fUmtUserAddLanguageOrderId.value    = iOrder;
				// set form action
				this.oForm.action = "umt_useraddlanguage.cfm?uNC=" + this.randomString() + "&uMode=delete";
				// submit
				this.oForm.submit();
			}
		}
	}
} // eof userAddLanguageDelLanguage


/**
 * starts user data export, set hidden form fields
 * 
 * @param  string  sFormAction  the form action (the CFM processing file)
 * @param  string  sMode        the valid and available mode for the CFM processing file
 */
umt.prototype.userExportSubmit = function(sFormAction, sMode)
{
	
	// check if needed form fields exist
	if(this.oForm.fSelectedOrigin &&
		 this.oForm.fSelectedAS &&
		 this.oForm.fSelectedLang &&
		 this.oForm.fSelectedContries &&
		 this.oForm.fSelectedUG
	)
	{
		
		aMode    = new Array();
		aMode[0] = "export";
			
		// check form action
		var iCounter = 0;
		for(i=0; i<aMode.length; i++)
		{
			if(aMode[i] == sMode)
			{
				break;
			}
			iCounter += 1;
		}
		if(iCounter == aMode.length)
		{
			this.bProcStat = false;
			this.iErrorId  = 18;
			alert(this.aErrorMsg[this.iErrorId]);
		}
		
		if(this.bProcStat)
		{
			// local vars
			sHiddenOrigin    = "";
			sHiddenActivity  = "";
			sHiddenLanguage  = "";
			sHiddenCountry   = "";
			sHiddenUsergroup = "";
			
			// set hidden form fields with selected data
			// origin
			for(i=0; i<this.oForm.fSelectedOrigin.length; i++)
			{
				if(this.oForm.fSelectedOrigin.options[i].value > 0)
				{
					sHiddenOrigin += this.oForm.fSelectedOrigin.options[i].value + ',';
				}
			}
			if(this.trimString(sHiddenOrigin) != "" && this.trimString(sHiddenOrigin).length > 0)
			{
				sHiddenOrigin = sHiddenOrigin.slice(0, sHiddenOrigin.length - 1);
				this.oForm.fUmtUserExportOrigin.value = sHiddenOrigin;
			}
			
			// activitystatus
			for(i=0; i<this.oForm.fSelectedAS.length; i++)
			{
				if(this.oForm.fSelectedAS.options[i].value > 0)
				{
					sHiddenActivity += this.oForm.fSelectedAS.options[i].value + ',';
				}
			}
			if(this.trimString(sHiddenActivity) != "" && this.trimString(sHiddenActivity).length > 0)
			{
				sHiddenActivity = sHiddenActivity.slice(0, sHiddenActivity.length - 1);
				this.oForm.fUmtUserExportActivitystatus.value = sHiddenActivity;
			}
			
			// language
			for(i=0; i<this.oForm.fSelectedLang.length; i++)
			{
				if(this.oForm.fSelectedLang.options[i].value > 0)
				{
					sHiddenLanguage += this.oForm.fSelectedLang.options[i].value + ',';
				}
			}
			if(this.trimString(sHiddenLanguage) != "" && this.trimString(sHiddenLanguage).length > 0)
			{
				sHiddenLanguage = sHiddenLanguage.slice(0, sHiddenLanguage.length - 1);
				this.oForm.fUmtUserExportLanguage.value = sHiddenLanguage;
			}
			
			// country
			for(i=0; i<this.oForm.fSelectedContries.length; i++)
			{
				if(this.oForm.fSelectedContries.options[i].value > 0)
				{
					sHiddenCountry += this.oForm.fSelectedContries.options[i].value + ',';
				}
			}
			if(this.trimString(sHiddenCountry) != "" && this.trimString(sHiddenCountry).length > 0)
			{
				sHiddenCountry = sHiddenCountry.slice(0, sHiddenCountry.length - 1);
				this.oForm.fUmtUserExportCountry.value = sHiddenCountry;
			}
			
			// user groups
			for(i=0; i<this.oForm.fSelectedUG.length; i++)
			{
				if(this.oForm.fSelectedUG.options[i].value > 0)
				{
					sHiddenUsergroup += this.oForm.fSelectedUG.options[i].value + ',';
				}
			}
			if(this.trimString(sHiddenUsergroup) != "" && this.trimString(sHiddenUsergroup).length > 0)
			{
				sHiddenUsergroup = sHiddenUsergroup.slice(0, sHiddenUsergroup.length - 1);
				this.oForm.fUmtUserExportUsergroup.value = sHiddenUsergroup;
			}
			
			// submit form
			if(this.bProcStat)
			{
				// set mode value
				this.oForm.fUmtUserExportMode.value = sMode;
				// set form action
				this.oForm.action = sFormAction + "?uNC=" + this.randomString() + "&uMode=" + sMode;
				this.oForm.submit();
			}
			
			this.bProcStat = true;
		}
	} // eof check if needed form fields exist

}


/** *****************************************************************************************************************************************/


/**
 * check and submit form data on ecrm_campaignadd.cfm
 * 
 * @param  string  sFormAction  the form action (the CFM processing file)
 * @param  string  sMode        the valid and available mode for the CFM processing file
 */
umt.prototype.campaignAddSubmit = function(sFormAction, sMode)
{
	
	aMode    = new Array();
	aMode[0] = "new"; 
	aMode[1] = "update";
	aMode[2] = "delete";
	
	// form action
	var iCounter = 0;
	for(i=0; i<aMode.length; i++)
	{
		if(aMode[i] == sMode)
		{
			break;
		}
		iCounter += 1;
	}
	if(iCounter == aMode.length)
	{
		this.bProcStat = false;
		this.iErrorId  = 18;
		alert(this.aErrorMsg[this.iErrorId]);
	}

	// submit form
	if(this.bProcStat)
	{
		//this.oForm.fecrmGroupId.value  = iUserId;
		this.oForm.action = sFormAction + "?uNC=" + this.randomString() + "&uMode=" + sMode;
		// set form action
		this.oForm.submit();
	}
	
	this.bProcStat = true;
} // eof campaignAddSubmit 



/**
 * check and submit form data on ecrm_activitiesadd.cfm
 * 
 * @param  string  sFormAction  the form action (the CFM processing file)
 * @param  string  sMode        the valid and available mode for the CFM processing file
 */
umt.prototype.activitiesAddSubmit = function(sFormAction, sMode)
{
	
	aMode    = new Array();
	aMode[0] = "new"; 
	aMode[1] = "update";
	aMode[2] = "delete";
	
	// form action
	var iCounter = 0;
	for(i=0; i<aMode.length; i++)
	{
		if(aMode[i] == sMode)
		{
			break;
		}
		iCounter += 1;
	}
	if(iCounter == aMode.length)
	{
		this.bProcStat = false;
		this.iErrorId  = 18;
		alert(this.aErrorMsg[this.iErrorId]);
	}

	// submit form
	if(this.bProcStat)
	{
		//this.oForm.fecrmGroupId.value  = iUserId;
		this.oForm.action = sFormAction + "?uNC=" + this.randomString() + "&uMode=" + sMode;
		// set form action
		this.oForm.submit();
	}
	
	this.bProcStat = true;
} // eof activitiesAddSubmit



//--------------------------------------------------
function testString(f_sString)
{
	if (f_sString.length > 0)
	{
		return true;
	}
	else
	{
		return false;
	}
}

function testStringEq(f_sString, f_iLen)
{
	if (f_sString.length == f_iLen)
	{
		return true;
	}
	else
	{
		return false;
	}
}

function testStringGt(f_sString, f_iLen)
{
	if (f_sString.length > f_iLen)
	{
		return true;
	}
	else
	{
		return false;
	}
}

function testStringLt(f_sString, f_iLen)
{
	if (f_sString.length < f_iLen)
	{
		return true;
	}
	else
	{
		return false;
	}
}

function testInt(f_iInteger)
{
	var regInt = /^[0-9]+$/;
	
	if (regInt.test(f_iInteger) == true)
	{
		return true;
	}	
	else
	{
		return false;
	}
}

function testFloat(f_flFloat)
{
	var regFloat = /^[0-9]+(\.[0-9]+)*$/;
	
	if (regFloat.test(f_flFloat) == true)
	{
		return true;
	}
	else
	{
		return false;
	}
}

function testIntGtZero(f_iInteger)
{
	var regInt = /^[0-9]+$/;
	
	if (regInt.test(f_iInteger) == true && f_iInteger > 0)
	{
		return true;
	}	
	else
	{
		return false;
	}
}

function testMinusOne(f_iInteger)
{
	if (f_iInteger != -1)
	{
		return true;
	}	
	else
	{
		return false;
	}
}

function testTime(f_sTime)
{
	var regTime = /^([0-2]?[0-9]):[0-5][0-9](:[0-5][0-9])?$/;
	var iIndex;
	var iValue;
	var sValue = f_sTime;
	
	if (regTime.test(sValue) == true)
	{
		iIndex = sValue.indexOf(":");
		iValue = sValue.substr(0,iIndex);
		
		if (iValue <= 23 && iValue >=0)
		{
			return true;
		}
		else
		{
			return false;
		}	
	}
	else
	{
		return false;
	}
}

function testDate(f_sDate)
{
	var regDate = /^([0-3]?[0-9])\.([0-1]?[0-9])\.[1-9][0-9]{3}$/;
	var iIndex, iIndex2;
	var iMonth,iDay,iYear;
	var arrMonth = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
	var sValue = f_sDate;
	
	if (regDate.test(sValue) == true)
	{
		iIndex = sValue.indexOf(".");
		iIndex2 = sValue.indexOf(".",iIndex+1);
		
		iDay = sValue.substr(0,iIndex);
		iMonth = sValue.substring(iIndex+1,iIndex2);
		iYear = sValue.substr(iIndex2+1,sValue.length);		

		if (iMonth < 1 || iMonth > 12)
		{
			return false;		
		}
		
		if (iMonth == 2 && ( ( (iYear % 4) == 0 && (iYear % 100) != 0 ) || (iYear % 400) == 0 ) ) 
		{
			if (iDay < 1 || iDay > 29)
			{
				return false;
			}
		}
		else
		{
			if (iDay < 1 || iDay > arrMonth[iMonth-1])
			{
				return false;
			}
		}		

		return true;

	}
	else
	{
		return false;
	}
}

/* For dates that are formated different to normal dates (i.e. MM.DD.YYYY) */
function testDate2(f_sDate)
{
	var regDate = /^([0-1]?[0-9])\.([0-3]?[0-9])\.[1-9][0-9]{3}$/;
	var iIndex, iIndex2;
	var iMonth,iDay,iYear;
	var arrMonth = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
	var sValue = f_sDate;
	
	if (regDate.test(sValue) == true)
	{
		iIndex = sValue.indexOf(".");
		iIndex2 = sValue.indexOf(".",iIndex+1);
		
		iMonth = sValue.substr(0,iIndex);
		iDay = sValue.substring(iIndex+1,iIndex2);
		iYear = sValue.substr(iIndex2+1,sValue.length);		

		if (iMonth < 1 || iMonth > 12)
		{
			return false;		
		}
		
		if (iMonth == 2 && ( ( (iYear % 4) == 0 && (iYear % 100) != 0 ) || (iYear % 400) == 0 ) ) 
		{
			if (iDay < 1 || iDay > 29)
			{
				return false;
			}
		}
		else
		{
			if (iDay < 1 || iDay > arrMonth[iMonth-1])
			{
				return false;
			}
		}		

		return true;

	}
	else
	{
		return false;
	}
}

function compareDate(f_sDate1,f_sDate2)
{
	var sValue1 = f_sDate1;
	var sValue2 = f_sDate2;
	
	iIndex = sValue1.indexOf(".");
	iIndex2 = sValue1.indexOf(".",iIndex+1);
	
	iDay1 = sValue1.substr(0,iIndex);
	iDay1 = (iDay1.length == 2) ? iDay1 : iDay1 = "0" + iDay1 ; 
	iMonth1 = sValue1.substring(iIndex+1,iIndex2);
	iMonth1 = (iMonth1.length == 2) ? iMonth1 : iMonth1 = "0" + iMonth1 ; 
	iYear1 = sValue1.substr(iIndex2+1,sValue1.length);	

	
	iIndex = sValue2.indexOf(".");
	iIndex2 = sValue2.indexOf(".",iIndex+1);
	
	iDay2 = sValue2.substr(0,iIndex);
	iDay2 = (iDay2.length == 2) ? iDay2 : iDay2 = "0" + iDay2 ; 
	iMonth2 = sValue2.substring(iIndex+1,iIndex2);
	iMonth2 = (iMonth2.length == 2) ? iMonth2: iMonth2 = "0" + iMonth2 ; 
	iYear2 = sValue2.substr(iIndex2+1,sValue2.length);		
	
	iDate1 = parseInt(iYear1 + iMonth1 + iDay1);
	iDate2 = parseInt(iYear2 + iMonth2 + iDay2);
	
	if(iDate1 <= iDate2)
	{
		return true
	}
	else
	{
		return false;
	}
}

function testEmail(f_sEmail)
{
	var regEmail = /^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*\.([a-zA-Z]{2,4})$/;
	
	if (regEmail.test(f_sEmail) == true)
	{
		return true;
	}
	else
	{
		return false;
	}
}

function testChPlz(f_iPLZ)
{
	var regPLZ = /^[1-9][0-9]{3}$/;
	
	if (regPLZ.test(f_iPLZ) == true)
	{
		return true;
	}
	else
	{
		return false;
	}
}

function testCHMoney(f_flMoney)
{
	var regMoney = /(^[1-9][0-9]*|^0)(\.[0-9](0|5))?$/;
	
	if (regMoney.test(f_flMoney) == true)
	{
		return true;
	}
	else
	{
		return false;
	}
}

function testEmpty(f_sString)
{
	var regWhiteSpace = /[^ \f\n\r\t]/;
	
	if (regWhiteSpace.test(f_sString))
	{
		return false;
	}
	else
	{
		return true;
	}
}

function testReg(f_sString,f_regString)
{

	regString = new RegExp(f_regString,"gi");
	if (regString.test(f_sString) == true)
	{
		return true;
	}
	else
	{
		return false;
	}
}

//--------------------------------------------------
function testString(f_sString)
{
	if (f_sString.length > 0)
	{
		return true;
	}
	else
	{
		return false;
	}
}

function testStringEq(f_sString, f_iLen)
{
	if (f_sString.length == f_iLen)
	{
		return true;
	}
	else
	{
		return false;
	}
}

function testStringGt(f_sString, f_iLen)
{
	if (f_sString.length > f_iLen)
	{
		return true;
	}
	else
	{
		return false;
	}
}

function testStringLt(f_sString, f_iLen)
{
	if (f_sString.length < f_iLen)
	{
		return true;
	}
	else
	{
		return false;
	}
}

function testInt(f_iInteger)
{
	var regInt = /^[0-9]+$/;
	
	if (regInt.test(f_iInteger) == true)
	{
		return true;
	}	
	else
	{
		return false;
	}
}

function testFloat(f_flFloat)
{
	var regFloat = /^[0-9]+(\.[0-9]+)*$/;
	
	if (regFloat.test(f_flFloat) == true)
	{
		return true;
	}
	else
	{
		return false;
	}
}

function testIntGtZero(f_iInteger)
{
	var regInt = /^[0-9]+$/;
	
	if (regInt.test(f_iInteger) == true && f_iInteger > 0)
	{
		return true;
	}	
	else
	{
		return false;
	}
}

function testMinusOne(f_iInteger)
{
	if (f_iInteger != -1)
	{
		return true;
	}	
	else
	{
		return false;
	}
}

function testTime(f_sTime)
{
	var regTime = /^([0-2]?[0-9]):[0-5][0-9](:[0-5][0-9])?$/;
	var iIndex;
	var iValue;
	var sValue = f_sTime;
	
	if (regTime.test(sValue) == true)
	{
		iIndex = sValue.indexOf(":");
		iValue = sValue.substr(0,iIndex);
		
		if (iValue <= 23 && iValue >=0)
		{
			return true;
		}
		else
		{
			return false;
		}	
	}
	else
	{
		return false;
	}
}

function testDate(f_sDate)
{
	var regDate = /^([0-3]?[0-9])\.([0-1]?[0-9])\.[1-9][0-9]{3}$/;
	var iIndex, iIndex2;
	var iMonth,iDay,iYear;
	var arrMonth = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
	var sValue = f_sDate;
	
	if (regDate.test(sValue) == true)
	{
		iIndex = sValue.indexOf(".");
		iIndex2 = sValue.indexOf(".",iIndex+1);
		
		iDay = sValue.substr(0,iIndex);
		iMonth = sValue.substring(iIndex+1,iIndex2);
		iYear = sValue.substr(iIndex2+1,sValue.length);		

		if (iMonth < 1 || iMonth > 12)
		{
			return false;		
		}
		
		if (iMonth == 2 && ( ( (iYear % 4) == 0 && (iYear % 100) != 0 ) || (iYear % 400) == 0 ) ) 
		{
			if (iDay < 1 || iDay > 29)
			{
				return false;
			}
		}
		else
		{
			if (iDay < 1 || iDay > arrMonth[iMonth-1])
			{
				return false;
			}
		}		

		return true;

	}
	else
	{
		return false;
	}
}

function testEmail(f_sEmail)
{
	var regEmail = /^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*\.([a-zA-Z]{2,4})$/;
	
	if (regEmail.test(f_sEmail) == true)
	{
		return true;
	}
	else
	{
		return false;
	}
}

function testChPlz(f_iPLZ)
{
	var regPLZ = /^[1-9][0-9]{3}$/;
	
	if (regPLZ.test(f_iPLZ) == true)
	{
		return true;
	}
	else
	{
		return false;
	}
}

function testCHMoney(f_flMoney)
{
	var regMoney = /(^[1-9][0-9]*|^0)(\.[0-9](0|5))?$/;
	
	if (regMoney.test(f_flMoney) == true)
	{
		return true;
	}
	else
	{
		return false;
	}
}

function testEmpty(f_sString)
{
	var regWhiteSpace = /[^ \f\n\r\t]/;
	
	if (regWhiteSpace.test(f_sString))
	{
		return false;
	}
	else
	{
		return true;
	}
}

function testReg(f_sString,f_regString)
{

	regString = new RegExp(f_regString,"gi");
	if (regString.test(f_sString) == true)
	{
		return true;
	}
	else
	{
		return false;
	}
}

//--------------------------------------------------

