var g_QCP_IsBusy=false;var g_QCP_CurrentPopupId;var g_QCP_CurrentOpenerId;var g_QCP_CurrentPopup;var g_QCP_CurrentOpener;var g_QCP_HasDrag=false;function QCP_SetInnerHTML(pObj,pValue){pObj.innerHTML=pValue;};function QCP_ParentNode(pObj){if(pObj.parentElement!=null){return pObj.parentElement;}else if(pObj.parentNode!=null){return pObj.parentNode;}else{return null;}};function QCP_GetElementById(pId){if(document.getElementById){return document.getElementById(pId);}else if(document.all){return document.all[pId];}else if(document.layers){var vElement="";eval("vElement=document.['"+pId+"']");return vElement;}else{return null;}};function QCP_SetBackColor(pObj,pColor){pObj.style.backgroundColor=pColor;};function QCP_SetForeColor(pObj,pColor){pObj.style.color=pColor;};function QCP_GetAtt(pObj,pAttributeName,pDefaultValue){if(pObj.getAttribute){var vResult=pObj.getAttribute(pAttributeName,0);if(vResult==null||((vResult=="")&&(!document.all))){return pDefaultValue;}return vResult;}else{var regEx=new RegExp(":","g");var vId=pObj.name.replace(regEx,"_");var vVarName=vId+"_"+pAttributeName;var vResult=eval(vVarName);if((vResult==null)||(vResult=="")){return pDefaultValue;}return vResult;}};function QCP_SetAtt(pObj,pAttributeName,pAttributeValue){if(pObj.setAttribute){pObj.setAttribute(pAttributeName,pAttributeValue,0);}else{var vVarName=pObj.name+"_"+pAttributeName;eval("vVarName = pAttributeValue.toString();");}};function QCP_PH(pClientId,pObj,pLabel){QCP_P(pClientId,pObj,true);QCP_HS(pClientId,pObj,pLabel);};function QCP_P(pClientId,pObj){var value=QCP_GetAtt(pObj,"CV","");var name=QCP_GetAtt(pObj,"CN","");var title=value;if(value!=name){title=title+' '+name;}var description=QCP_GetAtt(pObj,"CD","");var vValue=QCP_GetElementById(pClientId+'previewvalue');if(vValue!=null){QCP_SetInnerHTML(vValue,title);}vDescription=QCP_GetElementById(pClientId+'previewdescription');if(vDescription!=null){QCP_SetInnerHTML(vDescription,description);}vColor=QCP_GetElementById(pClientId+'previewcolor');if(vColor!=null){QCP_SetBackColor(vColor,value);}};function QCP_HS(pClientId,pObj,pLabel){var vLastCell=null;var vLastLabel=null;var vLabel=null;var vBackColor=null;var vForeColor=null;if(pLabel){vLabel=QCP_GetElementById(pLabel);}eval("vLastCell = g_QCP_"+pClientId+"_LC;");eval("vLastLabel = g_QCP_"+pClientId+"_LL;");eval("vBackColor = g_QCP_"+pClientId+"_SIB;");eval("vForeColor = g_QCP_"+pClientId+"_SIF;");if(vLastCell!=null){eval("QCP_SetBackColor(vLastCell, g_QCP_"+pClientId+"_LCB);");}if(vLastLabel!=null){eval("QCP_SetForeColor(vLastLabel, g_QCP_"+pClientId+"_LCF);");}eval("g_QCP_"+pClientId+"_LCB = pObj.style.backgroundColor;");eval("g_QCP_"+pClientId+"_LC = pObj;");QCP_SetBackColor(pObj,vBackColor);if(vLabel!=null){eval("g_QCP_"+pClientId+"_LL = vLabel;");eval("g_QCP_"+pClientId+"_LCF = vLabel.style.color;");QCP_SetForeColor(vLabel,vForeColor);}};function QCP_TabSelect(pClientId,pTabId,pSelectColor,pUnSelectColor){var vTitleId=pTabId+"_Title";var vLastTab=null;var vLastTabTitle=null;eval("vLastTab = g_QCP_"+pClientId+"_LT;");if(pTabId!=null){QCP_GetElementById(pTabId).style.display='inline';}if(vTitleId!=null){QCP_SetBackColor(QCP_GetElementById(vTitleId),pSelectColor);}if(vLastTab!=null&&vLastTab!=pTabId){QCP_GetElementById(vLastTab).style.display='none';vLastTabTitle=vLastTab+"_Title";if(vLastTabTitle!=null){QCP_SetBackColor(QCP_GetElementById(vLastTabTitle),pUnSelectColor);}}eval("g_QCP_"+pClientId+"_LT = pTabId;");var vPopupB=g_QCP_CurrentPopupId+"_B";if(vPopupB!=null){var vPopupControl=QCP_GetElementById(g_QCP_CurrentPopupId);var vPopupBObj=QCP_GetElementById(vPopupB);if(vPopupBObj!=null){vPopupBObj.style.pixelTop=vPopupControl.style.pixelTop;vPopupBObj.style.pixelLeft=vPopupControl.style.pixelLeft;vPopupBObj.style.pixelWidth=vPopupControl.offsetWidth;vPopupBObj.style.pixelHeight=vPopupControl.offsetHeight;vPopupBObj.style.zIndex=29000;vPopupBObj.style.display='block';}}QCP_ResizePopup();};function QCP_InitPopup(pClientId,pSelectedId){QCP_ResizePopup();if(pSelectedId!=""){var vTargetTd="t_"+pClientId+pSelectedId;var vTargetLabel="l_"+pClientId+pSelectedId;QCP_PH(pClientId,QCP_GetElementById(vTargetTd),vTargetLabel);}else{QCP_CPH(pClientId);}};function QCP_ResizePopup(){var div=QCP_GetElementById("QWSECPOPUP");if(div!=null){var width=div.offsetWidth-document.body.clientWidth+22;var height=div.offsetHeight-document.body.clientHeight+22;window.resizeBy(width,height);}};function QCP_CancelClicked(){QCP_ClosePopup();};function QCP_AutoHideClicked(){var pickerId=g_QCP_CurrentOpenerId.substring(0,g_QCP_CurrentOpenerId.length-6);eval("var vAutoHide=g_QCP_"+pickerId+"_AH");eval("g_QCP_"+pickerId+"_AH=!vAutoHide");eval("var vAutoHideButtonId='"+pickerId+"_AHB'");var vAutoHideButton=QCP_GetElementById(vAutoHideButtonId);if(!vAutoHide==false){if(vAutoHideButton!=null)vAutoHideButton.src=ahImg_Off.src;QCP_DetachMouseDownHandler();}else{if(vAutoHideButton!=null)vAutoHideButton.src=ahImg_On.src;QCP_AttachMouseDownHandler();}};function QCP_IsInRect(x,y,left,right,top,bottom){if((x<left)||(x>right)||(y<top)||(y>bottom)){return false;}return true;};function QCP_IsMouseInPopup(mouseX,mouseY,pPopupControl){var vPopupLeft,vPopupTop,vPopupRight,vPopupBottom;vPopupLeft=QCP_GetOffsetX(pPopupControl,pPopupControl.offsetLeft,1);vPopupTop=QCP_GetOffsetY(pPopupControl,pPopupControl.offsetTop,1);vPopupRight=vPopupLeft+QCP_GetElementById(pPopupControl.id+"_T").offsetWidth;vPopupBottom=vPopupTop+pPopupControl.offsetHeight;return QCP_IsInRect(mouseX,mouseY,vPopupLeft,vPopupRight,vPopupTop,vPopupBottom);};function QCP_IsMouseInOpener(mouseX,mouseY,pOpener){var nOpenerLeft,nOpenerRight,nOpenerTop,nOpenerBottom;nOpenerLeft=pOpener.offsetLeft;nOpenerRight=pOpener.offsetLeft+pOpener.offsetWidth;nOpenerTop=pOpener.offsetTop;nOpenerBottom=pOpener.offsetTop+pOpener.offsetHeight;return QCP_IsInRect(mouseX,mouseY,nOpenerLeft,nOpenerRight,nOpenerTop,nOpenerBottom);};function QCP_HandleMouseDownE(){return QCP_HandleMouseDown(window.event);};function QCP_HandleMouseDown(e){if(g_QCP_CurrentPopupId==null){return;}if(g_QCP_IsBusy){return;}var vPopupControl=g_QCP_CurrentPopup;if(vPopupControl==null){return;}var vMouseX,vMouseY;vMouseX=QCP_GetMouseClientX(e,vPopupControl);vMouseY=QCP_GetMouseClientY(e,vPopupControl);if(!QCP_IsMouseInPopup(vMouseX,vMouseY,vPopupControl)){var vOpener=g_QCP_CurrentOpener;if(vOpener!=null&&vOpener!=""){if(!QCP_IsMouseInOpener(vMouseX,vMouseY,vOpener)){QCP_ClosePopup();}}else{QCP_ClosePopup();}}};function QCP_GetScrolledX(pPopupControl,pX){if(document.body.scrollLeft!=null){var vParent=QCP_ParentNode(pPopupControl);while(vParent!=null&&vParent!=document.body){if(vParent.scrollLeft!=null){pX=pX+vParent.scrollLeft;}vParent=QCP_ParentNode(vParent);}pX=pX+document.body.scrollLeft;}else if(window.pageXOffset!=null){pX=pX+window.pageXOffset;}return pX;};function QCP_GetScrolledY(pPopupControl,pY){if(document.body.scrollTop!=null){var vParent=QCP_ParentNode(pPopupControl);while(vParent!=null&&vParent!=document.body){if(vParent.scrollTop!=null&&vParent.tagName!="TR"){pY=pY+vParent.scrollTop;}vParent=QCP_ParentNode(vParent);}pY=pY+document.body.scrollTop;}else if(window.pageXOffset!=null){pY=pY+window.pageYOffset;}return pY;};function QCP_GetOffsetX(eElement,nInitialPos,nDirection){var nLeftPos=eElement.offsetLeft;if(nInitialPos){nLeftPos=nInitialPos;}var eParElement=eElement.offsetParent;while(eParElement!=null){if(g_QWS_IsIE){if((eParElement.tagName!="TABLE")&&(eParElement.tagName!="BODY")&&(eParElement.clientLeft!=null)){nLeftPos+=eParElement.clientLeft;}}else{if(eParElement.tagName=="TABLE"){var nParBorder=parseInt(eParElement.border);if(isNaN(nParBorder)){var nParFrame=eParElement.getAttribute('frame');if(nParFrame!=null){nLeftPos+=1;}}else if(nParBorder>0){nLeftPos+=nParBorder;}}}if(eParElement.tagName!="DIV"||eParElement.style.position!="absolute"){nLeftPos+=nDirection*eParElement.offsetLeft;}eParElement=eParElement.offsetParent;}return nLeftPos;};function QCP_GetOffsetY(eElement,nInitialPos,nDirection){var nTopPos=eElement.offsetTop;if(nInitialPos){nTopPos=nInitialPos;}var eParElement=eElement.offsetParent;while(eParElement!=null){if(g_QWS_IsIE){if((eParElement.tagName!="TABLE")&&(eParElement.tagName!="BODY")&&(eParElement.clientTop!=null)){nTopPos+=eParElement.clientTop;}}else{if(eParElement.tagName=="TABLE"){var nParBorder=parseInt(eParElement.border);if(isNaN(nParBorder)){var nParFrame=eParElement.getAttribute('frame');if(nParFrame!=null){nTopPos+=1;}}else if(nParBorder>0){nTopPos+=nParBorder;}}}if(eParElement.tagName!="DIV"||eParElement.style.position!="absolute"){nTopPos+=nDirection*eParElement.offsetTop;}eParElement=eParElement.offsetParent;}return nTopPos;};function QCP_OpenerClicked(pW,pTitle,pStyle,pOpenerId,pPopupControlId){QCP_OpenPopup(pW,pTitle,pStyle,pOpenerId,pPopupControlId);g_QCP_HasDrag=false;};function QCP_Node(){this.Type=null;this.Align=null;this.ColumnSpan=null;this.Mode=null;this.Index=null;this.Description="";this.Image=null;this.Style=null;this.Title=null;this.Value=null;this.RowSpan=null;this.Valign=null;this.CountID=null;};var dd=['Type','Align','ColumnSpan','Mode','Index','Description','Image','Style','Title','Value','RowSpan','Valign','CountID'];function QCP_GetAlign(ahtml,align,valign){switch(align){case "0":break;case "1":ahtml[ahtml.length]=" align='left'";break;case "2":ahtml[ahtml.length]=" align='center'";break;case "3":ahtml[ahtml.length]=" align='right'";break;case "4":ahtml[ahtml.length]=" align='justify'";break;}switch(valign){case "0":break;case "1":ahtml[ahtml.length]=" valign='top'";break;case "2":ahtml[ahtml.length]=" valign='middle'";break;case "3":ahtml[ahtml.length]=" valign='bottom'";break;}};function QCP_BuildPaletteNode(ahtml,pControlId,node,height,width){ahtml[ahtml.length]="<td style='QCPCC' title='";ahtml[ahtml.length]=node.Value;ahtml[ahtml.length]=" ";ahtml[ahtml.length]=node.Title;ahtml[ahtml.length]="' CN='";ahtml[ahtml.length]=node.Title;ahtml[ahtml.length]="' CV='";ahtml[ahtml.length]=node.Value;ahtml[ahtml.length]="' colspan='";ahtml[ahtml.length]=node.ColumnSpan;ahtml[ahtml.length]="' rowspan='";ahtml[ahtml.length]=node.RowSpan;ahtml[ahtml.length]="' id='t_";ahtml[ahtml.length]=pControlId;ahtml[ahtml.length]=node.CountID;ahtml[ahtml.length]="' CD='";ahtml[ahtml.length]=node.Description;ahtml[ahtml.length]="' ";ahtml[ahtml.length]="onclick='";ahtml[ahtml.length]=pControlId;ahtml[ahtml.length]="C(this, \"";ahtml[ahtml.length]=node.Index;ahtml[ahtml.length]="\",\"";ahtml[ahtml.length]=node.CountID;ahtml[ahtml.length]="\");' onMouseOver='QCP_PH(\"";ahtml[ahtml.length]=pControlId;ahtml[ahtml.length]="\", this, \"l_";ahtml[ahtml.length]=pControlId;ahtml[ahtml.length]=node.CountID;ahtml[ahtml.length]="\");'>";ahtml[ahtml.length]="<table cellpadding='0' cellspacing='0' border='0' width='100%'><tr>";for(var l=0;l<node.Mode.length;l++){switch(node.Mode.substring(l,l+1)){case "C":ahtml[ahtml.length]="<td class='QCPCC'><img src='";ahtml[ahtml.length]=QCP_AppearancePath;ahtml[ahtml.length]="dot.gif' width='";ahtml[ahtml.length]=width;ahtml[ahtml.length]="' height='";ahtml[ahtml.length]=height;ahtml[ahtml.length]="' style='";eval("var imgstyle= g_QCP_"+pControlId+"_DIStyle;");ahtml[ahtml.length]=imgstyle;ahtml[ahtml.length]=";background-color:";ahtml[ahtml.length]=node.Value;ahtml[ahtml.length]=";' /></td>";break;case "S":ahtml[ahtml.length]="<td class='QCPCC'><img src='";ahtml[ahtml.length]=QCP_AppearancePath;ahtml[ahtml.length]="dot.gif' width='2' height='1' /></td>";break;case "I":ahtml[ahtml.length]="<td class='QCPCC'><img border='0' src='";ahtml[ahtml.length]=QCP_PaletteImagePath;ahtml[ahtml.length]=node.Image;ahtml[ahtml.length]="' style='cursor:hand;' /></td>";break;case "T":ahtml[ahtml.length]="<td nowrap='true' width='100%' style='cursor:hand;'><label id='l_";ahtml[ahtml.length]=pControlId;ahtml[ahtml.length]=node.CountID;ahtml[ahtml.length]="' style='color:Black;'>";ahtml[ahtml.length]=node.Title;ahtml[ahtml.length]="</label></td>";break;}}ahtml[ahtml.length]="</tr></table></td>";};function QCP_BuildPaletteHtml(ahtml,node){ahtml[ahtml.length]="<td colspan='";ahtml[ahtml.length]=node.ColumnSpan;ahtml[ahtml.length]="' rowspan='";ahtml[ahtml.length]=node.RowSpan;ahtml[ahtml.length]="' ";QCP_GetAlign(ahtml,node.Align,node.Valign);ahtml[ahtml.length]=">";ahtml[ahtml.length]=node.Title.replace(/#%PP%#/gi,"'").replace(/#%DD%#/gi,",");ahtml[ahtml.length]="</td>";};function QCP_BuildPaletteText(ahtml,node,defaultStyle){ahtml[ahtml.length]="<td colspan='";ahtml[ahtml.length]=node.ColumnSpan;ahtml[ahtml.length]="' rowspan='";ahtml[ahtml.length]=node.RowSpan;ahtml[ahtml.length]="' ";QCP_GetAlign(ahtml,node.Align,node.Valign);ahtml[ahtml.length]=">";ahtml[ahtml.length]="<label style='";if(node.Style!=null){ahtml[ahtml.length]=node.Style;}else{ahtml[ahtml.length]=defaultStyle;}ahtml[ahtml.length]="'>";ahtml[ahtml.length]=node.Title;ahtml[ahtml.length]="</label></td>";};function QCP_BuildPalette(pControlId,targetId,srcId){eval("var target = QCP_GetElementById("+targetId+");");eval("var pControl = "+pControlId+";");if(target==null){return;}if(target.innerHTML.length>0){return;}eval("var src="+srcId+";");if(src.length<6){return;};var ahtml=new Array();var lastRowType="";var height=src[0];var width=src[1];var cellpadding=src[2];var cellspacing=src[3];var defaultStyle=src[4];ahtml[ahtml.length]="<table cellpadding='";ahtml[ahtml.length]=cellpadding;ahtml[ahtml.length]="' cellspacing='";ahtml[ahtml.length]=cellspacing;ahtml[ahtml.length]="' border='0'>";d=new Date();for(var i=5;i<src.length;i++){ahtml[ahtml.length]="<tr>";if(i>5&&src[i][0]!=lastRowType){ahtml[ahtml.length]="</tr></table>";ahtml[ahtml.length]="<table cellpadding='";ahtml[ahtml.length]=cellpadding;ahtml[ahtml.length]="' cellspacing='";ahtml[ahtml.length]=cellspacing;ahtml[ahtml.length]="' border='0'><tr>";}lastRowType=src[i][0];for(var j=1;j<src[i].length;j++){var node=new QCP_Node();for(var k=0;k<dd.length;k++){if(src[i][j][k]!="")node[dd[k]]=src[i][j][k];}if(node.Type=="C"){QCP_BuildPaletteNode(ahtml,pControl,node,height,width);}else if(node.Type=="T"){QCP_BuildPaletteText(ahtml,node,defaultStyle);}else if(node.Type=="H"){QCP_BuildPaletteHtml(ahtml,node);}}ahtml[ahtml.length]="</tr>";}ahtml[ahtml.length]="</table>";var htmlcode=ahtml.join('');if(typeof(target.innerHTML)!='undefined'){QCP_SetInnerHTML(target,htmlcode);}};function QCP_BuildPalettes(){if(typeof(window.Quickwebsoft_ColorPicker_Data_S)!="undefined"){for(var i=0;i<Quickwebsoft_ColorPicker_Data_S.length;i++){var rid=(Quickwebsoft_ColorPicker_Data_S[i]).toString();var cid=rid.substring(0,rid.indexOf("_R_"));var pId=rid.substring(rid.indexOf("=")+1);var divId=rid.substring(0,rid.indexOf("="));QCP_BuildPalette("\""+cid+"\"","\""+divId+"\"",pId);}}};function QCP_OpenPopup(pW,pTitle,pBackColor,pOpenerControlId,pPopupControlId){if(g_QCP_IsBusy){return;}if(typeof(window.Quickwebsoft_ColorPicker_Data)!="undefined"){var pickerToDo=null;var built=null;for(var i=0;i<Quickwebsoft_ColorPicker_Data.length;i++){var rid=(Quickwebsoft_ColorPicker_Data[i]).toString();var cid=rid.substring(0,rid.indexOf("_R_"));if(cid==pPopupControlId.substring(0,cid.length)){pickerToDo=cid;var pId=rid.substring(rid.indexOf("=")+1);var divId=rid.substring(0,rid.indexOf("="));QCP_BuildPalette("\""+cid+"\"","\""+divId+"\"",pId);}}}var vOpenerControl=null;if(pOpenerControlId!=""){vOpenerControl=QCP_GetElementById(pOpenerControlId);}if(vOpenerControl==null){return;}QCP_ClosePopup();var vPopupControl=QCP_GetElementById(pPopupControlId);g_QCP_CurrentPopupId=pPopupControlId;g_QCP_CurrentOpenerId=pOpenerControlId;g_QCP_CurrentPopup=vPopupControl;g_QCP_CurrentOpener=vOpenerControl;if(vPopupControl==null){return;}var vClientId=pPopupControlId.substring(0,pPopupControlId.length-7);eval("var vSelectedId = QCP_GetAtt(QCP_GetElementById('"+vClientId+"_LastId'), 'value', '');");if(pW=="T"){var ahtmlcode=new Array();ahtmlcode[ahtmlcode.length]='<html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>';ahtmlcode[ahtmlcode.length]=pTitle;ahtmlcode[ahtmlcode.length]='</title></head><script language="JavaScript" src="';ahtmlcode[ahtmlcode.length]=QCP_ScriptPath;ahtmlcode[ahtmlcode.length]='ColorPicker.js"></script><LINK href="';ahtmlcode[ahtmlcode.length]=QCP_AppearancePath;ahtmlcode[ahtmlcode.length]='ColorPicker.css" type="text/css" rel="stylesheet">';ahtmlcode[ahtmlcode.length]='<script languate="JavaScript">g_QCP_CurrentOpenerId = "';ahtmlcode[ahtmlcode.length]=g_QCP_CurrentOpenerId;ahtmlcode[ahtmlcode.length]='";</script>';eval("var scriptID="+pOpenerControlId.substring(0,pOpenerControlId.length-6)+"Script");ahtmlcode[ahtmlcode.length]='<script languate="JavaScript">';ahtmlcode[ahtmlcode.length]=scriptID;ahtmlcode[ahtmlcode.length]='</script><body onload="this.focus();QCP_InitPopup(';ahtmlcode[ahtmlcode.length]="'";ahtmlcode[ahtmlcode.length]=vClientId;ahtmlcode[ahtmlcode.length]="','";ahtmlcode[ahtmlcode.length]=vSelectedId;ahtmlcode[ahtmlcode.length]="');";ahtmlcode[ahtmlcode.length]='" bgcolor="';ahtmlcode[ahtmlcode.length]=pBackColor;ahtmlcode[ahtmlcode.length]='"><form><table width="100%"><tr><td><div id="QWSECPOPUP">';ahtmlcode[ahtmlcode.length]=vPopupControl.innerHTML;ahtmlcode[ahtmlcode.length]='</div></td><td></td></tr></table></form></body></html>';var newWindow=window.open("",pOpenerControlId,"toolbar=0, menubar=0, scrollbars=0, location=0, status=0, width=330, height=400");var ahtml=ahtmlcode.join('');newWindow.document.write(ahtml);newWindow.document.close();}else{g_QCP_IsBusy=true;vPopupControl.style.zIndex=30000;QCP_RePositionPopup(vOpenerControl,vPopupControl);var vPopupB=pPopupControlId+"_B";if(vPopupB!=null){var vPopupBObj=QCP_GetElementById(vPopupB);if(vPopupBObj!=null){vPopupBObj.style.pixelTop=vPopupControl.style.pixelTop;vPopupBObj.style.pixelLeft=vPopupControl.style.pixelLeft;vPopupBObj.style.pixelWidth=vPopupControl.offsetWidth;vPopupBObj.style.pixelHeight=vPopupControl.offsetHeight;vPopupBObj.style.zIndex=29000;vPopupBObj.style.display='block';}}eval("var vAutoHide=g_QCP_"+pOpenerControlId.substring(0,pOpenerControlId.length-6)+"_AH");if(vAutoHide){QCP_AttachMouseDownHandler();}vPopupControl.style.visibility="inherit";if(vSelectedId!=""){var vTargetTd="t_"+vClientId+vSelectedId;var vTargetLabel="l_"+vClientId+vSelectedId;QCP_PH(vClientId,QCP_GetElementById(vTargetTd),vTargetLabel);}else{QCP_CPH(vClientId);}g_QCP_IsBusy=false;}};function QCP_CPH(pClientId){QCP_CP(pClientId);QCP_CHS(pClientId);};function QCP_CP(pClientId){var vValue=QCP_GetElementById(pClientId+'previewvalue');QCP_SetInnerHTML(vValue,"");vDescription=QCP_GetElementById(pClientId+'previewdescription');QCP_SetInnerHTML(vDescription,"");vColor=QCP_GetElementById(pClientId+'previewcolor');QCP_SetBackColor(vColor,"");};function QCP_CHS(pClientId){var vLastCell=null;var vLastLabel=null;var vBackColor=null;var vForeColor=null;eval("vLastCell = g_QCP_"+pClientId+"_LC;");eval("vLastLabel = g_QCP_"+pClientId+"_LL;");eval("vBackColor = g_QCP_"+pClientId+"_SIB;");eval("vForeColor = g_QCP_"+pClientId+"_SIF;");if(vLastCell!=null){eval("QCP_SetBackColor(vLastCell, g_QCP_"+pClientId+"_LCB);");}if(vLastLabel!=null){eval("QCP_SetForeColor(vLastLabel, g_QCP_"+pClientId+"_LCF);");}eval("g_QCP_"+pClientId+"_LCB = null;");eval("g_QCP_"+pClientId+"_LC = null;");};function QCP_RePositionPopup(pOpenerControl,pPopupControl){var vHPos="leftalign";var vVPos="bottom";eval("var vIsStrict = g_QCP_"+g_QCP_CurrentOpenerId.substring(0,g_QCP_CurrentOpenerId.indexOf("linkId"))+"_ISM;");var vTemp=QCP_GetAtt(pOpenerControl,"PopPosH",null);if(vTemp!=null&&vTemp!=""){vHPos=vTemp;}vTemp=QCP_GetAtt(pOpenerControl,"PopPosV",null);if(vTemp!=null&&vTemp!=""){vVPos=vTemp;}var vPopWidth=pPopupControl.offsetWidth;var vPopHeight=pPopupControl.offsetHeight;var vOpenerWidth=pOpenerControl.offsetWidth;var vOpenerHeight=pOpenerControl.offsetHeight;var vDocWidth;var vDocHeight;if(g_QWS_IsIEWin){vDocWidth=document.body.scrollLeft+document.body.offsetWidth;vDocHeight=document.body.scrollTop+document.body.offsetHeight;}else{vDocWidth=innerWidth;vDocHeight=innerHeight;}var vLeftPos=QCP_GetOffsetX(pOpenerControl,pOpenerControl.offsetLeft,1)-2;var vTopPos=QCP_GetOffsetY(pOpenerControl,pOpenerControl.offsetTop,1);if(g_QWS_IsSafari){vLeftPos=vLeftPos+document.body.offsetLeft;vTopPos=vTopPos+document.body.offsetTop;}switch(vHPos){case "left":vLeftPos=vLeftPos-vPopWidth;break;case "leftalign":break;case "center":vLeftPos=vLeftPos+(vOpenerWidth-vPopWidth)/2;break;case "rightalign":vLeftPos=vLeftPos+vOpenerWidth-vPopWidth;break;case "right":vLeftPos=vLeftPos+vOpenerWidth;break;case "docleft":if(!vIsStrict){vLeftPos=0;}break;case "doccenter":if(!vIsStrict){vLeftPos=(vDocWidth-vPopWidth)/2;}break;case "docright":if(!vIsStrict){vLeftPos=vDocWidth-vPopWidth-20;}break;}if(vLeftPos>vDocWidth)vLeftPos=vDocWidth-vPopWidth;if(vLeftPos<0)vLeftPos=0;switch(vVPos){case "top":vTopPos=vTopPos-vPopHeight;break;case "topalign":break;case "middle":vTopPos=vTopPos+(vOpenerHeight-vPopHeight)/2;break;case "topalign":vTopPos=vTopPos+vOpenerHeight-vPopHeight;break;case "bottom":vTopPos=vTopPos+vOpenerHeight;break;case "doctop":if(!vIsStrict){vTopPos=0;}else{vTopPos=vTopPos+vOpenerHeight;}break;case "docmiddle":if(!vIsStrict){vTopPos=(vDocHeight-vPopHeight)/2;}else{vTopPos=vTopPos+vOpenerHeight;}break;case "docbottom":if(!vIsStrict){vTopPos=vDocHeight-vPopHeight-20;}else{vTopPos=vTopPos+vOpenerHeight;}break;}if(vTopPos>vDocHeight)vTopPos=vDocHeight-vPopHeight;if(vTopPos<0)vTopPos=0;QCP_SetPos(pPopupControl,vLeftPos,vTopPos);};function QCP_ClosePopup(){if(g_QCP_IsBusy){return;}if(g_QCP_CurrentPopup==null||g_QCP_CurrentPopup==""){return;}g_QCP_IsBusy=true;var vPopupControl=g_QCP_CurrentPopup;vPopupControl.style.visibility="hidden";var vPopupB=g_QCP_CurrentPopupId+"_B";if(vPopupB!=null){vPopupBObj=QCP_GetElementById(vPopupB);if(vPopupBObj!=null){vPopupBObj.style.display='none';}}QCP_DetachMouseDownHandler();g_QCP_CurrentPopupId="";g_QCP_CurrentOpenerId="";g_QCP_CurrentPopup="";g_QCP_CurrentOpener="";g_QCP_IsBusy=false;};function QCP_AttachMouseDownHandler(){if(document.attachEvent){document.attachEvent("onmousedown",QCP_HandleMouseDownE);}else if(document.addEventListener){document.addEventListener("mousedown",QCP_HandleMouseDown,false);}else document.onmousedown=QCP_HandleMouseDownE;};function QCP_DetachMouseDownHandler(){if(document.detachEvent){document.detachEvent("onmousedown",QCP_HandleMouseDownE);}else if(document.removeEventListener){document.removeEventListener("mousedown",QCP_HandleMouseDown,false);}};function QCP_SetPos(pObj,pLeftPos,pTopPos){pObj.style.position="absolute";if(pObj.style.pixelLeft){pObj.style.pixelLeft=pLeftPos;pObj.style.pixelTop=pTopPos;}else if(pObj.style.posLeft){pObj.style.posLeft=pLeftPos.toString()+"px";pObj.style.posTop=pTopPos.toString()+"px";}else{pObj.style.left=pLeftPos.toString()+"px";pObj.style.top=pTopPos.toString()+"px";}};var mousemoveSave,mouseupSave;var popupOffX,popupOffY;function QCP_DragDropBegin(e){if(g_QWS_IsIEMac)return;mousemoveSave=document.body.onmousemove;mouseupSave=document.body.onmouseup;popupOffX=(e.offsetX==null)?e.layerX:e.offsetX;popupOffY=(e.offsetY==null)?e.layerY:e.offsetY;document.body.onmousemove=QCP_DragDrop;document.body.onmouseup=QCP_DragDropStop;};function QCP_DragDrop(e){var popup=QCP_GetElementById(g_QCP_CurrentPopupId);var vPopupB=g_QCP_CurrentPopupId+"_B";var popupB=QCP_GetElementById(vPopupB);if(e==null&&event!=null){var vX=QCP_GetMouseClientX(event,popup)-popupOffX;var vY=QCP_GetMouseClientY(event,popup)-popupOffY;QCP_SetPos(popup,vX,vY);if(popupB!=null){QCP_SetPos(popupB,vX,vY);}event.cancelBubble=true;}else{var vX=(e.pageX*1-popupOffX);var vY=(e.pageY*1-popupOffY);QCP_SetPos(popup,vX,vY);if(popupB!=null){QCP_SetPos(popupB,vX,vY);}e.cancelBubble=true;}g_QCP_HasDrag=true;if((event.button&1)==0){QCP_DragDropStop();}};function QCP_DragDropStop(){document.body.onmousemove=mousemoveSave;document.body.onmouseup=mouseupSave;};function QCP_GetMouseClientX(e,control){var x=e.clientX;if(g_QWS_IsSafari){x=x+document.body.offsetLeft;}else{x=QCP_GetScrolledX(control,x);}var eParElement=control.offsetParent;while(eParElement!=null){if(eParElement.tagName=="DIV"&&eParElement.style.position=="absolute"){x=x-eParElement.offsetLeft;}eParElement=eParElement.offsetParent;}return x;};function QCP_GetMouseClientY(e,control){var y=e.clientY;if(g_QWS_IsSafari){y=y+document.body.offsetTop;}else{y=QCP_GetScrolledY(control,y);}var eParElement=control.offsetParent;while(eParElement!=null){if(eParElement.tagName=="DIV"&&eParElement.style.position=="absolute"){y=y-eParElement.offsetTop;}eParElement=eParElement.offsetParent;}return y;};g_QWS_CP_Script_Loaded=true;