	/**
* MiniColorPicker v0.4
* 	By: me [at] daantje [dot] nl
*
* 	Last updated: Sun Mar 19 11:50:27 CET 2006
*
*	Documentation:
*		A realy small Photoshop like color picker in DHTML.
*		It should be compatible with MSIE and Mozilla based
*		browsers.
*
*	License:
*		LGPL
*
*	Support:
*		Not realy.
*
*	Thanks to:
*		Robert James Ellis for the big donation!
*		(the Graphite Pro Control Panel project)
*		http://www.sddepot.com/
*/


//Config ammount of colors
var bit = 16; 		//default color depth, increase to make picker bigger (and slower) Values: 8, 16, 24 or 32
var pixel = 10;     //make the picker pixels bigger or smaller.


//define globals, don't change!
bit = Math.round(255 / bit);
var ConvArray = new Array(0,1,2,3,4,5,6,7,8,9,'A','B','C','D','E','F');
var picked = new Array();
var pickedColorRGB = new Array();
var toolbarShow = new Array();
var donePickerInits = new Array();
var clickedPicker;
var MCPtmr = new Array();


//this function is written by Guido Socher, guido at linuxfocus dot org
function dec2hex(value){
    var retval = '';
    var intnum;
    var tmpnum;
    var i = 0;

    
	intnum = parseInt(value,10);
    if (isNaN(intnum)){
        retval = 'NaN';
    }else{
        while (intnum > 0.9){
            i++;
            tmpnum = intnum;
            // cancatinate return string with new digit:
            retval = ConvArray[tmpnum % 16] + retval;
            intnum = Math.floor(tmpnum / 16);
            if (i > 100){
                // break infinite loops
                retval = 'NaN';
                break;
            }
        }
    }
	if(retval.length == 1)
		retval = '0' + retval;
	else if(retval.length == 0)
		retval = '00';
    return retval;
}


function HEXcolor2RGB(value){
	
	value = value.replace('#','');
	pickedColorRGB[0] = value.substr(0,2);
	pickedColorRGB[1] = value.substr(2,2);
	pickedColorRGB[2] = value.substr(4,2);
	for(i=0;i<3;i++){
		pickedColorRGB[i] = parseInt(pickedColorRGB[i],16);
	}
	return pickedColorRGB;
}


function buildPicker(depth){
	
	htmlStr = "<table border=0 cellpadding=0 cellspacing=0 width="+Math.round((255/depth) * pixel)+" height="+Math.round((255/depth) * pixel)+"><tr>";
	//palet
	for(x=0;x<=255;x=x+depth){
		for(y=0;y<=255;y=y+depth){
			htmlStr+= "<td id='"+depth+"_"+x+"_"+y+"' onclick=\"pickColor(picked[clickedPicker],"+x+","+y+")\" unselectable=on width="+pixel+" height="+pixel+"></td>";
		}
		htmlStr+= "</tr><tr>";
	}
	//grays
	for(x=0;x<=255;x=x+depth){
		c = dec2hex(x)+dec2hex(x)+dec2hex(x);
		htmlStr+= "<td bgcolor=\"#"+c+"\" onclick=\"pickColor("+x+","+x+","+x+")\" unselectable=on width="+pixel+" height="+pixel+"></td>";
	}
	htmlStr+= "</tr></table>";
	
	return htmlStr;
}


function changePallet(R,depth){
	depth = parseInt(depth);
	for(G=0;G<=255;G=G+depth){
		for(B=0;B<=255;B=B+depth){
            if(document.getElementById(depth+'_'+G+'_'+B))
				document.getElementById(depth+'_'+G+'_'+B).style.backgroundColor = '#'+dec2hex(R)+dec2hex(G)+dec2hex(B);
		}
	}
	picked[clickedPicker] = R;
}


function changePickerHue(depth){
	g = 0;
	b = 255;
	gS = 0;
	bS = 1;
	htmlStr = "<table border=0 cellpadding=0 cellspacing=0 width="+pixel+" height="+((255/depth) * pixel)+">";
	for(r=0;r<=255;r=r+depth){
		c = dec2hex(r)+dec2hex(g)+dec2hex(b);
		htmlStr+= "<tr><td bgcolor=\"#"+c+"\" onclick=\"changePallet("+r+","+depth+")\" width="+pixel+" height="+pixel+"></td></tr>";

		if(g == 255) gS = 1;
		else if(g == 0) gS = 0;

		if(b == 255) bS = 1;
		else if(b == 0) bS = 0;

		if(gS == 0)
			g = g + (depth * 2);
		else
			g = g - (depth * 2);

		if(bS == 0)
			b = b + (depth * 4);
		else
			b = b - (depth * 4);
	}
	htmlStr+= "<tr><td bgcolor=\"#ffffff\" onclick=\"changePallet(255,"+depth+")\" width="+pixel+" height="+pixel+"></td></tr>";
	htmlStr+= "</table>";

	return htmlStr;
}

/* Modified By: Rakesh Patel 14-06-06 */
function pickColor(r,g,b){
	c = '#'+dec2hex(r)+dec2hex(g)+dec2hex(b);
	document.getElementById(clickedPicker).style.backgroundColor = c;
	document.getElementById(clickedPicker+'Value').value = c;
	p = clickedPicker.split('_');
  	killPicker(1,1500);
	if(!is_Color(c)) // Check for Valid HEX color code  -RP
		{
			document.getElementById(clickedPicker+'Value').value = '';
		}
}

/* Modified By: Rakesh Patel 14-06-06 */
function setPickedColorFromForm(obj){
	
	c = HEXcolor2RGB(obj.value);
	changePallet(c[0]);
	if(!is_Color(obj.value)) // Check for Valid HEX color code  -RP
		{
			document.getElementById(obj.id.replace('Value','')).style.backgroundColor = '#000000';
			document.getElementById(obj.id).value = '#000000';
		}
	else
		{
			document.getElementById(obj.id.replace('Value','')).style.backgroundColor = obj.value;
		}
	
}


function hideselect()
{
	var k=document.getElementsByTagName('select');
	//alert(k.length);
	for(var i=0;i<k.length;i++)
	{			
		//alert(k[i].style.display); document.getElementByID("selectID").style.visibility = 'hidden';
		k[i].style.visibility="hidden"; 
	}

}

function showselect()
{
	var k=document.getElementsByTagName('select');
	for(var i=0;i<k.length;i++)
	{			
		k[i].style.visibility="visible"; 
	}

}


function placePickerToolbar(obj,depth){
	

	lastClickedPicker = clickedPicker;
	clickedPicker = obj.id;

    if(lastClickedPicker && lastClickedPicker != clickedPicker){
		p = lastClickedPicker.split('_');
    	document.getElementById('colorPickerTools_'+p[1]).style.visibility = 'hidden';
		toolbarShow[lastClickedPicker] = 0;
	}

	if(!depth && clickedPicker){
		p = clickedPicker.split('_');
    	depth = p[1];
	}

	if(MCPtmr[clickedPicker])
	{
		clearTimeout(MCPtmr[clickedPicker]);
	}
	if(toolbarShow[obj.id] == 0){
		toolbarShow[obj.id] = 1;

		t = obj.offsetTop + parseInt(obj.style.height) + 3;
		l = obj.offsetLeft;
		while(obj.offsetParent){
			t+= obj.offsetParent.offsetTop;
			l+= obj.offsetParent.offsetLeft;
			obj = obj.offsetParent;
		}
		document.getElementById('colorPickerTools_'+depth).style.top = t;
		document.getElementById('colorPickerTools_'+depth).style.left = l;
		document.getElementById('colorPickerTools_'+depth).style.visibility = 'visible';
		hideselect();
		if(picked[clickedPicker] == null)
			changePallet(255,depth);
		else
			setPickedColorFromForm(document.getElementById(clickedPicker+'Value'));
	}else if(toolbarShow[obj.id] == 1){
		document.getElementById('colorPickerTools_'+depth).style.visibility = 'hidden';
		showselect();
		toolbarShow[obj.id] = 0;
	}
}


function killPicker(sw,t){

	if(clickedPicker){
		if(!t)
			t = 500;
		toolbarShow[clickedPicker] = sw;
		if(MCPtmr[clickedPicker])
			clearTimeout(MCPtmr[clickedPicker]);
		if(sw == 1)
 			
			MCPtmr[clickedPicker] = setTimeout('placePickerToolbar(document.getElementById(clickedPicker));',t);
	}
}


function initPicker(fieldName,fieldValue,depth){
	
	if(!depth)
		depth = bit;
	else
		depth = Math.round(255 / depth);
	pickerScreen = buildPicker(depth);
	hueScreen = changePickerHue(depth);
	if(!fieldValue)
		fieldValue = "";

	//alert(fieldValue);
	
	if(!donePickerInits[depth]){
		donePickerInits[depth] = 0;
		document.write("<div id=colorPickerTools_"+depth+" onmouseout=\"killPicker(1)\" onmouseover=\"killPicker(0)\" style=\"z-Index:10000;visibility:hidden;cursor:crosshair;position:absolute;border:1px solid #000000;background-color:#ffffff\"></div>");
		document.getElementById('colorPickerTools_'+depth).innerHTML = '<table border=0 cellpadding=0 cellspacing=0><tr><td valign=top>'+pickerScreen+'</td><td valign=top style="border-left:1px solid #000000;">'+hueScreen+'</td></tr><tr><td colspan=2><table border=0 cellpadding=0 cellspacing=0 width=100%><tr><td width=50% style="background-color:#ffffff;" onclick="pickColor(255,255,255);" height='+pixel+'></td><td width=50% style="background-color:#000000;" onclick="pickColor(0,0,0);" height='+pixel+'></td></tr></table></td></tr></table>';
	}
	s = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
	s+= "<td>&nbsp;<input type=\"text\" name=\""+fieldName+"\" id=pickedColor_"+depth+"_"+donePickerInits[depth]+"Value value=\""+fieldValue+"\" size=7 style=\"font-size:10px;\" onchange=\"setPickedColorFromForm(this)\" onblur=\"fill_empty_color(this)\">&nbsp;</td>";
	s+= "<td><div onmouseout=\"killPicker(1)\" onmouseover=\"killPicker(0)\" onclick=\"placePickerToolbar(this,"+depth+")\" style=\"width:15px;height:15px;border: 1px solid #000000;cursor:pointer;background-color:"+fieldValue+";\" id=pickedColor_"+depth+"_"+donePickerInits[depth]+"></div></td>";
	s+= "</table>";
	document.write(s);
	//alert(s);
	toolbarShow["pickedColor_"+depth+"_"+donePickerInits[depth]] = 0;
	donePickerInits[depth]++;
}


