\n');
}
window.onload=initializeUI;
window.onunload=unloadUI;
function unloadUI() {
if(!window.returnValue && tempSettings) {
window.returnValue=['cancel',tempSettings.split(';')];
}
}
function initializeUI() {
try{
window.focus();
document.attachEvent('onkeyup',shortCut);
document.attachEvent('onmousedown',startExtract);
document.attachEvent('onmouseup',endExtract);
if(window.dialogArguments) {
var tempCookie=window.dialogArguments.GetCookie('blueidea_colorSetting');
if(tempCookie!=null) {
getColor(tempCookie);
tempSettings=tempCookie;
}
else tempSettings=defaultSettings;
// applyColor();
}
}
catch(e){}
}
function startExtract() {
var curObj=event.srcElement;
if(curPicker!=null) {
curPicker.style.borderColor='#000000';
curPicker=null;
if(browserVersion>5.5)panel.style.cursor='auto';
}
if(curObj.className=='colorpicker') {
curPicker=curObj;
curPicker.style.borderColor='#FF0000';
if(browserVersion>5.5)panel.style.cursor='url(/css/color.cur)';
}
}
function endExtract() {
var curObj=event.srcElement;
if(curPicker!=null && curPicker!=curObj){
if(curObj.className=='colorpicker') {
curPicker.style.backgroundColor=curObj.currentStyle.backgroundColor;
applyColor();
}
curPicker.style.borderColor='#000000';
curPicker=null;
if(browserVersion>5.5)panel.style.cursor='auto';
}
else if(curPicker==curObj) {
colorMixer.SetVariable('_root.output',curObj.currentStyle.backgroundColor.substring(1).toUpperCase());
colorMixer.SetVariable('_root.update','update');
}
}
function getColor(objsettings) {
var settings=objsettings.split(';');
for(var i=0;i