//************************************************************************************
//  Title:      FCP Combo-Chromatic Color Picker
//  URL:        http://www.free-color-picker.com
//  Product No. FCP101a
//  Version:    1.2
//  Date:       10/01/2006
//  NOTE:       Permission given to use this script in ANY kind of applications IF
//              script code remains UNCHANGED and the anchor tag "powered by FCP"
//              remains valid and visible to the user.
//
//  Call:       showColorGrid1("input_field_id","span_id")
//  Add:        <DIV ID="COLORPICKER101" CLASS="COLORPICKER101"></DIV> anywhere in body
//**************************************************************************************
function getScrollY(){var scrOfX = 0,scrOfY=0;if(typeof(window.pageYOffset)=='number'){scrOfY=window.pageYOffset;scrOfX=window.pageXOffset;}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){scrOfY=document.body.scrollTop;scrOfX=document.body.scrollLeft;}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){scrOfY=document.documentElement.scrollTop;scrOfX=document.documentElement.scrollLeft;}return scrOfY;}document.write("<style type='text/css'>.colorpicker101{width:248px;visibility:hidden;display:none;position:absolute;background:#FFF;border:solid 1px #CCC;padding:4px;z-index:999;filter:progid:DXImageTransform.Microsoft.Shadow(color=#D0D0D0,direction=135);}.o5582brd1{border-bottom:solid 1px #DFDFDF;border-right:solid 1px #DFDFDF;padding:0;width:19px;height:16px;}a.o5582n661,.o5582n661,.o5582n66a1{padding:0;font:9px arial;color:#666;border:none;text-decoration:underline;}.o5582n661,.o5582n66a1{text-align:center;text-decoration:none;}a:hover.o5582n661{text-decoration:none;color:#FFA500;cursor:pointer;}.a01p3{padding:1px 4px 1px 2px;background:whitesmoke;border:solid 1px #DFDFDF;}</style>");var nocol1="&#78;&#79;&#32;&#67;&#79;&#76;&#79;&#82;",clos1="&#67;&#76;&#79;&#83;&#69;",tt1="&#70;&#82;&#69;&#69;&#45;&#67;&#79;&#76;&#79;&#82;&#45;&#80;&#73;&#67;&#75;&#69;&#82;&#46;&#67;&#79;&#77;",hm1="&#104;&#116;&#116;&#112;&#58;&#47;&#47;&#119;&#119;&#119;&#46;";hm1+=tt1;tt1="&#80;&#79;&#87;&#69;&#82;&#69;&#68;&#32;&#98;&#121;&#32;&#70;&#67;&#80;";function getTop1(){csBrHt1=0;if(typeof(window.innerWidth)=='number'){csBrHt1=window.innerHeight;}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){csBrHt1=document.documentElement.clientHeight;}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){csBrHt1=document.body.clientHeight;};ctop1=((csBrHt1/2)-100)+getScrollY();return ctop1;}function getLeft1(){var csBrWt1=0;if(typeof(window.innerWidth)=='number'){csBrWt1=window.innerWidth;}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){csBrWt1=document.documentElement.clientWidth;}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){csBrWt1=document.body.clientWidth;}cleft1=(csBrWt1/2)-90;return cleft1;}function setCCbldID1(objID,val){document.getElementById(objID).value=val;}function setCCbldSty1(objID,prop,val){switch(prop){case "bc":document.getElementById(objID).style.backgroundColor=val;break;case "vs":document.getElementById(objID).style.visibility=val;break;case "ds":document.getElementById(objID).style.display=val;break;case "tp":document.getElementById(objID).style.top=val;break;case "lf":document.getElementById(objID).style.left=val;break;}}function putOBJxColor1(o1,S2,p1){if(p1!='x'){setCCbldID1(o1,p1);if(S2=='none'){S2='colorpicker101';};setCCbldSty1(S2,'bc',p1);}setCCbldSty1('colorpicker101','vs','hidden');setCCbldSty1('colorpicker101','ds','none');}function showColorGrid1(o1,S1){var objX=new Array('0','3','6','8','9','A','B','C','D','F');var c=0;var z='"'+o1+'","'+S1+'",""';var xl='"'+o1+'","'+S1+'","x"';var mid='';mid+='<center><table width="248px" bgcolor="#FFFFFF" border="0" cellpadding="0" cellspacing="0" style="border:solid 1px #F0F0F0;padding:1px;"><tr>';mid+="<td colspan='10' align='left' style='font:10px arial;background:#000;color:#CCC;'>&nbsp;Mono-Chromatic Selection Palette</td></tr><tr><td colspan='10' align='center' style='margin:0;padding:2;height:14px;' ><input class='o5582n661' type='text' size='12' id='o5582n661' value='#FFFFFF'><input class='o5582n66a1' type='text' size='1' id='o5582n66a1' value='' style='border:solid 1px #666;'>&#160;|&#160;<a class='o5582n661' href='javascript:onclick=putOBJxColor1("+z+")'><span class='a01p3'>"+nocol1+"</span></a>&#160;&#160;<a class='o5582n661' href='javascript:onclick=putOBJxColor1("+xl+")'><span class='a01p3'>"+clos1+"</span></a>&#160;</td></tr><tr>";var br=1;for(y=0;y<10;y++){mid+='</tr><tr>';for(x=0;x<10;x++){var grid='';grid=objX[y]+objX[x]+objX[y]+objX[x]+objX[y]+objX[x];var b="'"+o1+"', '"+S1+"','#"+grid+"'";mid+='<td class="o5582brd1" style="background-color:#'+grid+'"><a class="o5582n661"  href="javascript:onclick=putOBJxColor1('+b+');" onmouseover=javascript:document.getElementById("o5582n661").value="#'+grid+'";javascript:document.getElementById("o5582n66a1").style.backgroundColor="#'+grid+'";  title="#'+grid+'"><div style="width:100%;height:14px;"></div></a></td>';c++;}}mid+="</tr><tr><td colspan='10' align='right' style='padding:2px;border:solid 1px #FFF;background:#FFF;'><a href='"+hm1+"' style='color:#666;font-size:8px;font-family:arial;text-decoration:none;letter-spacing:1px;'>"+tt1+"</a></td></tr></table>";setCCbldSty1('colorpicker101','tp','100px');document.getElementById('colorpicker101').style.top=getTop1();document.getElementById('colorpicker101').style.left=getLeft1();setCCbldSty1('colorpicker101','vs','visible');setCCbldSty1('colorpicker101','ds','block');document.getElementById('colorpicker101').innerHTML=mid;}