/* Function written by Rakesh Patel 14-06-06 */
function is_Color(color){

	if (/^#{1}[0-9A-Fa-f]{6}$/.test (color) || color=='' )
		{
			return true;
		}
	else
		{
			alert("Please Enter Valid Color Code.\nExample: #CC99DD");
			return false;
		}
}

/* Function written by Rakesh Patel 19-06-06 */
function fill_empty_color(obj)
{
	
	if(obj.value == '') // Check if the txtbox has EMPTY value  -RP
		{
			document.getElementById(obj.id.replace('Value','')).style.backgroundColor = '#000000';
			document.getElementById(obj.id).value = '#000000';
		}
}



/* Minicolor Plugin Ends Here /*



/********************************************************************************************
* BlueShoes Framework; This file is part of the php application framework.
* NOTE: This code is stripped (obfuscated). To get the clean documented code goto 
*       www.blueshoes.org and register for the free open source *DEVELOPER* version or 
*       buy the commercial version.
*       
*       In case you've already got the developer version, then this is one of the few 
*       packages/classes that is only available to *PAYING* customers.
*       To get it go to www.blueshoes.org and buy a commercial version.
* 
* @copyright www.blueshoes.org
* @author    sam blum <sam-at-blueshoes-dot-org>
* @author    Andrej Arn <andrej-at-blueshoes-dot-org>
*/
function bsFormGetFormForField(fieldElm) {
if (document.forms.length == 1) return document.forms[0];if (fieldElm.tagName == 'form') return fieldElm;if (fieldElm.parentNode) return bsFormGetFormForField(fieldElm.parentNode);return false;}
function bsFormGetNextField(fieldElm) {
var formElm = bsFormGetFormForField(fieldElm);if (!formElm) return false;var useNext = false;for (var i=0; i<formElm.elements.length; i++) {
if (useNext) return formElm.elements[i];if (formElm.elements[i] == fieldElm) useNext = true;}
return false;}
function bsFormToggleCheckbox(formName, fieldName) {
try {
if (document.forms[formName].elements[fieldName].checked) {
document.forms[formName].elements[fieldName].checked = false;} else {
document.forms[formName].elements[fieldName].checked = true;}
} catch (e) {
}
}
function bsFormToggleContainer(containerName) {
if (document.getElementById) {
var elm = document.getElementById(containerName);if (typeof(elm) != 'undefined') {
elm.style.display = (elm.style.display == 'none') ? 'block' : 'none';var img = document.getElementById('contToggleImg' + containerName.substr(9));if (typeof(img) != 'undefined') {
if (elm.style.display == 'none') {
img.src = img.src.substr(0, img.src.length -6) + 'down.gif';} else {
img.src = img.src.substr(0, img.src.length -8) + 'up.gif';}
}
var txtO = document.getElementById('contToggleTextO' + containerName.substr(9));var txtC = document.getElementById('contToggleTextC' + containerName.substr(9));if (typeof(txtO) != 'undefined') {
if (elm.style.display == 'none') {
txtO.style.display = 'inline';txtC.style.display = 'none';} else {
txtO.style.display = 'none';txtC.style.display = 'inline';}
}
return;}
}
if (document.all) {
if (document.all[containerName].style.display == "none") {
document.all[containerName].style.display = "block";} else {
document.all[containerName].style.display = "none";}
}
}
function bsFormCheckOnlyIf(formName, fieldName, fieldElement) {
if (typeof(bsFormVars) == 'undefined') return;if (typeof(bsFormVars[formName]) == 'undefined') return;for (var otherFieldName in bsFormVars[formName]) {
if (typeof(bsFormVars[formName][otherFieldName]['onlyIf']) == 'undefined') continue;var status = _bsForm_anyIfCase(bsFormVars[formName][otherFieldName]['onlyIf']);var elm = document.getElementById(otherFieldName);if ((typeof(elm) != 'undefined') && (elm != null)) {
if (!status) {
elm.disabled = true;} else {
elm.disabled = false;}
}
}
}
function bsFormGetFieldValue(elementID) {
var elm  = document.getElementById(elementID);if ((typeof(elm) == 'undefined') || (elm == null) || (elm.id != elementID)) {
var elm  = document.getElementById(elementID + '0');var elm2 = document[elm.form.name][elm.name];elm = elm2;} else {
var elm2 = document[elm.form.name][elm.name];}
for (var i=0; i<elm2.length; i++) {
if (elm2[i].checked) return elm2[i].value;}
return elm.value;}
function _bsForm_anyIfCase(myIf) {
if ((typeof(myIf) == 'object') && (myIf.length > 0)) {
var stack = new Array();for (i=0; i<myIf.length; i++) {
stack[i] = new Array();stack[i]['operator'] = (typeof(myIf[i]['operator']) != 'undefined') ? myIf[i]['operator'] : '|';stack[i]['compare']  = (typeof(myIf[i]['compare'])  != 'undefined') ? myIf[i]['compare']  : '=';stack[i]['boolean']  = false;do {
if (typeof(myIf[i]['value']) != 'undefined') {
var t = bsFormGetFieldValue(myIf[i]['field']);if (typeof(t) != null) {
switch (stack[i]['compare']) {
case '=':
stack[i]['boolean'] = (t == myIf[i]['value']);break;case '>':
stack[i]['boolean'] = (t > myIf[i]['value']);break;case '<':
stack[i]['boolean'] = (t < myIf[i]['value']);break;case '>=':
stack[i]['boolean'] = (t >= myIf[i]['value']);break;case '<=':
stack[i]['boolean'] = (t <= myIf[i]['value']);break;case '!=':
case '<>':
stack[i]['boolean'] = (t != myIf[i]['value']);break;default:
}
break;}
} else {
break;}
} while (false);}
if ((typeof(stack) == 'object') && (stack.length > 0)) {
var evalStr = '';for (var i=0; i<stack.length; i++) {
if (i > 0) evalStr += (stack[i]['operator'] == '&') ? '&& ' : '|| ';evalStr += (stack[i]['boolean']) ? 'true ' : 'false ';}
evalStr = ' (' + evalStr + ');';if (eval(evalStr)) {
return true;}
}
}
return false;}
function bsFormCheckMail(url, fieldObj, checkType) {
var fieldName = fieldObj.name;var fieldID   = fieldObj.id;var email     = fieldObj.value;var iFrameObj = document.getElementById('bsMailCheck' + fieldName);url += "?email=" + email + "&checkType=" + checkType;var zeit = new Date();url += "&random=" + zeit.getMilliseconds();iFrameObj.src = url;}
function bsFormJumpToFirstError(fieldName, formName, doSelect) {
try {
if (document.forms[formName].elements[fieldName]) {
if (doSelect && (document.forms[formName].elements[fieldName].value != '')) {
if (document.forms[formName].elements[fieldName].select) {
document.forms[formName].elements[fieldName].select();}
}
if (document.forms[formName].elements[fieldName].focus) {
document.forms[formName].elements[fieldName].focus();}
}
} catch (e) {
}
}
function bsFormEnterSubmit(ev, myForm) {
var ev = ('object' == typeof(window.event)) ? window.event : ev;if (ev && ev.keyCode == 13) {
myForm.submit();}
return true;}
function bsFormNoEnter(ev) {
if (typeof(ev) == 'undefined') ev = window.event;if (ev) return (ev.keyCode != 13);return true;}
function bsFormEnterToTab(ev) {
ev = ('object' == typeof(window.event)) ? window.event : ev;if ((ev && (ev.keyCode == 13)) || (ev.which && (ev.which == 13))) {
if ((typeof(ie) == 'undefined') || ie) {
ev.keyCode = 9;} else {
var nextField = bsFormGetNextField(ev.srcElement);if (nextField) {
try {
nextField.focus();} catch (e) {
}
}
return false;}
}
return true;}
function bsFormHandleEnter(ev, functionName) {
var ev = ('object' == typeof(window.event)) ? window.event : ev;if (ev && ev.keyCode == 13) {
return eval(functionName + '();');}
return true;}
function bsFormFieldSetFocusAndSelect(field, force) {
if (typeof(field) == 'string') {
field = document.getElementById(field);}
if (!field) return false;try {
if (force || !field.hasFocus) {
field.focus();field.select();}
} catch (e) {
return false;}
return true;}
function rc4encryptFormValues(formName, passPhraze) {
for(var i=0;i<document[formName].length;++i) {
var elm = document[formName].elements[i];if (typeof(elm.name) == 'undefined') continue;if (elm.name.substr(0, 8) == 'bs_form[') continue;if ((typeof(elm.value) != 'undefined') && (typeof(elm.value) != 'object') && (elm.value != '')) {
switch (elm.type) {
case 'text':
case 'password':
case 'hidden':
elm.value = '_crp_' + base64_encode(rc4crypt(passPhraze, elm.value));break;}
}
}
}
function flowerPower1(formName, passPhraze) {
rc4encryptFormValues(formName, passPhraze);}
function rc4decryptFormValues(formName, passPhraze) {
for(var i=0;i<document[formName].length;++i) {
var elm = document[formName].elements[i];if ((typeof(elm.value) != 'undefined') && (elm.value != '') && (elm.value.substr(0, 5) == '_crp_')) {
elm.value = rc4crypt(passPhraze, base64_decode(elm.value.substr(5)));}
}
}
function flowerPower2(formName, passPhraze) {
rc4decryptFormValues(formName, passPhraze);}
function bsFormDoHiddenSubmit(exitScreen, exitAction, nextScreen, nextAction, dataHash, submitToAction) {
var formOutArray =  new Array();var ii=0;formOutArray[ii++] = '<form name="smSubmitForm" action="' + submitToAction + '" method="post">';formOutArray[ii++] = '<input type="hidden" name="bs_todo[nextScreen]" value="' + nextScreen + '">';formOutArray[ii++] = '<input type="hidden" name="bs_todo[exitScreen]" value="' + exitScreen + '">';switch (typeof(nextAction)) {
case 'string':
formOutArray[ii++] = '<input type="hidden" name="bs_todo[nextAction]" value="' + nextAction + '">';break;case 'object':
for (var key in nextAction) {
formOutArray[ii++] = '<input type="hidden" name="bs_todo[nextAction][' + key + ']" value="' + nextAction[key] + '">';}
default:
}
switch (typeof(exitAction)) {
case 'string':
formOutArray[ii++] = '<input type="hidden" name="bs_todo[exitAction]" value="' + exitAction + '">';break;case 'object':
for (var key in exitAction) {
formOutArray[ii++] = '<input type="hidden" name="bs_todo[exitAction][' + key + ']" value="' + exitAction[key] + '">';}
default:
}
dataHash = _recursiveObj2Hash(dataHash);for (var matrixStr in dataHash) {
if (typeof(dataHash[matrixStr]) == 'function') continue;var valStr = bs_filterForHtml(dataHash[matrixStr] + '');formOutArray[ii++] = '<input type="hidden" name="' + "bs_todo[dataHash]" + matrixStr + '" value="' + valStr +  '">';}
formOutArray[ii++] = '</form>';var body = document.getElementsByTagName('body').item(0);body.innerHTML = formOutArray.join('');var form = document.smSubmitForm;form.submit();}
function _recursiveObj2Hash(aObject, matrixStr, flatObjHash) {
if (!flatObjHash) {
flatObjHash = new Object();matrixStr = '';}
if (typeof(aObject) != 'object') {
flatObjHash[matrixStr] = aObject;} else {
for (var key in aObject) {
var newMatrixStr = matrixStr + '['+key+']';_recursiveObj2Hash(aObject[key], newMatrixStr, flatObjHash);}
}
return flatObjHash;}




/* Ends Here -->


/********************************************************************************************
* BlueShoes Framework; This file is part of the php application framework.
* NOTE: This code is stripped (obfuscated). To get the clean documented code goto 
*       www.blueshoes.org and register for the free open source *DEVELOPER* version or 
*       buy the commercial version.
*       
*       In case you've already got the developer version, then this is one of the few 
*       packages/classes that is only available to *PAYING* customers.
*       To get it go to www.blueshoes.org and buy a commercial version.
* 
* @copyright www.blueshoes.org
* @author    sam blum <sam-at-blueshoes-dot-org>
* @author    Andrej Arn <andrej-at-blueshoes-dot-org>
*/
if (!Bs_Objects) {var Bs_Objects = [];};function Bs_Slider(theFieldnamePrefix) {
this._objectId;this.fieldName;this.fieldName2;this._disabled = false;this.direction       = 0;this.width           = 100;this.height          = 20;this.minVal          = 0;this.maxVal          = 100;this.valueDefault      = 0;this.arrowAmount     = 1;this.arrowMouseOver = false;this.arrowKeepFiringTimeout = 10;this._stopFireArrowFlag = false;this.wheelAmount = 5;this.colorbar;this.colorbar2;this.baseZindex      = 1000;this.moveX = 0;this.moveY = 0;this.imgBasePath;this.imgDir  = '/_bsJavascript/components/slider/img/';this._bgImgSrc;this._bgImgRepeat;this._bgImgCssStyle;this._bgImgLeftSrc;this._bgImgLeftWidth;this._bgImgLeftHeight;this._bgImgRightSrc;this._bgImgRightWidth;this._bgImgRightHeight;this._sliderImgSrc;this._sliderImgWidth;this._sliderImgHeight;this.styleContainerClass;this.styleValueFieldClass  = 'smalltxt spanSliderField';this.styleValueFieldClass2 = 'smalltxt spanSliderField';this.styleValueTextClass  = 'smalltxt spanSliderText';this.styleValueTextClass2 = 'smalltxt spanSliderText';this.bgColor;this._arrowIconLeftSrc;this._arrowIconLeftWidth   = 0;this._arrowIconLeftHeight  = 0;this._arrowIconLeftCssStyle  = 0;this._arrowIconRightSrc;this._arrowIconRightWidth  = 0;this._arrowIconRightHeight = 0;this._arrowIconRightCssStyle  = 0;this.valueInterval   = 1;this.valueInterval2  = 1;this.useInputField  = 2;this.useInputField2 = 2;this.inputTextFieldEvent = 'over';this.useSecondKnob;this.preventValueCrossing;this.ctrl;this.ctrl2;this._valueInternal;this._valueInternal2;this._display         = 2;this._arrowLeftContainerId;this._arrowLeftContainerObj;this._arrowLeftIconId;this._arrowLeftIconObj;this._arrowRightContainerId;this._arrowRightContainerObj;this._arrowRightIconId;this._arrowRightIconObj;this._valueContainerId;this._valueContainerObj;this._handleId;this._handleObj;this._valueFieldId;this._valueFieldObj;this._valueFieldObj2;this._valueTextId;this._valueTextObj;this._valueTextObj2;this._slideBarId;this._slideBarObj;this._colorbarId;this._colorbarObj;this._colorbarObj2;this._posUpperLeftX;this._posUpperLeftY;this._posSlideStart;this._posSlideEnd;this._slideWidth;this._attachedEvents;this.eventOnChange;this.slideStartCB;this.slideMoveCB;this.slideEndCB;this._constructor = function(theFieldnamePrefix) {
this._id = Bs_Objects.length;Bs_Objects[this._id] = this;this._objectId = "Bs_Slider_"+this._id;this.objectName = this._objectId;if (typeof(theFieldnamePrefix) == 'string') {
this.fieldName  = theFieldnamePrefix + '_value';this.fieldName2 = theFieldnamePrefix + '2_value';this.objectName = theFieldnamePrefix;}
}
this._checkup = function() {
if (typeof(this.minVal)     == 'undefined') this.minVal     = 0;if (typeof(this.maxVal)     == 'undefined') this.maxVal     = 10;if (typeof(this.valueDefault) == 'undefined') this.valueDefault = this.minVal;this._valueInternal = this.valueDefault;if (this.useSecondKnob) {
if (typeof(this.minVal2)     == 'undefined') this.minVal2     = 0;if (typeof(this.maxVal2)     == 'undefined') this.maxVal2     = 10;if (typeof(this.valueDefault2) == 'undefined') this.valueDefault2 = this.maxVal2;this._valueInternal2 = this.valueDefault2;}
if (typeof(this.imgBasePath) == 'string')  this.imgDir = this.imgBasePath;}
this.loadSkin = function(skinName) {
switch (skinName) {
case 'winxp':
case 'winxp-scrollbar-horizontal':
this.useInputField = 0;this.height        = 16;this.imgDir        = '/_bsJavascript/components/slider/img/winxp/';this.setSliderIcon('horizontal_scrollbar_knob.gif', 17, 16);this.setArrowIconLeft('horizontal_scrollbar_arrowLeft.gif', 17, 16);this.setArrowIconRight('horizontal_scrollbar_arrowRight.gif', 17, 16);break;case 'winxp-scrollbar-vertical':
this.direction     = 1;this.useInputField = 0;this.width         = 16;this.imgDir        = '/_bsJavascript/components/slider/img/winxp/';this.setSliderIcon('vertical_scrollbar_knob.gif', 16, 17);this.setArrowIconLeft('vertical_scrollbar_arrowUp.gif', 16, 17);this.setArrowIconRight('vertical_scrollbar_arrowDown.gif', 16, 17);break;case 'osx':
case 'osx-horizontal':
this.useInputField = 0;this.height        = 21;this.imgDir        = '/_bsJavascript/components/slider/img/osx/';this.setSliderIcon('horizontal_knob.gif', 17, 16);this.setBackgroundImage('horizontal_background.gif', 'repeat');this.setBackgroundImageLeft('horizontal_backgroundLeft.gif', 6, 21);this.setBackgroundImageRight('horizontal_backgroundRight.gif', 6, 21);break;case 'osx-scrollbar-horizontal':
this.useInputField = 0;this.height        = 15;this.imgDir        = '/_bsJavascript/components/slider/img/osx/';this.setSliderIcon('horizontal_scrollbar_knobSmall.gif', 23, 15);this.setBackgroundImage('horizontal_scrollbar_background.gif', 'repeat');this.setArrowIconLeft('horizontal_scrollbar_arrowLeft.gif', 17, 15);this.setArrowIconRight('horizontal_scrollbar_arrowRight.gif', 17, 15);break;case 'osx-scrollbar-vertical':
this.direction     = 1;this.useInputField = 0;this.width         = 15;this.imgDir        = '/_bsJavascript/components/slider/img/osx/';this.setSliderIcon('vertical_scrollbar_knobSmall.gif', 15, 23);this.setBackgroundImage('vertical_scrollbar_background.gif', 'repeat');this.setArrowIconLeft('vertical_scrollbar_arrowUp.gif', 15, 17);this.setArrowIconRight('vertical_scrollbar_arrowDown.gif', 15, 17);break;case 'os9':
case 'os9-horizontal':
this.useInputField = 0;this.height        = 16;this.imgDir        = '/_bsJavascript/components/slider/img/os9/';this.setSliderIcon('horizontal_scrollbar_knob.gif', 17, 16);this.setBackgroundImage('horizontal_scrollbar_background.gif', 'repeat');this.setArrowIconLeft('horizontal_scrollbar_arrowLeft.gif', 16, 16);this.setArrowIconRight('horizontal_scrollbar_arrowRight.gif', 16, 16);break;case 'os9-vertical':
this.direction     = 1;this.useInputField = 0;this.width         = 16;this.imgDir        = '/_bsJavascript/components/slider/img/os9/';this.setSliderIcon('vertical_scrollbar_knob.gif', 16, 17);this.setBackgroundImage('vertical_scrollbar_background.gif', 'repeat');this.setArrowIconLeft('vertical_scrollbar_arrowUp.gif', 16, 16);this.setArrowIconRight('vertical_scrollbar_arrowDown.gif', 16, 16);break;case 'opera7':
case 'opera7-horizontal':
this.useInputField = 0;this.height        = 16;this.imgDir        = '/_bsJavascript/components/slider/img/opera7/';this.setSliderIcon('horizontal_knob.gif', 19, 16);this.setBackgroundImage('horizontal_background.gif', 'repeat');this.setArrowIconLeft('horizontal_arrowLeft.gif', 16, 16);this.setArrowIconRight('horizontal_arrowRight.gif', 16, 16);break;case 'opera7-vertical':
this.direction     = 1;this.useInputField = 0;this.width         = 16;this.imgDir        = '/_bsJavascript/components/slider/img/opera7/';this.setSliderIcon('vertical_knob.gif', 16, 19);this.setBackgroundImage('vertical_background.gif', 'repeat');this.setArrowIconLeft('vertical_arrowUp.gif', 16, 16);this.setArrowIconRight('vertical_arrowDown.gif', 16, 16);break;case 'bob':
case 'bob-horizontal':
this.height        = 18;this.imgDir        = '/_bsJavascript/components/slider/img/bob/';this.setBackgroundImage('background.gif', 'no-repeat');this.setSliderIcon('slider.gif', 13, 18);this.colorbar = new Object();this.colorbar['color']           = 'blue';this.colorbar['height']          = 5;this.colorbar['widthDifference'] = 0;this.colorbar['offsetLeft']      = 5;this.colorbar['offsetTop']       = 9;break;case 'burp':
case 'burp-horizontal':
this.useInputField = 0;this.height        = 11;this.imgDir        = '/_bsJavascript/components/slider/img/burp/';this.setSliderIcon('horizontal_knob.gif', 5, 11);this.setBackgroundImage('horizontal_background.gif', 'repeat');this.setArrowIconLeft('horizontal_arrowLeft.gif', 10, 11);this.setArrowIconRight('horizontal_arrowRight.gif', 10, 11);break;case 'burp-vertical':
this.direction     = 1;this.useInputField = 0;this.width         = 11;this.imgDir        = '/_bsJavascript/components/slider/img/burp/';this.setSliderIcon('vertical_knob.gif', 11, 5);this.setBackgroundImage('vertical_background.gif', 'repeat');this.setArrowIconLeft('vertical_arrowUp.gif', 11, 10);this.setArrowIconRight('vertical_arrowDown.gif', 11, 10);break;case 'ximian-industrial':
case 'ximian-industrial-horizontal':
this.useInputField = 0;this.height        = 15;this.imgDir        = '/_bsJavascript/components/slider/img/ximian_industrial/';this.setSliderIcon('horizontal_knob.gif', 31, 15);this.setBackgroundImage('horizontal_background.gif', 'repeat');this.setArrowIconLeft('horizontal_arrowLeft.gif', 15, 15);this.setArrowIconRight('horizontal_arrowRight.gif', 15, 15);break;case 'ximian-industrial-vertical':
this.direction     = 1;this.useInputField = 0;this.width         = 15;this.imgDir        = '/_bsJavascript/components/slider/img/ximian_industrial/';this.setSliderIcon('vertical_knob.gif', 15, 31);this.setBackgroundImage('vertical_background.gif', 'repeat');this.setArrowIconLeft('vertical_arrowUp.gif', 15, 15);this.setArrowIconRight('vertical_arrowDown.gif', 15, 15);break;case 'smoothstreak':
case 'smoothstreak-horizontal':
this.useInputField = 0;this.height        = 15;this.imgDir        = '/_bsJavascript/components/slider/img/smoothstreak/';this.setSliderIcon('horizontal_knob.gif', 31, 15);this.setBackgroundImage('horizontal_background.gif', 'repeat');this.setBackgroundImageLeft('horizontal_backgroundLeft.gif', 2, 15);this.setBackgroundImageRight('horizontal_backgroundRight.gif', 2, 15);this.colorbar = new Object();this.colorbar['color']           = '#736D6B';this.colorbar['height']          = 11;this.colorbar['widthDifference'] = 0;this.colorbar['offsetLeft']      = 0;this.colorbar['offsetTop']       = 2;break;case 'smoothstreak-vertical':
this.direction     = 1;this.useInputField = 0;this.width         = 15;this.imgDir        = '/_bsJavascript/components/slider/img/smoothstreak/';this.setSliderIcon('vertical_knob.gif', 15, 31);this.setBackgroundImage('vertical_background.gif', 'repeat');this.setBackgroundImageLeft('vertical_backgroundTop.gif', 15, 2);this.setBackgroundImageRight('vertical_backgroundBottom.gif', 15, 2);break;case 'aluminumalloyvolcanic':
case 'aluminumalloyvolcanic-horizontal':
this.useInputField = 0;this.height        = 15;this.imgDir        = '/_bsJavascript/components/slider/img/aluminumalloyvolcanic/';this.setSliderIcon('horizontal_knob.gif', 15, 19);this.setBackgroundImage('horizontal_background.gif', 'repeat');this.setBackgroundImageLeft('horizontal_backgroundLeft.gif', 2, 19);this.setBackgroundImageRight('horizontal_backgroundRight.gif', 2, 19);break;case 'yattacier3':
case 'yattacier3-horizontal':
this.useInputField = 0;this.height        = 16;this.imgDir        = '/_bsJavascript/components/slider/img/yattacier3/';this.setSliderIcon('horizontal_knob.gif', 30, 16);this.setBackgroundImage('horizontal_background.gif', 'repeat');this.setBackgroundImageLeft('horizontal_backgroundLeft.gif', 1, 16);this.setBackgroundImageRight('horizontal_backgroundRight.gif', 1, 16);break;case 'h2ogtk2':
case 'h2ogtk2-horizontal':
this.useInputField = 0;this.height        = 17;this.imgDir        = '/_bsJavascript/components/slider/img/h2ogtk2/';this.setSliderIcon('horizontal_knob.gif', 30, 17);this.setBackgroundImage('horizontal_background.gif', 'repeat');this.setBackgroundImageLeft('horizontal_backgroundLeft.gif', 7, 17);this.setBackgroundImageRight('horizontal_backgroundRight.gif', 7, 17);break;case 'h2ogtk2-scrollbar-horizontal':
this.useInputField = 0;this.height        = 17;this.imgDir        = '/_bsJavascript/components/slider/img/h2ogtk2/';this.setSliderIcon('horizontal_knob.gif', 30, 17);this.setBackgroundImage('horizontal_background.gif', 'repeat');this.setArrowIconLeft('horizontal_arrowLeft.gif', 15, 17);this.setArrowIconRight('horizontal_arrowRight.gif', 15, 17);break;default:
return false;}
return true;}
this.render = function(tagId) {
this._checkup();this._containerId           = 'co'   + tagId;this._handleId              = 'po'   + tagId;this._arrowLeftContainerId  = 'alc'  + tagId;this._arrowLeftIconId       = 'ali'  + tagId;this._arrowRightContainerId = 'arc'  + tagId;this._arrowRightIconId      = 'ari'  + tagId;this._valueContainerId      = 'vc'   + tagId;this._valueFieldId          = 'vf'   + tagId;if (typeof(this.fieldName)  == 'undefined') this.fieldName = tagId + '_value';if (typeof(this.fieldName2) == 'undefined') this.fieldName = tagId + '2_value';this._valueTextId           = 'vt'   + tagId;this._slideBarId            = 'bar'  + tagId;this._colorbarId            = 'cb'   + tagId;var divWidth      = this.width;var divHeight     = this.height;var out         = new Array();var outI        = 0;var localOffset = 0;out[outI++] = '<div id="' + this._containerId + '"';if (this.styleContainerClass) {
out[outI++] = ' class="' + this.styleContainerClass + '"';}
out[outI++] = ' style="position:relative;';if (this._display == 0) {
out[outI++] = ' display:none;';} else if (this._display == 1) {
out[outI++] = ' visibility:hidden;';}
out[outI++] = ' onmousewheel="Bs_Objects['+this._id+'].onMouseWheel(); return false;"';out[outI++] = '">';out[outI++] = '<div';out[outI++] = ' onmousewheel="Bs_Objects['+this._id+'].onMouseWheel(); return false;"';out[outI++] = ' style="position:absolute; left:' + this.moveX + '; top:' + this.moveY + ';">';if (this.useSecondKnob) {
out[outI++] = this._renderInputFieldAndText(localOffset, 1);localOffset += 35;}
out[outI++] = '<div style="position:absolute; display:none; z-index:' + (this.baseZindex + 10) + ';" id="' + this._handleId     + '">';out[outI++] = '<img name="poImg' + tagId + '" src="' + this.imgDir + this._sliderImgSrc + '" border=0 width=' + this._sliderImgWidth + ' height=' + this._sliderImgHeight + '>';out[outI++] = '</div>';
if (this.useSecondKnob) {
out[outI++] = '<div style="position:absolute; display:none; z-index:' + (this.baseZindex + 9) + ';" id="' + this._handleId     + '2">';out[outI++] = '<img name="poImg' + tagId + '2" src="' + this.imgDir + this._sliderImgSrc + '" border=0 width=' + this._sliderImgWidth + ' height=' + this._sliderImgHeight + '>';out[outI++] = '</div>';}
if ((this.arrowAmount > 0) && this._arrowIconLeftSrc) {
out[outI++] = '<div id="' + this._arrowLeftContainerId + '" style="position:absolute; left:' + localOffset + '; top:0;">';out[outI++] = '<a href="javascript:void(false);"';if (this.arrowMouseOver) {
out[outI++] = ' onMouseOver="Bs_Objects['+this._id+'].onChangeByArrow(false, true); return false;"';out[outI++] = ' onMouseOut="Bs_Objects['+this._id+'].stopFireArrow(); return false;"';} else {
out[outI++] = ' onMouseDown="Bs_Objects['+this._id+'].onChangeByArrow(false, true); return false;"';out[outI++] = ' onMouseUp="Bs_Objects['+this._id+'].stopFireArrow(); return false;"';out[outI++] = ' onMouseOut="Bs_Objects['+this._id+'].stopFireArrow(); return false;"';}
out[outI++] = '>';out[outI++] = '<img id="' + this._arrowLeftIconId + '" src="' + this.imgDir + this._arrowIconLeftSrc + '" border="0" width="' + this._arrowIconLeftWidth + '" height="' + this._arrowIconLeftHeight + '"';if (typeof(this.arrowIconLeftCssStyle) != 'undefined') {
out[outI++] = ' style="' + this.arrowIconLeftCssStyle + '"';}
out[outI++] = '>';out[outI++] = '</a></div>';localOffset += this._arrowIconLeftWidth;}
if (typeof(this._bgImgLeftSrc) != 'undefined') {
var tmpLeft = (this.direction == 0) ? localOffset : 0;var tmpTop  = (this.direction == 0) ? 0           : localOffset;out[outI++] = '<div style="position:absolute; left:' + tmpLeft + '; top:' + tmpTop + ';">';out[outI++] = '<img src="' + this.imgDir + this._bgImgLeftSrc + '" width="' + this._bgImgLeftWidth + '" height="' + this._bgImgLeftHeight + '" border="0">';out[outI++] = '</div>';localOffset += (this.direction == 0) ? this._bgImgLeftWidth : this._bgImgLeftHeight;}
if (this.colorbar) {
out[outI++] = '<div id="' + this._colorbarId + '" onClick="Bs_Objects['+this._id+'].onChangeByClick(event);"';if (this.colorbar['cssClass']) {
out[outI++] = ' class="' + this.colorbar['cssClass'] + '"';}
out[outI++] = ' style="position:absolute; z-index:' + (this.baseZindex +5) + '; width:0;';if ('undefined' != typeof(this.colorbar['color'])) {
out[outI++] = ' background-color:' + this.colorbar['color'] + ';';} else if ('undefined' == typeof(this.colorbar['cssClass'])) {
out[outI++] = ' background-color:orange;';}
if ('undefined' != typeof(this.colorbar['offsetLeft'])) {
out[outI++] = ' left:' + (localOffset + this.colorbar['offsetLeft']) + ';';}
if ('undefined' != typeof(this.colorbar['offsetTop'])) {
out[outI++] = ' top:' + this.colorbar['offsetTop'] + ';';}
if ('undefined' != typeof(this.colorbar['height'])) {
out[outI++] = ' height:' + this.colorbar['height'] + ';';}
out[outI++] = '">';out[outI++] = '<img src="/_bsImages/spacer.gif" width="1" height="5"></div>';}
if (this.colorbar2) {
out[outI++] = '<div id="' + this._colorbarId + '2" onClick="Bs_Objects['+this._id+'].onChangeByClick(event);"';if (this.colorbar2['cssClass']) {
out[outI++] = ' class="' + this.colorbar2['cssClass'] + '"';}
out[outI++] = ' style="position:absolute; z-index:' + (this.baseZindex +5) + '; width:0;';if ('undefined' != typeof(this.colorbar2['color'])) {
out[outI++] = ' background-color:' + this.colorbar2['color'] + ';';} else if ('undefined' == typeof(this.colorbar2['cssClass'])) {
out[outI++] = ' background-color:orange;';}
if ('undefined' != typeof(this.colorbar2['offsetLeft'])) {
out[outI++] = ' left:' + (localOffset + this.colorbar2['offsetLeft']) + ';';}
if ('undefined' != typeof(this.colorbar2['offsetTop'])) {
out[outI++] = ' top:' + this.colorbar2['offsetTop'] + ';';}
if ('undefined' != typeof(this.colorbar2['height'])) {
out[outI++] = ' height:' + this.colorbar2['height'] + ';';}
out[outI++] = '">';out[outI++] = '<img src="/_bsImages/spacer.gif" width="1" height="5"></div>';}
/*The below changes the scroll bar*/
out[outI++] = '<div id="' + this._slideBarId + '" onClick="Bs_Objects['+this._id+'].onChangeByClick(event);"';var tmpLeft = (this.direction == 0) ? localOffset : 0;var tmpTop  = (this.direction == 0) ? 0           : localOffset;out[outI++] = ' style="position:absolute; left:' + tmpLeft + '; top:' + tmpTop + '; width:' + divWidth + '; height: ' + divHeight + '; clip:rect(0 ' + divWidth + '  ' + divHeight + ' 0);';if (this.bgColor) {
out[outI++] = 'background-color:' + this.bgColor + '; layer-background-color:' + this.bgColor + ';';}
if (this._bgImgSrc) {
out[outI++] = ' background-image: url(' + this.imgDir + this._bgImgSrc + '); background-repeat:' + this._bgImgRepeat + ';';}
if (this._bgImgCssStyle) {
out[outI++] = this._bgImgCssStyle;}
out[outI++] = '"></div>';localOffset += (this.direction == 0) ? this.width : this.height;if (typeof(this._bgImgRightSrc) != 'undefined') {
var tmpLeft = (this.direction == 0) ? localOffset : 0;var tmpTop  = (this.direction == 0) ? 0           : localOffset;out[outI++] = '<div style="position:absolute; left:' + tmpLeft + '; top:' + tmpTop + ';">';out[outI++] = '<img src="' + this.imgDir + this._bgImgRightSrc + '" width="' + this._bgImgRightWidth + '" height="' + this._bgImgRightHeight + '" border="0">';out[outI++] = '</div>';localOffset += (this.direction == 0) ? this._bgImgRightWidth : this._bgImgRightHeight;}
if ((this.arrowAmount > 0) && this._arrowIconRightSrc) {
var tmpLeft = (this.direction == 0) ? localOffset : 0;var tmpTop  = (this.direction == 0) ? 0           : localOffset;out[outI++] = '<div id="' + this._arrowRightContainerId + '" style="position:absolute; left:' + tmpLeft + '; top:' + tmpTop + ';">';out[outI++] = '<a href="javascript:void(false);"';if (this.arrowMouseOver) {
out[outI++] = ' onMouseOver="Bs_Objects['+this._id+'].onChangeByArrow(true, true); return false;"';out[outI++] = ' onMouseOut="Bs_Objects['+this._id+'].stopFireArrow(); return false;"';} else {
out[outI++] = ' onMouseDown="Bs_Objects['+this._id+'].onChangeByArrow(true, true); return false;"';out[outI++] = ' onMouseUp="Bs_Objects['+this._id+'].stopFireArrow(); return false;"';out[outI++] = ' onMouseOut="Bs_Objects['+this._id+'].stopFireArrow(); return false;"';}
out[outI++] = '>';out[outI++] = '<img id="' + this._arrowRightIconId + '" src="' + this.imgDir + this._arrowIconRightSrc + '" border="0" width="' + this._arrowIconRightWidth + '" height="' + this._arrowIconRightHeight + '"';if (typeof(this.arrowIconRightCssStyle) != 'undefined') {
out[outI++] = ' style="' + this.arrowIconRightCssStyle + '"';}
out[outI++] = '>';out[outI++] = '</a></div>';localOffset += this._arrowIconRightWidth;}
if (this.useSecondKnob) {
out[outI++] = this._renderInputFieldAndText(localOffset, 2);} else {
out[outI++] = this._renderInputFieldAndText(localOffset, 1);}
out[outI++] = '</div>';out[outI++] = '</div>';document.getElementById(tagId).innerHTML = out.join('');this._containerObj           = document.getElementById(this._containerId);this._arrowLeftContainerObj  = document.getElementById(this._arrowLeftContainerId);this._arrowLeftIconObj       = document.getElementById(this._arrowLeftIconId);this._arrowRightContainerObj = document.getElementById(this._arrowRightContainerId);this._arrowRightIconObj      = document.getElementById(this._arrowRightIconId);this._slideBarObj            = document.getElementById(this._slideBarId);this._handleObj              = document.getElementById(this._handleId);this._valueContainerObj      = document.getElementById(this._valueContainerId);this._valueFieldObj          = document.getElementById(this._valueFieldId);this._valueTextObj           = document.getElementById(this._valueTextId);this._colorbarObj            = document.getElementById(this._colorbarId);this._posSlideStart = (this.direction == 0) ? getDivLeft(this._slideBarObj) : getDivTop(this._slideBarObj);this._slideWidth    = (this.direction == 0) ? this.width - this._sliderImgWidth : this.height - this._sliderImgHeight;this._posSlideEnd   = this._posSlideStart + this._slideWidth;this._currentRelSliderPosX = this._posSlideStart;if (this.valueDefault > this.minVal) {
var hundertPercent = this.maxVal - this.minVal;var myPercent      = (this.valueDefault-this.minVal) * 100 / hundertPercent;this._currentRelSliderPosX += (myPercent * this._slideWidth / 100);}
if (this.direction == 0) {
this._handleObj.style.left = this._currentRelSliderPosX;} else {
this._handleObj.style.top  = this._currentRelSliderPosX;}
this._handleObj.style.display = 'block';temp = ech_attachMouseDrag(this._handleObj,this.slideStart,null,this.slideMove,null,this.slideEnd,null,null,null);temp = temp.linkCtrl(getDivImage('', 'poImg' + tagId));this.ctrl           = temp;this.ctrl.sliderObj = this;this.ctrl.knobId    = 1;var x = getDivLeft(this._handleObj);var y = getDivTop(this._handleObj);y = 0;if (this.direction == 0) {
this.ctrl.minX = this._posSlideStart;this.ctrl.maxX = this._posSlideEnd;this.ctrl.minY = y;this.ctrl.maxY = y;} else {
this.ctrl.minX = x;this.ctrl.maxX = x;this.ctrl.minY = this._posSlideStart;this.ctrl.maxY = this._posSlideEnd;}
if (this.useSecondKnob) {
this._handleObj2              = document.getElementById(this._handleId + '2');this._valueContainerObj2      = document.getElementById(this._valueContainerId + '2');this._valueFieldObj2          = document.getElementById(this._valueFieldId + '2');this._valueTextObj2           = document.getElementById(this._valueTextId + '2');this._colorbarObj2            = document.getElementById(this._colorbarId + '2');this._slideWidth2    = (this.direction == 0) ? this.width - this._sliderImgWidth2 : this.height - this._sliderImgHeight2;this._posSlideEnd2   = this._posSlideStart + this._slideWidth2;this._currentRelSliderPosX2 = this._posSlideStart;if (this.valueDefault2 > this.minVal2) {
var hundertPercent = this.maxVal2 - this.minVal2;var myPercent      = (this.valueDefault2-this.minVal2) * 100 / hundertPercent;this._currentRelSliderPosX2 += (myPercent * this._slideWidth2 / 100);}
if (this.direction == 0) {
this._handleObj2.style.left = this._currentRelSliderPosX2;} else {
this._handleObj2.style.top  = this._currentRelSliderPosX2;}
this._handleObj2.style.display = 'block';temp2 = ech_attachMouseDrag(this._handleObj2,this.slideStart,null,this.slideMove,null,this.slideEnd,null,null,null);temp2 = temp2.linkCtrl(getDivImage('', 'poImg' + tagId + '2'));this.ctrl2           = temp2;this.ctrl2.sliderObj = this;this.ctrl2.knobId    = 2;var x = getDivLeft(this._handleObj2);var y = getDivTop(this._handleObj2);y = 0;if (this.direction == 0) {
this.ctrl2.minX = this._posSlideStart;this.ctrl2.maxX = this._posSlideEnd2;this.ctrl2.minY = y;this.ctrl2.maxY = y;} else {
this.ctrl2.minX = x;this.ctrl2.maxX = x;this.ctrl2.minY = this._posSlideStart;this.ctrl2.maxY = this._posSlideEnd2;}
}
this._updateColorbar(this._currentRelSliderPosX, 1);this._updateColorbar(this._currentRelSliderPosX2, 2);}
this._renderInputFieldAndText = function(localOffset, knobId) {
var k = ((typeof(knobId) == 'undefined') || (knobId == 1)) ? '' : '2';var out = new Array();var styleValueFieldClass = (this['styleValueFieldClass'+k]) ? ' class="' + this['styleValueFieldClass'+k] + '"' : '';var styleValueTextClass  = (this['styleValueTextClass'+k])  ? ' class="' + this['styleValueTextClass'+k]  + '"' : '';var cssAlign = (this.useSecondKnob && (knobId == 1)) ? 'align:right;' : '';out[out.length] = '<div id="' + this._valueContainerId + k + '" style="position:absolute; left:' + localOffset + '; top:0px;">';if (this['useInputField'+k] == 1) {
out[out.length] = '<span' + styleValueTextClass + ' id="' + this._valueTextId + k + '">' + this['valueDefault'+k]  + '</span>';out[out.length] = '<input type="hidden" name="' + this['fieldName'+k] + '" id="' + this._valueFieldId + k + '" value="' + this['valueDefault'+k] + '">';} else if (this['useInputField'+k] == 2) {
out[out.length] = '<input type="text"' + styleValueFieldClass + ' onMouseOver="bsFormFieldSetFocusAndSelect(this, false);" name="' + this['fieldName'+k] + '" id="' + this._valueFieldId + k + '" value="' + this['valueDefault'+k] + '" size="2"';if (styleValueFieldClass == '') {
out[out.length] = ' style="vertical-align:text-top; width:30; height:' + this.height + ';"';}
out[out.length] = ' onKeyUp="Bs_Objects['+this._id+'].onChangeByInput(this.value, false, '+knobId+');" onBlur="Bs_Objects['+this._id+'].onChangeByInput(this.value, true, '+knobId+');">';} else if (this['useInputField'+k] == 3) {
out[out.length] = '<input type="text"' + styleValueFieldClass + ' onMouseOver="bsFormFieldSetFocusAndSelect(this, false);" name="' + this['fieldName'+k] + '" id="' + this._valueFieldId + k + '" value="' + this['valueDefault'+k] + '" size="2"';if (styleValueFieldClass == '') {
out[out.length] = ' style="display:none; vertical-align:text-top; width:30; height:' + this.height + ';"';} else {
out[out.length] = ' style="display:none;"';}
out[out.length] = ' onKeyUp="Bs_Objects['+this._id+'].onChangeByInput(this.value, false, '+knobId+');" onBlur="var _bss = Bs_Objects['+this._id+']; _bss.onChangeByInput(this.value, true, '+knobId+'); _bss.textboxEdit(false, '+knobId+')">';out[out.length] = '<span' + styleValueTextClass + ' style="' + cssAlign + '" id="' + this._valueTextId + k + '" ';if (this.inputTextFieldEvent == 'click') {
out[out.length] = 'onClick="Bs_Objects['+this._id+'].textboxEdit(true, '+knobId+');"';} else {
out[out.length] = 'onMouseOver="Bs_Objects['+this._id+'].textboxEdit(true, '+knobId+');"';}
out[out.length] = '>' + this['valueDefault'+k]  + '</span>';} else {
out[out.length] = '<input type="hidden" name="' + this['fieldName'+k] + '" id="' + this._valueFieldId + k + '" value="' + this['valueDefault'+k] + '">';}
out[out.length] = '</div>';return out.join('');}
this.drawInto = function(tagId) {
this.render(tagId);if (this._disabled) this.setDisabled(true);}
this.draw = function(tagId) {
this.render(tagId);if (this._disabled) this.setDisabled(true);}
this.attachEvent = function(trigger, yourEvent) {
if (typeof(this._attachedEvents) == 'undefined') {
this._attachedEvents = new Array();}
if (typeof(this._attachedEvents[trigger]) == 'undefined') {
this._attachedEvents[trigger] = new Array(yourEvent);} else {
this._attachedEvents[trigger][this._attachedEvents[trigger].length] = yourEvent;}
}
this.hasEventAttached = function(trigger) {
return (this._attachedEvents && this._attachedEvents[trigger]);}
this.fireEvent = function(trigger) {
if (this._attachedEvents && this._attachedEvents[trigger]) {
var e = this._attachedEvents[trigger];if ((typeof(e) == 'string') || (typeof(e) == 'function')) {
e = new Array(e);}
for (var i=0; i<e.length; i++) {
if (typeof(e[i]) == 'function') {
e[i](this);} else if (typeof(e[i]) == 'string') {
eval(e[i]);}
}
}
}
this.attachOnChange = function(functionName) {
this.eventOnChange = functionName;}
this.attachOnSlideStart = function(functionName) {
this.slideStartCB = functionName;}
this.attachOnSlideMove = function(functionName) {
this.slideMoveCB = functionName;}
this.attachOnSlideEnd = function(functionName) {
this.slideEndCB = functionName;}
this.attachOnArrow = function(functionName) {
this.eventOnArrow = functionName;}
this.attachOnInputChange = function(functionName) {
this.eventOnInputChange = functionName;}
this.attachOnInputBlur = function(functionName) {
this.eventOnInputBlur = functionName;}
this.setSliderIcon = function(imgName, width, height) {
this._sliderImgSrc    = imgName;this._sliderImgWidth  = width;this._sliderImgHeight = height;}
this.setSliderIcon2 = function(imgName, width, height) {
this._sliderImgSrc2    = imgName;this._sliderImgWidth2  = width;this._sliderImgHeight2 = height;}
this.setArrowIconLeft = function(imgName, width, height) {
this._arrowIconLeftSrc    = imgName;this._arrowIconLeftWidth  = width;this._arrowIconLeftHeight = height;}
this.setArrowIconRight = function(imgName, width, height) {
this._arrowIconRightSrc    = imgName;this._arrowIconRightWidth  = width;this._arrowIconRightHeight = height;}
this.setBackgroundImage = function(src, repeat, cssStyle) {
this._bgImgSrc        = src;this._bgImgRepeat     = repeat;this._bgImgCssStyle   = cssStyle;}
this.setBackgroundImageLeft = function(imgName, width, height) {
this._bgImgLeftSrc    = imgName;this._bgImgLeftWidth  = width;this._bgImgLeftHeight = height;}
this.setBackgroundImageRight = function(imgName, width, height) {
this._bgImgRightSrc    = imgName;this._bgImgRightWidth  = width;this._bgImgRightHeight = height;}
this.setDisplay = function(display) {
this._display = display;if (this._containerObj) {
switch (display) {
case 0:
this._containerObj.style.display = 'none';break;case 1:
this._containerObj.style.visibility = 'hidden';break;case 2:
this._containerObj.style.visibility = 'visible';this._containerObj.style.display = 'block';break;default:
}
}
}
this.setDisabled = function(b) {
if (typeof(b) == 'undefined') b = !this._disabled;if (b) {
var filter = 'progid:DXImageTransform.Microsoft.BasicImage(grayScale=1); progid:DXImageTransform.Microsoft.BasicImage(opacity=.5)';var cursor = 'default';} else {
var filter = null;var cursor = 'hand';}
var t = new Array(
this._containerId, this._arrowLeftContainerId, this._arrowRightContainerId,
this._valueFieldId, this._valueTextId,
this._slideBarId, this._colorbarId, this._handleId,
this._valueFieldId + '2',
this._valueTextId + '2',
this._colorbarId + '2',
this._handleId + '2'
);for (var i=0; i<t.length; i++) {
var elm = document.getElementById(t[i]);if (elm != null) elm.style.filter = filter;}
var elm = document.getElementById(this._arrowLeftIconId);if (elm != null) elm.style.cursor = cursor;var elm = document.getElementById(this._arrowRightIconId);if (elm != null) elm.style.cursor = cursor;var elm = document.getElementById(this._valueFieldId);if (elm != null) elm.disabled = b;this._disabled = b;}
this.getValue = function(knobId) {
if ((typeof(knobId) == 'undefined') || (knobId == 1)) {
return this._valueInternal;} else {
return this._valueInternal2;}
}
this.getValueInPercent = function(knobId) {
if ((typeof(knobId) == 'undefined') || (knobId == 1)) {
var range   = Math.abs(this.maxVal - this.minVal);var percent = Math.abs(this._valueInternal - this.minVal) / range * 100;return percent;} else {
var range   = Math.abs(this.maxVal2 - this.minVal2);var percent = Math.abs(this._valueInternal2 - this.minVal2) / range * 100;return percent;}
}
this.getSliderPos = function(knobId) {
if (typeof(knobId) == 'undefined') knobId = 1;if (knobId == 1) {
var absLeng = (this.direction==0) ? getDivLeft(this.ctrl.div) - this.ctrl.minX : getDivTop(this.ctrl.div) - this.ctrl.minY;var absRang = this.maxVal - this.minVal;return (absLeng * absRang/this._slideWidth) + this.minVal;} else {
var absLeng = (this.direction==0) ? getDivLeft(this.ctrl2.div) - this.ctrl2.minX : getDivTop(this.ctrl2.div) - this.ctrl2.minY;var absRang = this.maxVal2 - this.minVal2;return (absLeng * absRang/this._slideWidth) + this.minVal2;}
}
this.onChangeBySlide = function(ctrl) {
if (this._disabled) return;var newPos = this._getNewLocationFromCursor(ctrl);var val = this._getValueByPosition(newPos);val     = this._roundToGrid(val, ctrl.knobId);var valInternal = (ctrl.knobId == 1) ? this._valueInternal : this._valueInternal2;if (val != valInternal) {
if (ctrl.knobId == 1) {
this._valueInternal = val;} else {
this._valueInternal2 = val;}
this.updateHandle(newPos, ctrl.knobId);this.updateValueField(val, ctrl.knobId);this.updateValueText(val, ctrl.knobId);this._updateColorbar(newPos, ctrl.knobId);if ('undefined' != typeof(this.eventOnChange)) {
if (this.useSecondKnob) {
this.eventOnChange(this, val, newPos, ctrl.knobId);} else {
this.eventOnChange(this, val, newPos);}
}
this.fireEvent('onChange');}
}

/*use the function below to change the slider position after a click event*/
this.onChangeByClick = function(event) {
	if (this._disabled) return;
	var newPos = 0;
	/*for IE*/
	if ('undefined' != typeof(event.offsetX)) {
    newPos = (this.direction == 0) ? event.offsetX + this._posSlideStart : event.offsetY + this._posSlideStart;
		if(newPos<this._arrowIconLeftHeight){
		newPos = this._arrowIconLeftHeight;
	}else if(newPos>(this.height-this._sliderImgHeight)){
		newPos = this.height-this._sliderImgHeight;
		//alert(newPos+"-"+this.height);
		}
	
	}
	
	/*for firefox*/
	else if ('undefined' != typeof(event.layerX)) {
    newPos = (this.direction == 0) ? event.layerX + this._posSlideStart  : event.layerY  + this._posSlideStart;
	
		if(newPos<this._arrowIconLeftHeight){
		newPos = this._arrowIconLeftHeight;
	}else if(newPos>(this.height-this._sliderImgHeight)){
		newPos = this.height-this._sliderImgHeight;
		}
		//alert(newPos+"-"+this.height);
	} else {
return;}
var val = this._getValueByPosition(newPos);if (this.useSecondKnob) {
    if (val > this._valueInternal2) {
        var knobId = 2;} else if (val < this._valueInternal) {
        var knobId = 1;} else {
    return;}
    } else {
var knobId = 1;}
val     = this._roundToGrid(val);if (val != this._valueInternal) {
    if (knobId == 1) {
        this._valueInternal = val;} else {
    this._valueInternal2 = val;}
    this.updateHandle(newPos, knobId);this.updateValueField(val, knobId);this.updateValueText(val, knobId);this._updateColorbar(newPos, knobId);if ('undefined' != typeof(this.eventOnChange)) {
        if (this.useSecondKnob) {
            this.eventOnChange(this, val, newPos, knobId);} else {
        this.eventOnChange(this, val, newPos);}
}
this.fireEvent('onChange');}
}
this.onChangeByInput = function(val, isBlur, knobId) {
var k = ((typeof(knobId) == 'undefined') || (knobId == 1)) ? '' : '2';if (this._disabled) return;if (val == '') {
val = this['minVal'+k];}
val = this._roundToGrid(val, knobId);var newPos = this._getPositionByValue(val);if (val != this['_valueInternal'+k]) {
this['_valueInternal'+k] = val;this.updateHandle(newPos, knobId);this._updateColorbar(newPos, knobId);if ('undefined' != typeof(this.eventOnChange)) {
if (this.useSecondKnob) {
this.eventOnChange(this, val, newPos, knobId);} else {
this.eventOnChange(this, val, newPos);}
}
this.fireEvent('onChange');if (isBlur) {
this.updateValueField(val, knobId);this.updateValueText(val, knobId);}
} else if (isBlur) {
this.updateValueField(val, knobId);this.updateValueText(val, knobId);}
}
this.onChangeByArrow = function(leftOrRight, keepFiring, loopCall) {
if (!loopCall) this._stopFireArrowFlag = false;if (this._stopFireArrowFlag) return;if (this._disabled) return;var val = parseFloat(this._valueInternal);if (leftOrRight) {
val += this.arrowAmount;} else {
val -= this.arrowAmount;}
val = this._roundToGrid(val);if (val != this._valueInternal) {
this._valueInternal = val;var newPos = this._getPositionByValue(val);this.updateHandle(newPos);this.updateValueField(val);this.updateValueText(val);this._updateColorbar(newPos);if ('undefined' != typeof(this.eventOnChange)) {
if (this.useSecondKnob) {
this.eventOnChange(this, val, newPos, 1);} else {
this.eventOnChange(this, val, newPos);}
}
this.fireEvent('onChange');}
if (keepFiring) {
if (!this._stopFireArrowFlag && (this.arrowKeepFiringTimeout > 0)) {
setTimeout('Bs_Objects[' + this._id + '].onChangeByArrow(' + leftOrRight + ', ' + keepFiring + ', true);', this.arrowKeepFiringTimeout);}
}
}
this.onMouseWheel = function() {
if (this._disabled) return;var val = parseFloat(this._valueInternal);if (event.wheelDelta > 0) {
val -= this.wheelAmount;} else {
val += this.wheelAmount;}
val = this._roundToGrid(val);if (val != this._valueInternal) {
this._valueInternal = val;var newPos = this._getPositionByValue(val);this.updateHandle(newPos);this.updateValueField(val);this.updateValueText(val);this._updateColorbar(newPos);if ('undefined' != typeof(this.eventOnChange)) {
if (this.useSecondKnob) {
this.eventOnChange(this, val, newPos, 1);} else {
this.eventOnChange(this, val, newPos);}
}
this.fireEvent('onChange');}
}
this.stopFireArrow = function() {
this._stopFireArrowFlag = true;}
this.setValue = function(val, knobId) {
if (typeof(knobId) == 'undefined') knobId = 1;val = this._roundToGrid(val, knobId);var newPos = this._getPositionByValue(val);var valInternal = (knobId == 1) ? this._valueInternal : this._valueInternal2;if (val != valInternal) {
if (knobId == 1) {
this._valueInternal = val;} else {
this._valueInternal2 = val;}
this.updateHandle(newPos, knobId);this._updateColorbar(newPos, knobId);if ('undefined' != typeof(this.eventOnChange)) {
if (this.useSecondKnob) {
this.eventOnChange(this, val, newPos, knobId);} else {
this.eventOnChange(this, val, newPos);}
}
this.fireEvent('onChange');this.updateValueField(val, knobId);this.updateValueText(val, knobId);}
}
this.onChangeByApi = function(val, knobId) {
this.setValue(val, knobId);}
this._updateColorbar = function(newPos, knobId) {
var k = ((typeof(knobId) == 'undefined') || (knobId == 1) || ((typeof(this.colorbar) != 'undefined') && ((typeof(this.colorbar.type) != 'undefined') || (this.colorbar.type == 'between')))) ? '' : '2';if (this['_colorbarObj'+k]) {
if ((typeof(this.colorbar.type) != 'undefined') && (this.colorbar.type == 'between')) {
var left  = this._getPositionByValue(this._valueInternal,  1);var right = this._getPositionByValue(this._valueInternal2, 2);this['_colorbarObj'+k].style.left  = left + this.colorbar.offsetLeft;this['_colorbarObj'+k].style.width = right - left;} else {
var newWidth = newPos + this['colorbar'+k]['widthDifference'];if (newWidth < 0) newWidth = 0;if (k == '2') {
var invertedWidth = this.width - newWidth;if (invertedWidth < 0) invertedWidth = 0;this['_colorbarObj'+k].style.width = invertedWidth;if (typeof(this.colorbar2['offsetLeft']) != 'undefined') newWidth += this.colorbar2['offsetLeft'];this['_colorbarObj'+k].style.left  = newWidth;} else {
this['_colorbarObj'+k].style.width = newWidth;}
}
if (typeof(this['colorbar'+k]['color2']) != 'undefined') {
var percent  = this.getValueInPercent(knobId);var newColor = mixColor(this['colorbar'+k]['color'], this['colorbar'+k]['color2'], percent);document.getElementById(this._colorbarId+k).style.backgroundColor = newColor;}
}
}
this._getValueByPosition = function(pos) {
if (this.direction == 0) {
pos -= this.ctrl.minX;var hundertPercent = this.ctrl.maxX - this.ctrl.minX;} else {
pos -= this.ctrl.minY;var hundertPercent = this.ctrl.maxY - this.ctrl.minY;}
var myPercent      = pos / hundertPercent;var val            = this.minVal + ((this.maxVal - this.minVal) * myPercent);return val;}
this._getPositionByValue = function(val, knobId) {
var k = ((typeof(knobId) == 'undefined') || (knobId == 1)) ? '' : '2';val = val - this['minVal'+k];var hundertPercent = this['maxVal'+k] - this['minVal'+k];var myPercent      = val / hundertPercent;if (this.direction == 0) {
var pos = this['ctrl'+k].minX + ((this['ctrl'+k].maxX - this['ctrl'+k].minX) * myPercent);} else {
var pos = this['ctrl'+k].minY + ((this['ctrl'+k].maxY - this['ctrl'+k].minY) * myPercent);}
return pos;}
this._roundToGrid = function(val, knobId) {
val = parseFloat(val);if (isNaN(val)) return this.minVal;val = Math.round(val / this.valueInterval) * this.valueInterval;val = Math.round(val*10000)/10000;if (val < this.minVal) val = this.minVal;if (val > this.maxVal) val = this.maxVal;if (this.useSecondKnob && this.preventValueCrossing) {
if ((typeof(knobId) == 'undefined') || (knobId == 1)) {
if (val >= this._valueInternal2) {
val = this._valueInternal2 - this.valueInterval;if (val < this.minVal) val = this.minVal;}
} else {
if (val <= this._valueInternal) {
val = this._valueInternal + this.valueInterval2;if (val > this.maxVal2) val = this.maxVal2;}
}
}
return val;}
this._getNewLocationFromCursor = function(ctrl) {
if (ctrl.knobId == 1) {
var ox = this._posEventSlideStartX;var oy = this._posEventSlideStartY;var posObjSlideStartX = this._posObjSlideStartX;var posObjSlideStartY = this._posObjSlideStartY;} else {
var ox = this._posEventSlideStartX2;var oy = this._posEventSlideStartY2;var posObjSlideStartX = this._posObjSlideStartX2;var posObjSlideStartY = this._posObjSlideStartY2;}
switch (this.direction) {
case 0:
var t = ctrl.pageX - ox;var x = parseInt(posObjSlideStartX) + t;if (x > ctrl.maxX) x = ctrl.maxX;if (x < ctrl.minX) x = ctrl.minX;return x;case 1:
var t = ctrl.pageY - oy;var y = parseInt(posObjSlideStartY) + t;if (y > ctrl.maxY) y = ctrl.maxY;if (y < ctrl.minY) y = ctrl.minY;return y;}
}
this.updatePointer = function(newPos) {
this.updateHandle(newPos);}
this.updateHandle = function(newPos, knobId) {
if ((typeof(knobId) == 'undefined') || (knobId == 1)) {
if (this.direction == 0) {
this._currentRelSliderPosX = newPos;this.ctrl.div.style.left   = newPos;} else {
this._currentRelSliderPosX = newPos;this.ctrl.div.style.top    = newPos;}
} else {
if (this.direction == 0) {
this._currentRelSliderPosX2 = newPos;this.ctrl2.div.style.left   = newPos;} else {
this._currentRelSliderPosX2 = newPos;this.ctrl2.div.style.top    = newPos;}
}
return;}
this.updateValueField = function(val, knobId) {
var k = ((typeof(knobId) == 'undefined') || (knobId == 1)) ? '' : '2';if (this['_valueFieldObj'+k]) {
this['_valueFieldObj'+k].value = val;}
}
this.updateValueText = function(val, knobId) {
var k = ((typeof(knobId) == 'undefined') || (knobId == 1)) ? '' : '2';if (this['_valueTextObj'+k]) {
this['_valueTextObj'+k].innerHTML = val;}
}
this.arrowOnClick = function() {
}
this.onChange = function(val) {
if (this._disabled) return;this.setValue(val);}
this.updateInputBox = function(val) {
if (this._disabled) return;this.setValue(val);}
this.textboxEdit = function(editMode, knobId) {
var k = ((typeof(knobId) == 'undefined') || (knobId == 1)) ? '' : '2';if (this._disabled) return;if (editMode) {
if ('undefined' != typeof(this['_valueFieldObj'+k])) {
this['_valueTextObj'+k].style.display = 'none';this['_valueFieldObj'+k].style.display = 'block';bsFormFieldSetFocusAndSelect(this['_valueFieldObj'+k], false);}
} else {
if ('undefined' != typeof(this['_valueTextObj'+k])) {
this['_valueFieldObj'+k].style.display = 'none';this['_valueTextObj'+k].style.display  = 'block';}
}
}
this.slideMove = function(ctrl, client) {
ctrl.sliderObj.onChangeBySlide(ctrl);}
this.slideStart = function(ctrl, client) {
if (ctrl.knobId == 1) {
ctrl.sliderObj._handleObj.style.zIndex += 2;ctrl.sliderObj._posEventSlideStartX = ctrl.startX;ctrl.sliderObj._posEventSlideStartY = ctrl.startY;ctrl.sliderObj._posObjSlideStartX   = ctrl.sliderObj._handleObj.style.left;ctrl.sliderObj._posObjSlideStartY   = ctrl.sliderObj._handleObj.style.top;} else {
ctrl.sliderObj._handleObj2.style.zIndex += 2;ctrl.sliderObj._posEventSlideStartX2 = ctrl.startX;ctrl.sliderObj._posEventSlideStartY2 = ctrl.startY;ctrl.sliderObj._posObjSlideStartX2   = ctrl.sliderObj._handleObj2.style.left;ctrl.sliderObj._posObjSlideStartY2   = ctrl.sliderObj._handleObj2.style.top;}
var pos = ctrl.sliderObj.getSliderPos(ctrl.knobId);ctrl.sliderObj.setValue(pos, ctrl.knobId);if ('undefined' != typeof(ctrl.sliderObj.slideStartCB)) {
ctrl.sliderObj.slideStartCB(ctrl.sliderObj, ctrl.sliderObj.getValue(), pos);}
}
this.slideEnd = function(ctrl, client){
if (this._disabled) return;if (ctrl.knobId == 1) {
ctrl.sliderObj._handleObj.style.zIndex -= 2;} else {
ctrl.sliderObj._handleObj2.style.zIndex -= 2;}
var pos = ctrl.sliderObj.getSliderPos();if ('undefined' != typeof(ctrl.sliderObj.slideEndCB)) {
ctrl.sliderObj.slideEndCB(ctrl.sliderObj, ctrl.sliderObj.getValue(), pos);}
return;}
this._constructor(theFieldnamePrefix);}


/* Ends Here ------------ */

/********************************************************************************************
* BlueShoes Framework; This file is part of the php application framework.
* NOTE: This code is stripped (obfuscated). To get the clean documented code goto 
*       www.blueshoes.org and register for the free open source *DEVELOPER* version or 
*       buy the commercial version.
*       
*       In case you've already got the developer version, then this is one of the few 
*       packages/classes that is only available to *PAYING* customers.
*       To get it go to www.blueshoes.org and buy a commercial version.
* 
* @copyright www.blueshoes.org
* @author    sam blum <sam-at-blueshoes-dot-org>
* @author    Andrej Arn <andrej-at-blueshoes-dot-org>
*/
function Bs_ScrollableDiv() {
this.sliderObj;this.bwCheckObj;this.lastScrollTo = 0;this.containerObj;this.contentObj;this.containerElm;this.contentElm;this.sliderDivId;this.isActive = false;this.init = function(containerDivId, contentDivId) {
this.bwCheckObj = lib_bwcheck();this.containerObj = new makeObj(this.bwCheckObj, containerDivId);this.contentObj   = new makeObj(this.bwCheckObj, contentDivId, containerDivId);this.contentObj.moveIt(0, 0);this.containerObj.css.visibility = "visible";this.containerElm = document.getElementById(containerDivId);this.contentElm   = document.getElementById(contentDivId);if (this.contentElm.attachEvent) {
this.contentElm.Bs_ScrollableDiv = this;this.contentElm.attachEvent('onmousewheel', Bs_ScrollableDiv_onMouseWheel);}
}
this.setSliderObject = function(sliderObj, sliderDivId) {
sliderObj.useInputField = 0;sliderObj.attachOnChange(Bs_ScrollableDiv_sliderChange);this.sliderObj = sliderObj;if (this.sliderObj.height == 'auto') {
this.sliderObj.height = this.containerElm.offsetHeight - (this.sliderObj._arrowIconLeftHeight + this.sliderObj._arrowIconRightHeight);}
if (this.sliderObj.width == 'auto') {
this.sliderObj.width = this.containerElm.offsetWidth - (this.sliderObj._arrowIconLeftWidth + this.sliderObj._arrowIconRightWidth);}
this.sliderObj.Bs_ScrollableDiv = this;this.sliderDivId = sliderDivId;this.updateScrollableSpace();}
this.setSlideSpeed = function(amount, unit) {
this.sliderObj.valueInterval  = 0.1;this.sliderObj.arrowAmount    = amount * this.sliderObj.arrowKeepFiringTimeout /1000;this.sliderObj.minVal         = 0;if (this.sliderObj.direction == 0) {
this.sliderObj.maxVal         = this.contentElm.scrollWidth - this.containerElm.offsetWidth;} else {
this.sliderObj.maxVal         = this.contentElm.scrollHeight - this.containerElm.offsetHeight;}
if (this.sliderObj.valueDefault > 0) {
this.sliderObj.valueDefault = this.sliderObj.maxVal / 100 * this.sliderObj.valueDefault;}
this.updateScrollableSpace();}
this.setWheelSpeed = function(amount, unit) {
this.sliderObj.wheelAmount    = amount;}
this.updateScrollableSpace = function() {
if (this.sliderObj.direction == 0) {
var scrollableSpace = this.contentElm.offsetWidth - this.containerElm.offsetWidth;} else {
var scrollableSpace = this.contentElm.offsetHeight - this.containerElm.offsetHeight;}
if (this.sliderObj.maxVal == 'auto') {
this.sliderObj.maxVal = scrollableSpace;}
if (scrollableSpace > 0) {
this.isActive = true;this.sliderObj.drawInto(this.sliderDivId);if (this.sliderObj.valueDefault != this.sliderObj.minVal) {
this.bsSliderChange(this.sliderObj.valueDefault);}
} else {
this.isActive = false;}
}
this.onMouseWheel = function() {
this.sliderObj.onMouseWheel();}
this.bsSliderChange = function(val, newPos) {
var percent = val * 100 / (this.sliderObj.maxVal - this.sliderObj.minVal);if (this.sliderObj.direction == 0) {
var scrollableSpace = this.contentElm.offsetWidth  - this.containerElm.offsetWidth;} else {
var scrollableSpace = this.contentElm.offsetHeight - this.containerElm.offsetHeight;}
var scrollTo = parseInt(scrollableSpace * percent  / 100);if (scrollTo != this.lastScrollTo) {
if (this.sliderObj.direction == 0) {
this.contentObj.moveIt(-scrollTo, 0);} else {
this.contentObj.moveIt(0, -scrollTo);}
this.lastScrollTo = scrollTo;}
}
}
function Bs_ScrollableDiv_onMouseWheel() {
var obj   = window.event.srcElement;var gotIt = false;while (true) {
if (typeof(obj.Bs_ScrollableDiv) != 'undefined') {
gotIt = true;break;}
if (typeof(obj.parentNode) == 'undefined') break;obj = obj.parentNode;}
if (gotIt && obj.Bs_ScrollableDiv.isActive) {
obj.Bs_ScrollableDiv.onMouseWheel();return false;} else {
return true;}
}
function lib_bwcheck() {
this.ver=navigator.appVersion;this.agent=navigator.userAgent;this.dom=(document.getElementById) ? 1 : 0;this.opera5=(navigator.userAgent.indexOf("Opera")>-1 && document.getElementById)?1:0;this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0;this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;this.ie4=(document.all && !this.dom && !this.opera5)?1:0;this.ie=this.ie4||this.ie5||this.ie6;this.mac=this.agent.indexOf("Mac")>-1;this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0;this.ns4=(document.layers && !this.dom)?1:0;this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5);bs_px_char = (this.ns4 || window.opera) ? "" : "px";return this;}
function Bs_ScrollableDiv_moveIt(x,y) {
this.x = x;this.y = y;this.css.left = this.x + bs_px_char;this.css.top  = this.y + bs_px_char;}
function Bs_ScrollableDiv_sliderChange(sliderObj, val, newPos){
sliderObj.Bs_ScrollableDiv.bsSliderChange(val, newPos);}
function makeObj(bwCheckObj, obj, nest){
nest=(!nest) ? "":'document.'+nest+'.';this.el=bwCheckObj.dom?document.getElementById(obj):bwCheckObj.ie4?document.all[obj]:bwCheckObj.ns4?eval(nest+'document.'+obj):0;this.css= (bwCheckObj.dom) ? document.getElementById(obj).style : (bwCheckObj.ie4) ? document.all[obj].style : (bwCheckObj.ns4) ? eval(nest+'document.'+obj) : 0;this.scrollHeight=bwCheckObj.ns4?this.css.document.height:this.el.offsetHeight;this.clipHeight=bwCheckObj.ns4?this.css.clip.height:this.el.offsetHeight;this.moveIt=Bs_ScrollableDiv_moveIt;this.x=0;this.y=0;this.obj = obj + "Object";eval(this.obj + "=this");return this;}



/* Ends Here ---------- */

/* ========================================================================
   << Library for cross browser >>

   JavaScript Library for Netscape Navigator 4.0+
                       and Internet Explorer 4.0+

   Author : Shinichi Hagiwara
   Type   : library - free software
   History:
   1.0   : 10/18/1998 original
   1.1   : 08/15/2000 remake for my book
   2.0   : 05/13/2001 add procedure for NN6
   2.1   : 05/20/2001 add the functions getLeftFromEvent,getTopFromEvent
   2.2   : 05/27/2001 update the functions getLeftFromEvent,getTopFromEvent
   2.3   : 06/03/2001 update the functions initDivPos,initDivSize
   2.4   : 07/08/2001 update the functions external sourced layer for NN6( buggy :-D )
                      update the function createLayer,
                      add the function getDivForm
   2.5   : 07/15/2001 add the function setDivVisibilities
   2.6   : 08/26/2001 add the function setDivStyleAttribute
   2.7   : 10/21/2001 update the functions. setDivBackgroundColor,setDivBackgroundImage
   2.8   : 03/24/2002 support IE5.12(on mac OSX. but, buggy)

   Copyright(C) 1998 - 2002 ShinSoft. All rights reserved.
________________________________________________________________________ */

/* =====================================================================
 * ˆÈ‰º‚Ì•Ï”‚Íƒuƒ‰ƒEƒU‚ÌŽ¯•Ê‹y‚ÑŠÖ”‚ÌŒÝŠ·‚ð‚Æ‚é‚½‚ß‚Ì‚à‚Ì‚Å‚·B
 * ‚à‚µA‚±‚Ìƒtƒ@ƒCƒ‹‚ðŠO•”ƒ\[ƒX( SCRIPT ƒ^ƒO“à‚Ì src‘®« )‚ÅŽg—p‚·‚é
 * ê‡‚ÍAˆÈ‰º‚Ì•Ï”‚ð HTML –{‘Ì‚Ì SCRIPT ƒ^ƒO“à‚ÉˆÚ“®‚µ‚ÄŽg—p‚µ‚Ä‚­‚¾‚³‚¢B
 * ( ŠO•”ƒ\[ƒX“à‚Å’¼Ú’è‹`‚µ‚½•Ï”’l‚Í NN4 ‚Å‚ÍŽÀs‚³‚ê‚È‚¢ê‡‚ª‚ ‚è‚Ü‚· )
________________________________________________________________________ */
// variables
// version of library
LCB_version = 2.8;
// _mac : true = macintosh, false = other os
_mac=navigator.userAgent.indexOf('Mac')!=-1;
// _ie512 : true = MSIE 5.12(mac), false = others
_ie512=navigator.userAgent.indexOf('MSIE 5.12')!=-1;
// _dom : kind of DOM.
//        IE4 = 1, IE5+ = 2, NN4 = 3, NN6+ = 4, others = 0
_dom = document.all?(document.getElementById?2:1)
                   :(document.getElementById?4:(document.layers?3:0));
_createLayerNo = 0;                    // layer no.
/* ======================================================================
 *‚±‚ÌƒXƒNƒŠƒvƒg‚ðŠO•”ƒ\[ƒX‚Æ‚µ‚ÄŽg—p‚·‚éê‡‚ÍˆÈ‰º‚ÌŠÖ”‚ð—LŒø‚É‚µ‚Ä
 * Žg—p‚·‚éÅ‰‚É onLoad ƒCƒxƒ“ƒg‚Å‚±‚ÌŠÖ”‚ðŒÄ‚Ño‚µ‚Ä‰Šú‰»‚µ‚Ä‰º‚³‚¢ */
function initCrossBrowserLib(){
  _mac=navigator.userAgent.indexOf('Mac')!=-1;
  _ie512=navigator.userAgent.indexOf('MSIE 5.12')!=-1;
  _dom=document.all?(document.getElementById?2:1)
                     :(document.getElementById?4:(document.layers?3:0));
  _createLayerNo=0;
}
initCrossBrowserLib();


/* _____________________________________________________________________ */
function getWindowWidth (){
  if(_dom==4 || _dom==3) return window.innerWidth;
  if(_dom==2 || _dom==1) return document.body.clientWidth;
  return 0;
}

function getWindowHeight(){
  if(_dom==4 || _dom==3) return window.innerHeight;
  if(_dom==2 || _dom==1) return document.body.clientHeight;
  return 0;
}

function getWinXOffset(){
  if(_dom==4)            return window.scrollX;
  if(_dom==2 || _dom==1) return document.body.scrollLeft;
  if(_dom==3)            return window.pageXOffset;
  return 0;
}

function getWinYOffset(){
  if(_dom==4)            return window.scrollY;
  if(_dom==2 || _dom==1) return document.body.scrollTop;
  if(_dom==3)            return window.pageYOffset;
  return 0;
}

function getDivFromName(nm){
  if(_dom==4 || _dom==2) return document.getElementById(nm);
  if(_dom==1)            return document.all(nm);
  if(_dom==3){
    var s='';
    for(var i=1; i<arguments.length; i++) s+='document.layers.'+arguments[i]+'.';
    return eval(s+'document.layers.'+nm);
  }
  return null;
}

function getDivName(div){
  if(_dom==4 || _dom==2 || _dom==1) return div.id;
  if(_dom==3)                       return div.name;
  return '';
}

function createLayer(left,top,width,height,parentDiv){
  var s='';

  if(arguments.length>5){
    for(var i=5; i<arguments.length; i++) s+=arguments[i];
  }
  if(_dom==4){
    var divName= '_js_layer_'+_createLayerNo; _createLayerNo++;
    var pDiv   =parentDiv?parentDiv:document.body;
    var div    =document.createElement('DIV');
    div.id=divName;
    div.setAttribute('style',
       'position:absolute;left:'+left+';top:'+top
      +(width >0?(';width:' +width ):'')
      +(height>0?(';height:'+height):'')
      +';visibility:hidden');
    var range=document.createRange();
    range.selectNodeContents(div);
    range.collapse(true);
    var cf=range.createContextualFragment(s);
    div.appendChild(cf);
    pDiv.appendChild(div);
    return div;
  }
  if(_dom==2 || _dom==1){
    var adj    =(_mac&&!_ie512)?' ':'';
    var divName= '_js_layer_'+_createLayerNo; _createLayerNo++;
    var ha     =(height>0)?(';height:'+height):'';
    var pDiv   =parentDiv?parentDiv:document.body;
    pDiv.insertAdjacentHTML('BeforeEnd',
       '<div id="'+divName
      +'" style="position:absolute;left:'+left+';top:'+top
      +(width >0?(';width:' +width ):';width:1')
      +(height>0?(';height:'+height):'')
      +';visibility:hidden;">'+s+'<\/div>'+adj);
    return document.all(divName);
  }
  if(_dom==3){
    var div=parentDiv?(new Layer(width,parentDiv)):(new Layer(width));
    if(height>0) div.resizeTo(width,height);
    div.moveTo(left,top);
    if(s!=''){
      div.document.open('text/html','replace');
      div.document.write(s);
      div.document.close();
    }
    return div;
  }
  return null;
}

function createExLayer(url,left,top,width,height,parentDiv){
  if(_dom==4){
    var divName= '_js_layer_'+_createLayerNo; _createLayerNo++;
    var pDiv   =parentDiv?parentDiv:document.body;
    var div    =document.createElement('IFRAME');
    div.id=divName;
    div.name=divName;
    div.setAttribute('style',
       'position:absolute;left:'+left+';top:'+top
      +';width:'+width+(height>0?(';height:'+height):'')
      +';visibility:hidden');
    div.setAttribute('src',url);
    div.setAttribute('frameborder',0);
    div.setAttribute('scrolling','no');
    pDiv.appendChild(div);
    return div;
  }
  if(_dom==2 || _dom==1){
    var adj=(_mac&&_ie512)?' ':'';
    var bd, divName='_js_layer_'+_createLayerNo;
    _createLayerNo++;
    var ha=(height>0)?(';height:'+height):'';
    if(arguments.length>5 && parentDiv)
         bd=parentDiv;
    else bd=document.body;
    bd.insertAdjacentHTML('BeforeEnd',
       '<div id="'+divName
      +'" style="position:absolute;left:'+left+';top:'+top
      +';width:'+width+ha+';visibility:hidden;">'
      +'<iframe src="'+url+'" name="'+divName+'_if" '
      +'width='+width+' height='+height
      +'marginwidth=0 marginheight=0 '
      +'scrolling="no" frameborder="no">'
      +'<\/iframe>'
      +'<\/div>'+adj);
    return document.all(divName);
  }
  if(_dom==3){
    var div=parentDiv?(new Layer(width,parentDiv)):(new Layer(width));
    if(height>0) div.resizeTo(width,height);
    div.moveTo(left,top);
    div.load(url,width);
    return div;
  }
  return null;
}

function getDivImage(div,imgName){
  if(_dom==4)            return document.images[imgName];
  if(_dom==2 || _dom==1) return document.images(imgName);
  if(_dom==3)            return div.document.images[imgName];
  return null;
}

function getDivForm(div,frmName){
  if(_dom==4)            return document.forms[frmName];
  if(_dom==2 || _dom==1) return document.forms(frmName);
  if(_dom==3)            return div.document.forms[frmName];
  return null;
}

function initDivPos(div){
  if(_dom==4){
    div.style.left=div.offsetLeft+'px';
    div.style.top =div.offsetTop +'px';
  }
  else if(_dom==2 || _dom==1){
    div.style.pixelLeft=div.offsetLeft;
    div.style.pixelTop =div.offsetTop;
  }
  return div;
}

function getDivLeft(div){
  if(_dom==4 || _dom==2) return div.offsetLeft;
  if(_dom==1)            return div.style.pixelLeft;
  if(_dom==3)            return div.left;
  return 0;
}

function getDivTop(div){
  if(_dom==4 || _dom==2) return div.offsetTop;
  if(_dom==1)            return div.style.pixelTop;
  if(_dom==3)            return div.top;
  return 0;
}

function moveDivTo(div,left,top){
  if(_dom==4){
    div.style.left=left+'px';
    div.style.top =top +'px';
    return;
  }
  if(_dom==2 || _dom==1){
    div.style.pixelLeft=left;
    div.style.pixelTop =top;
    return;
  }
  if(_dom==3){
    div.moveTo(left,top);
    return;
  }
}

function moveDivBy(div,left,top){
  if(_dom==4){
    div.style.left=div.offsetLeft+left;
    div.style.top =div.offsetTop +top;
    return;
  }
  if(_dom==2){
    div.style.pixelLeft=div.offsetLeft+left;
    div.style.pixelTop =div.offsetTop +top;
    return;
  }
  if(_dom==1){
    div.style.pixelLeft+=left;
    div.style.pixelTop +=top;
    return;
  }
  if(_dom==3){
    div.moveBy(left,top);
    return;
  }
}

function scrollExlHItTo(exdiv,x){
  if(_dom==4){
    frames[exdiv.id].scrollTo(x,frames[exdiv.id].scrollY);
    return;
  }
  if(_dom==2 || _dom==1){
    frames(exdiv.id+'_if').scrollTo(x,frames(exdiv.id+'_if').document.body.scrollTop);
    return;
  }
  if(_dom==3){
    var dx=x-exdiv.clip.left, ch=exdiv.clip.width;
    exdiv.left-=dx;
    exdiv.clip.left=x; exdiv.clip.width=ch;
    return;
  }
  return;
}

function scrollExlVItTo(exdiv,y){
  if(_dom==4){
    frames[exdiv.id].scrollTo(frames[exdiv.id].scrollX,y);
    return;
  }
  if(_dom==2 || _dom==1){
    frames(exdiv.id+'_if').scrollTo(frames(exdiv.id+'_if').document.body.scrollLeft,y);
    return;
  }
  if(_dom==3){
    var dy=y-exdiv.clip.top, ch=exdiv.clip.height;
    exdiv.top-=dy;
    exdiv.clip.top=y; exdiv.clip.height=ch;
    return;
  }
  return;
}

function initDivSize(div){
  if(_dom==4){
    // getComputedStyle is buggy in NN6, and wrong in Mozilla 0.8/9
    //
    // var style=document.defaultView.getComputedStyle(div,null);
    // div.style.width =style.getPropertyValue('width' );
    // div.style.height=style.getPropertyValue('height');
    //
    div.style.width =div.offsetWidth +'px';
    div.style.height=div.offsetHeight+'px';
    //
    // need border-width=0px, margin-width:0px
  }
  else if(_dom==2 || _dom==1){
    div.style.pixelWidth =div.offsetWidth;
    div.style.pixelHeight=div.offsetHeight;
  }
  return div;
}

function getDivWidth (div){
  if(_dom==4 || _dom==2) return div.offsetWidth;
  if(_dom==1)            return div.style.pixelWidth;
  if(_dom==3)            return div.clip.width;
  return 0;
}

function getDivHeight(div){
  if(_dom==4 || _dom==2) return div.offsetHeight;
  if(_dom==1)            return div.style.pixelHeight;
  if(_dom==3)            return div.clip.height;
  return 0;
}

function resizeDivTo(div,width,height){
  if(_dom==4){
    div.style.width =width +'px';
    div.style.height=height+'px';
    return;
  }
  if(_dom==2 || _dom==1){
    div.style.pixelWidth =width;
    div.style.pixelHeight=height;
    return;
  }
  if(_dom==3){
    div.resizeTo(width,height);
    return;
  }
}

function resizeDivBy(div,width,height){
  if(_dom==4){
    div.style.width =(div.offsetWidth +width )+'px';
    div.style.height=(div.offsetHeight+height)+'px';
    return;
  }
  if(_dom==2){
    div.style.pixelWidth =div.offsetWidth +width;
    div.style.pixelHeight=div.offsetHeight+height;
    return;
  }
  if(_dom==1){
    div.style.pixelWidth +=width;
    div.style.pixelHeight+=height;
    return;
  }
  if(_dom==3){
    div.resizeBy(width,height);
    return;
  }
}

function getExlWidth (exdiv){
  if(_dom==4)
    // NN6 is buggy( same exdiv.offsetWidth )
    return exdiv.contentDocument.body.offsetWidth;
  if(_dom==2 || _dom==1)
    return _mac?frames(exdiv.id+'_if').document.body.offsetWidth
               :frames(exdiv.id+'_if').document.body.scrollWidth;
  if(_dom==3)
    return exdiv.document.width;
  return 0;
}

function getExlHeight(exdiv){
  if(_dom==4)
    return exdiv.contentDocument.body.offsetHeight;
  if(_dom==2 || _dom==1)
    return _mac?frames(exdiv.id+'_if').document.body.offsetHeight
               :frames(exdiv.id+'_if').document.body.scrollHeight;
  if(_dom==3)
    return exdiv.document.height;
  return 0;
}

function setDivVisibility(div,visible){
  if(_dom==4 || _dom==2 || _dom==1){
    div.style.visibility=(visible)?'inherit':'hidden';
    return;
  }
  if(_dom==3){
    div.visibility      =(visible)?'inherit':'hide';
    return;
  }
}

function setDivVisibilities(divs,visible){
  if(_dom==4 || _dom==2 || _dom==1){
    for(var i=0; i<divs.length; i++)
      divs[i].style.visibility=(visible)?'inherit':'hidden';
  }
  if(_dom==3){
    for(var i=0; i<divs.length; i++)
      divs[i].visibility      =(visible)?'inherit':'hide';
  }
  return divs;
}

function setDivClip(div,top,right,bottom,left){
  if(_dom==4 || _dom==2 || _dom==1){
    div.style.clip='rect('+top+'px '+right+'px '+bottom+'px '+left+'px)';
    return;
  }
  if(_dom==3){
    div.clip.top   =top;   div.clip.right=right;
    div.clip.bottom=bottom;div.clip.left =left;
    return;
  }
}

function writeDivHTML(div,op,cl){
  var s='';
  for(var i=3; i<arguments.length; i++) s+=arguments[i];
  if(_dom==4){
    if(op){ while(div.hasChildNodes()) div.removeChild(div.lastChild); }
    var range=document.createRange();
    range.selectNodeContents(div);
    range.collapse(true);
    var cf=range.createContextualFragment(s);
    div.appendChild(cf);
    return;
  }
  if(_dom==2 || _dom==1){
    if(op)   div.innerHTML='';
    if(_mac&&!_ie512) div.innerHTML+=s;
    else     div.insertAdjacentHTML('BeforeEnd',s);
    return;
  }
  if(_dom==3){
    if(op) div.document.open('text/html','replace');
    div.document.write(s);
    if(cl) div.document.close();
    return;
  }
}

function setDivBackgroundColor(div,color){
  if(color==null) color='transparent';
  if(_dom==3) div.bgColor=color;
  else        div.style.backgroundColor=color;
}

function setDivBackgroundImage(div,url){
  if(_dom==3) div.background.src=url?url:null;
  else        div.style.backgroundImage=url?('url('+url+')'):'none';
}

function setDivZIndex(div,order){
  if(_dom==4 || _dom==2 || _dom==1){
    div.style.zIndex=order;
    return;
  }
  if(_dom==3){
    div.zIndex      =order;
    return;
  }
}

function setDivStyleAttribute(div,nm,value){
  if(_dom!=0 && _dom!=3) eval('div.style.'+nm+'=value');
  return div;
}

function changeExlURL(exdiv,url){
  if(_dom==4){
    exdiv.setAttribute('src',url);
    return;
  }
  if(_dom==2 || _dom==1){
    frames(exdiv.id+'_if').location.replace(url);
    return;
  }
  if(_dom==3){
    exdiv.load(url,exdiv.clip.width);
    return;
  }
  return;
}

function getLeftFromEvent(e){
  if(_dom==4)          return e.clientX+window.scrollX;
  if(_dom==2||_dom==1) return document.body.scrollLeft+window.event.clientX;
  if(_dom==3)          return e.pageX;
  return 0;
}
function getTopFromEvent(e){
  if(_dom==4)          return e.clientY+window.scrollY;
  if(_dom==2||_dom==1) return document.body.scrollTop+window.event.clientY;
  if(_dom==3)          return e.pageY;
  return 0;
}


/*----------Ends Here ------------*/


/* ==============================================================
   << event handler service object >>
              for Netscape Navigator 4.0
              and Internet Explorer  4.0+

   Author : Shinichi Hagiwara
   Type   : library - free software

   history:
     09/17/2000 remake for my book
     06/24/2001 support Mozilla( NN6 )

   Require JS Lib
          : LibCrossBrowser.js  - Common functions for cross browser

   Copyright(C) 2000 ShinSoft. All rights reserved.
 ================================================================ */
_grabObj = null;                  // è—L’†‚ÌƒIƒuƒWƒFƒNƒg

// ƒCƒxƒ“ƒg§ŒäƒIƒuƒWƒFƒNƒg
function EventCtrl(div){
  this.div   = div;
  this.type  = ''; this.mask  = 0;
  this.pageX = 0;  this.pageY = 0;
}

// ƒCƒxƒ“ƒg§ŒäƒIƒuƒWƒFƒNƒg‚Ì‹¤—p‰»ƒƒ\ƒbƒh
EventCtrl.prototype.linkCtrl = function(obj){
  if(obj && !obj.eventCtrl) obj.eventCtrl=this;
  return this;
}
// è‡’l‚ÌÝ’èƒƒ\ƒbƒh
EventCtrl.prototype.setThreshold = function(threshold){
  this.threshold = threshold;
  return this;
}

// —v‘f–¼‚©‚çè—L’†‚ÌƒCƒxƒ“ƒg§ŒäƒIƒuƒWƒFƒNƒg‚ð“¾‚é IE—pŠÖ”
function getCtrlFromElementIE(el,tagName){
  for(;el;el=el.parentElement)
    if((tagName==null || el.tagName==tagName) && el.eventCtrl)
      return el.eventCtrl;
  return null;
}

// ƒCƒxƒ“ƒg‚©‚çƒCƒxƒ“ƒg§ŒäƒIƒuƒWƒFƒNƒg‚ð“¾‚éŠÖ”
function getCtrlFromEventIE(e,tagName){     // IE—p
  var ctrl=_grabObj;
  var event=window.event;
  var fromCtrl, toCtrl;
  if (ctrl==null){
    var mask=0, type=event.type;
    switch(type){
    case 'mouseover':
      fromCtrl = getCtrlFromElementIE(event.fromElement,tagName);
      toCtrl   = getCtrlFromElementIE(event.toElement,  tagName);
      if(fromCtrl!=toCtrl) ctrl=toCtrl;
      if(!ctrl || (ctrl.mask&1)==0) ctrl=null;
      break;
    case 'mouseout':
      fromCtrl = getCtrlFromElementIE(event.fromElement,tagName);
      toCtrl   = getCtrlFromElementIE(event.toElement,  tagName);
      if(fromCtrl!=toCtrl) ctrl=fromCtrl;
      if(!ctrl || (ctrl.mask&1)==0) ctrl=null;
      break;
    case 'mousedown': 
    case 'mousemove': 
    case 'mouseup':
      ctrl = getCtrlFromElementIE(event.srcElement,tagName);
      if(ctrl && (ctrl.mask&2)!=0) break;
    default: ctrl=null; break;
    }
  }
  if(ctrl){
    ctrl.pageX = document.body.scrollLeft+event.clientX;
    ctrl.pageY = document.body.scrollTop +event.clientY;
    ctrl.type  = event.type;
  }
  return ctrl;
}
function getCtrlFromEventNN4(e,tagName){    // NN4—p
  var ctrl=_grabObj;
  if(ctrl==null) ctrl=e.target.eventCtrl;
  if(ctrl){
    var mask=0;
    switch(e.type){
    case 'mouseover': case 'mouseout':
      mask|=1; break;
    case 'mousedown': case 'mousemove': case 'mouseup':
      mask|=2; break;
    }
    if((ctrl.mask&mask)!=0){
      ctrl.pageX = e.pageX; ctrl.pageY = e.pageY;
      ctrl.type  = e.type;
    } else ctrl=null;
  }
  return ctrl;
}
function getCtrlFromEventMz(e,tagName){     // Mozilla—p
  var ctrl=_grabObj;
  if(ctrl==null){
    for(var t=e.target; t!=null; t=t.parentNode){
      if((  tagName==null
         ||(t.nodeType==Node.ELEMENT_NODE && t.tagName==tagName))
         && ('undefined' != typeof(t.eventCtrl)) ){
        ctrl=t.eventCtrl;
        break;
      }
    }
  }
  if(ctrl){
    ctrl.pageX = e.clientX+window.scrollX;
    ctrl.pageY = e.clientY+window.scrollY;
    ctrl.type  = e.type;
  }
  return ctrl;
}
function getCtrlFromEventNop(e,tagName){ return null; } // Dummy
getCtrlFromEvent=(_dom==1||_dom==2)?getCtrlFromEventIE:
                   (_dom==3?getCtrlFromEventNN4:
                    (_dom==4?getCtrlFromEventMz:
                     getCtrlFromEventNop));

// mouseover ƒnƒ“ƒhƒ‰
function ech_mouseover(e){
  var ctrl = getCtrlFromEvent(e,null);
  if(ctrl && ctrl.mouseover && !ctrl.mouseoverState){
    ctrl.mouseoverState = true;
    if(ctrl.mouseover) ctrl.mouseover(ctrl,ctrl.mouseoverClient);
  }
}

// mouseout ƒnƒ“ƒhƒ‰
function ech_mouseout(e){
  var ctrl = getCtrlFromEvent(e,null);
  if(ctrl && ctrl.mouseover && ctrl.mouseoverState){
    ctrl.mouseoverState = false;
    if(ctrl.mouseout) ctrl.mouseout(ctrl,ctrl.mouseoutClient);
  }
}

// mousedown ƒnƒ“ƒhƒ‰
function ech_mousedown(e){
  var ctrl = getCtrlFromEvent(e,null);
  if(ctrl && !ctrl.dragging){
    _grabObj = ctrl; ctrl.dragging=true; ctrl.dragged = false;
    ctrl.startX = ctrl.curX = ctrl.pageX;
    ctrl.startY = ctrl.curY = ctrl.pageY;
    if(ctrl.mousedown) ctrl.mousedown(ctrl,ctrl.mousedownClient);
    return false;
  }
  return true;
}

// mousemove ƒnƒ“ƒhƒ‰
function ech_mousemove(e){
  var ctrl = getCtrlFromEvent(e,null);
  if(ctrl && ctrl.dragging){
    if(ctrl.curX!=ctrl.pageX || ctrl.curY!=ctrl.pageY){
      if(Math.abs(ctrl.pageX-ctrl.startX)>ctrl.threshold || Math.abs(ctrl.pageY-ctrl.startY)>ctrl.threshold)
        ctrl.dragged = true;
      if(ctrl.mousemove) ctrl.mousemove(ctrl,ctrl.mousemoveClient);
      ctrl.curX = ctrl.pageX; ctrl.curY = ctrl.pageY;
    }
    return false;
  }
  return true;
}

// mouseup ƒnƒ“ƒhƒ‰
function ech_mouseup(e){
  var ctrl = getCtrlFromEvent(e,null);
  if(ctrl && ctrl.dragging){
    _grabObj = null; ctrl.dragging = false;
    if(ctrl.mouseup) ctrl.mouseup(ctrl,ctrl.mouseupClient);
    if(!ctrl.dragged && ctrl.mouseclick)
      ctrl.mouseclick(ctrl,ctrl.mouseclickClient);
    ctrl.curX = ctrl.pageX; ctrl.curY = ctrl.pageY;
    return false;
  }
  return true;
}

/**
* Set the drag object and the methods to call on the events 
*  - mouseover
*  - mouseout
* The method you pass should expect to get 2 params 
*  a) A ctrl-object holding all event info
*  b) A pass-through parameter that *you* may set.
*  
* @param div   is the object you intend to move (a div-object)
* @param ovrf  function to call on the onmousedown event 
* @param ovrc  pass-through parameter that you *may* set
* @param outf  function to call on the onmousemove event
* @param outc  pass-through parameter that you *may* set
*/
function ech_attachMouseOverOut(div,ovrf,ovrc,outf,outc){
  if(!div.eventCtrl) div.eventCtrl = new EventCtrl(div);
  var ctrl = div.eventCtrl;
  ctrl.mouseoverState = false;
  ctrl.mouseover  = ovrf; ctrl.mouseoverClient = ovrc;
  ctrl.mouseout   = outf; ctrl.mouseoutClient  = outc;
  div.onmouseover = ech_mouseover;
  div.onmouseout  = ech_mouseout;
  ctrl.mask|=1;
  return ctrl;
}

// mouseover/mouseout ƒnƒ“ƒhƒ‰“o˜^íœŠÖ”
function ech_detachMouseOverOut(div){
  var ctrl = div.eventCtrl;
  if(ctrl){
    ctrl.div.onmouseover = null;
    ctrl.div.onmouseout  = null;
    ctrl.mask=~1;
  }
}

/**
* Set the drag object and the methods to call on the events 
*  - onmousedown
*  - onmousemove
*  - onmouseup
*  - onmouseclick
* The method you pass should expect to get 2 params 
*  a) A ctrl-object holding all event info
*  b) A pass-through parameter that *you* may set.
*  
* @param div   is the object you intend to move (a div-object)
* @param dwnf  function to call on the onmousedown event 
* @param dwnc  pass-through parameter that you *may* set
* @param movf  function to call on the onmousemove event
* @param movc  pass-through parameter that you *may* set
* @param upf   function to call on the onmouseup event
* @param upc   pass-through parameter that you *may* set
* @param clkf  function to call on the mouseclick event
* @param clkc  pass-through parameter that you *may* set
*/
function ech_attachMouseDrag(div,dwnf,dwnc,movf,movc,upf,upc,clkf,clkc){
  var doc;
  
  if(_dom==1||_dom==2){
    doc = div;
    doc.onmousedown      = ech_mousedown;
    document.onmousemove = ech_mousemove;
    document.onmouseup   = ech_mouseup;
  } else if(_dom==3){
    doc = div.document;
    doc.onmousedown = ech_mousedown;
    doc.onmousemove = ech_mousemove;
    doc.onmouseup   = ech_mouseup;
    doc.captureEvents(Event.MOUSEDOWN|Event.MOUSEMOVE|Event.MOUSEUP);
  } else if(_dom==4){
    doc = div;
    div.onmousedown           = ech_mousedown;
    document.body.onmousemove = ech_mousemove;
    document.body.onmouseup   = ech_mouseup;
  } else return null;
  if(!doc.eventCtrl) doc.eventCtrl = new EventCtrl(div);
  var ctrl=doc.eventCtrl;
  ctrl.dragging  = false; ctrl.dragged   = false;
  ctrl.startX    = 0;     ctrl.startY    = 0;
  ctrl.curX      = 0;     ctrl.curY      = 0;
  ctrl.mousedown = dwnf; ctrl.mousedownClient = dwnc;
  ctrl.mousemove = movf; ctrl.mousemoveClient = movc;
  ctrl.mouseup   = upf;  ctrl.mouseupClient   = upc;
  ctrl.mouseclick= clkf; ctrl.mouseclickClient= clkc;
  ctrl.threshold = 5;
  ctrl.mask|=2;
  return ctrl;
}

// ƒhƒ‰ƒbƒOƒnƒ“ƒhƒ‰“o˜^íœŠÖ”
function ech_detachMouseDrag(div){
  var ctrl = null;
  if(_dom==1||_dom==2){
    ctrl=div.eventCtrl;
    if(ctrl) ctrl.div.onmousedown=null;
  } else if(_dom==3){
    ctrl = div.document.eventCtrl;
    if(ctrl){
      var doc = ctrl.div.document;
      doc.releaseEvents(Event.MOUSEDOWN|Event.MOUSEMOVE|Event.MOUSEUP);
      doc.onmousedown = null;
      doc.onmousemove = null;
      doc.onmouseup   = null;
    }
  } else if(_dom==4){
    ctrl = div.eventCtrl;
    if(ctrl) ctrl.div.onmousedown=null;
  }
  if(ctrl) ctrl.mask&=~2;
}



/* -------------- Ends Here -----------*/

// JavaScript Document
/**
 * SWFObject v1.4.2: 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(swf, id, w, h, ver, c, useExpressInstall, quality, xiRedirectUrl, redirectUrl, detectKey){
	if (!document.getElementById) { return; }
	this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
	this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY);
	this.params = new Object();
	this.variables = new Object();
	this.attributes = new Array();
	if(swf) { this.setAttribute('swf', swf); }
	if(id) { this.setAttribute('id', id); }
	if(w) { this.setAttribute('width', w); }
	if(h) { this.setAttribute('height', h); }
	if(ver) { this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split("."))); }
	this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion();
	if(c) { this.addParam('bgcolor', c); }
	var q = quality ? quality : 'high';
	this.addParam('quality', q);
	this.setAttribute('useExpressInstall', useExpressInstall);
	this.setAttribute('doExpressInstall', false);
	var xir = (xiRedirectUrl) ? xiRedirectUrl : window.location;
	this.setAttribute('xiRedirectUrl', xir);
	this.setAttribute('redirectUrl', '');
	if(redirectUrl) { this.setAttribute('redirectUrl', redirectUrl); }
}
deconcept.SWFObject.prototype = {
	setAttribute: function(name, value){
		this.attributes[name] = value;
	},
	getAttribute: function(name){
		return this.attributes[name];
	},
	addParam: function(name, value){
		this.params[name] = value;
	},
	getParams: function(){
		return this.params;
	},
	addVariable: function(name, value){
		this.variables[name] = value;
	},
	getVariable: function(name){
		return this.variables[name];
	},
	getVariables: function(){
		return this.variables;
	},
	getVariablePairs: function(){
		var variablePairs = new Array();
		var key;
		var variables = this.getVariables();
		for(key in variables){
			variablePairs.push(key +"="+ variables[key]);
		}
		return variablePairs;
	},
	getSWFHTML: function() {
		var swfNode = "";
		if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture
			if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "PlugIn"); }
			swfNode = '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'"';
			swfNode += ' id="'+ this.getAttribute('id') +'" name="'+ this.getAttribute('id') +'" ';
			var params = this.getParams();
			 for(var key in params){ swfNode += [key] +'="'+ params[key] +'" '; }
			var pairs = this.getVariablePairs().join("&");
			 if (pairs.length > 0){ swfNode += 'flashvars="'+ pairs +'"'; }
			swfNode += '/>';
		} else { // PC IE
			if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "ActiveX"); }
			swfNode = '<object id="'+ this.getAttribute('id') +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'">';
			swfNode += '<param name="movie" value="'+ this.getAttribute('swf') +'" />';
			var params = this.getParams();
			for(var key in params) {
			 swfNode += '<param name="'+ key +'" value="'+ params[key] +'" />';
			}
			var pairs = this.getVariablePairs().join("&");
			if(pairs.length > 0) {swfNode += '<param name="flashvars" value="'+ pairs +'" />';}
			swfNode += "</object>";
		}
		return swfNode;
	},
	write: function(elementId){
		if(this.getAttribute('useExpressInstall')) {
			// check to see if we need to do an express install
			var expressInstallReqVer = new deconcept.PlayerVersion([6,0,65]);
			if (this.installedVer.versionIsValid(expressInstallReqVer) && !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 elementId == 'string') ? document.getElementById(elementId) : elementId;
			n.innerHTML = this.getSWFHTML();
			return true;
		}else{
			if(this.getAttribute('redirectUrl') != "") {
				document.location.replace(this.getAttribute('redirectUrl'));
			}
		}
		return false;
	}
}

/* ---- detection functions ---- */
deconcept.SWFObjectUtil.getPlayerVersion = function(){
	var PlayerVersion = new deconcept.PlayerVersion([0,0,0]);
	if(navigator.plugins && navigator.mimeTypes.length){
		var x = navigator.plugins["Shockwave Flash"];
		if(x && x.description) {
			PlayerVersion = new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
		}
	}else{
		// do minor version lookup in IE, but avoid fp6 crashing issues
		// see http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/
		try{
			var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		}catch(e){
			try {
				var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
				PlayerVersion = new deconcept.PlayerVersion([6,0,21]);
				axo.AllowScriptAccess = "always"; // throws if player version < 6.0.47 (thanks to Michael Williams @ Adobe for this code)
			} catch(e) {
				if (PlayerVersion.major == 6) {
					return PlayerVersion;
				}
			}
			try {
				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			} catch(e) {}
		}
		if (axo != null) {
			PlayerVersion = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
		}
	}
	return PlayerVersion;
}
deconcept.PlayerVersion = function(arrVersion){
	this.major = arrVersion[0] != null ? parseInt(arrVersion[0]) : 0;
	this.minor = arrVersion[1] != null ? parseInt(arrVersion[1]) : 0;
	this.rev = arrVersion[2] != null ? parseInt(arrVersion[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;
}
/* ---- get value of query string param ---- */
deconcept.util = {
	getRequestParameter: function(param) {
		var q = document.location.search || document.location.hash;
		if(q) {
			var pairs = q.substring(1).split("&");
			for (var i=0; i < pairs.length; i++) {
				if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
					return pairs[i].substring((pairs[i].indexOf("=")+1));
				}
			}
		}
		return "";
	}
}
/* fix for video streaming bug */
deconcept.SWFObjectUtil.cleanupSWFs = function() {
	var objects = document.getElementsByTagName("OBJECT");
	for (var i=0; i < objects.length; i++) {
		objects[i].style.display = 'none';
		for (var x in objects[i]) {
			if (typeof objects[i][x] == 'function') {
				objects[i][x] = null;
			}
		}
	}
}
if (typeof window.onunload == 'function') {
	var oldunload = window.onunload;
		window.onunload = function() {
		deconcept.SWFObjectUtil.cleanupSWFs();
		oldunload();
	}
} else {
	window.onunload = deconcept.SWFObjectUtil.cleanupSWFs;
}
/* add Array.push if needed (ie5) */
if (Array.prototype.push == null) { Array.prototype.push = function(item) { this[this.length] = item; return this.length; }}

/* add some aliases for ease of use/backwards compatibility */
var getQueryParamValue = deconcept.util.getRequestParameter;
var FlashObject = deconcept.SWFObject; // for legacy support
var SWFObject = deconcept.SWFObject;



/* ------------- Ends Here ----------*/


var accounting_i_s = new ypSlideOutMenu("accounting_i_s", "down",0, 0, 260, 250)
var support_i_s = new ypSlideOutMenu("support_i_s", "down",0, 0, 200, 250)
var knowledge_i_s = new ypSlideOutMenu("knowledge_i_s", "down",0, 0, 200, 250)
var partners_i_s = new ypSlideOutMenu("partners_i_s", "down",0, 0, 200, 250)
var comp_i_s = new ypSlideOutMenu("comp_i_s", "down",0, 6, 200, 250)
var news_i_s = new ypSlideOutMenu("news_i_s", "down",0, 0, 200, 250)
ypSlideOutMenu.writeCSS();



/* --------------- Ends Here ------------- */







