//\/////
//\  coolTip CSS Style Plugin
//\  This file requires coolTip 1.00 or later.
//\  Modified July 29, 2005
//\
//\  You may not remove or change this notice.
//\  Copyright Robert E Boughner 2005. All rights reserved.
//\  
//\  This plugin is governed by the same restrictions set forth
//\  in the prologue to cCore.js.
//\/////
//\  THIS IS A VERY MODIFIED VERSION. DO NOT EDIT OR PUBLISH. GET THE ORIGINAL!
if(typeof cInfo==cUdf||!cInfo.meets(1.00))alert('coolTip 1.00 or later is required for the CSS Style Plugin.');else{var cssstyleCmds='cssstyle,padunit,heightunit,widthunit,textsizeunit,textdecoration,textstyle,textweight,'+
'captionsizeunit,captiondecoration,captionstyle,captionweight,closesizeunit,'+
'closedecoration,closestyle,closeweight';registerCommands(cssstyleCmds);
var styleVariables='cssstyle|CSSSTYLE|padunit|px|heightunit|px|widthunit|px|textsizeunit|px|textdecoration|none|textstyle|normal|textweight|normal|'+
'captionsizeunit|px|captiondecoration|none|captionstyle|normal|captionweight|bold|closesizeunit|px|'+
'closedecoration|none|closestyle|normal|closeweight|normal';setDefaultVariables(styleVariables);
function setCSSStyleVariables(obj){obj.padunit=cd_padunit;obj.heightunit=cd_heightunit;obj.widthunit=cd_widthunit;obj.textsizeunit=cd_textsizeunit;obj.textdecoration=cd_textdecoration;obj.textstyle=cd_textstyle;obj.textweight=cd_textweight;obj.captionsizeunit=cd_captionsizeunit;obj.captiondecoration=cd_captiondecoration;obj.captionstyle=cd_captionstyle;obj.captionweight=cd_captionweight;obj.closesizeunit=cd_closesizeunit;obj.closedecoration=cd_closedecoration;obj.closestyle=cd_closestyle;obj.closeweight=cd_closeweight;}
function parseCSSStyleExtras(pf,i,ar){var k=i;if(k<ar.length){if(ar[k]==CSSSTYLE){eval(pf+'css='+ar[k]);return k;}
if(ar[k]==PADUNIT){eval(pf+'padunit="'+ar[++k]+'"');return k;}
if(ar[k]==HEIGHTUNIT){eval(pf+'heightunit="'+ar[++k]+'"');return k;}
if(ar[k]==WIDTHUNIT){eval(pf+'widthunit="'+ar[++k]+'"');return k;}
if(ar[k]==TEXTSIZEUNIT){eval(pf+'textsizeunit="'+ar[++k]+'"');return k;}
if(ar[k]==TEXTDECORATION){eval(pf+'textdecoration="'+ar[++k]+'"');return k;}
if(ar[k]==TEXTSTYLE){eval(pf+'textstyle="'+ar[++k]+'"');return k;}
if(ar[k]==TEXTWEIGHT){eval(pf+'textweight="'+ar[++k]+'"');return k;}
if(ar[k]==CAPTIONSIZEUNIT){eval(pf+'captionsizeunit="'+ar[++k]+'"');return k;}
if(ar[k]==CAPTIONDECORATION){eval(pf+'captiondecoration="'+ar[++k]+'"');return k;}
if(ar[k]==CAPTIONSTYLE){eval(pf+'captionstyle="'+ar[++k]+'"');return k;}
if(ar[k]==CAPTIONWEIGHT){eval(pf+'captionweight="'+ar[++k]+'"');return k;}
if(ar[k]==CLOSESIZEUNIT){eval(pf+'closesizeunit="'+ar[++k]+'"');return k;}
if(ar[k]==CLOSEDECORATION){eval(pf+'closedecoration="'+ar[++k]+'"');return k;}
if(ar[k]==CLOSESTYLE){eval(pf+'closestyle="'+ar[++k]+'"');return k;}
if(ar[k]==CLOSEWEIGHT){eval(pf+'closeweight="'+ar[++k]+'"');return k;}}
return-1;}
function ctContentSimpleCssstyle(text){var txt,cpad;with(po){cpad=cellpad.split(',')[0];txt='<table width="'+width+'" border="0" cellpadding="'+border+'" cellspacing="0" style="background-color: '+bgcolor+';'+(height?' height: '+height+heightunit+';':'')+'"><tr><td><table width="100%" border="0" cellpadding="'+cpad+'" cellspacing="0" style="color: '+fgcolor+';background-color: '+fgcolor+';'+(height?' height: '+height+heightunit+';':'')+'"><tr><td valign="TOP"'+(textalign?' align="'+textalign+'"':'')+'><font style="font-family: '+textfont+';color: '+textcolor+';font-size: '+textsize+textsizeunit+';text-decoration: '+textdecoration+';font-weight: '+textweight+';font-style:'+textstyle+'">'+text+'</font></td></tr></table></td></tr></table>';}
set_background("");return txt;}
function ctContentCaptionCssstyle(text,title,close){var txt,nameId,doClose=(close!=""),fRef=po.fnRef;var closing="";var closeevent="onmouseover";with(po){if(closeclick==1)closeevent=(closetitle?' title="'+closetitle+'"':'')+' onclick';if(capicon!=""){nameId=' hspace="5"'+' align="middle" alt=""';if(typeof dragimg!=cUdf&&dragimg)nameId=' hspace="5"'+' name="'+dragimg+'" id="'+dragimg+'" align="middle" alt="Drag Enabled" title="Drag Enabled"';capicon='<img src="'+capicon+'"'+nameId+' />';}
if(doClose){closing='<td align="right"><a href="javascript:return '+fRef+'cClick(\''+cTip.id+'\');" '+closeevent+'="return '+fRef+'cClick(\''+cTip.id+'\');" style="color: '+closecolor+';font-family: '+closefont+';font-size: '+closesize+closesizeunit+';text-decoration: '+closedecoration+';font-weight: '+closeweight+';font-style:'+closestyle+';">'+close+'</a></td>';}
txt='<table width="'+width+'" border="0" cellpadding="'+border+'" cellspacing="0" style="background-color: '+bgcolor+';'+(bgbackground?' background-image: url('+bgbackground+');':'')+(height?' height: '+height+heightunit+';':'')+'"><tr><td><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td'+(capalign?' align="'+capalign+'"': '')+'><font style="font-family: '+captionfont+';color: '+capcolor+';font-size: '+captionsize+captionsizeunit+';font-weight: '+captionweight+';font-style: '+captionstyle+';text-decoration: '+captiondecoration+';">'+capicon+title+'</font></td>'+closing+'</tr></table><table width="100%" border="0" cellpadding="'+cellpad+'" cellspacing="0" style="color: '+fgcolor+';background-color: '+fgcolor+';'+(height?' height: '+height+heightunit+';':'')+'"><tr><td valign="TOP"'+(textalign?' align="'+textalign+'"':'')+'><font style="font-family: '+textfont+';color: '+textcolor+';font-size: '+textsize+textsizeunit+';text-decoration: '+textdecoration+';font-weight: '+textweight+';font-style:'+textstyle+'">'+text+'</font></td></tr></table></td></tr></table>';}
set_background("");return txt;}
function ctContentBackgroundCssstyle(text,picture,hasfullhtml){var txt;if(hasfullhtml){txt=text;}else{var pU,hU,wU;with(po){pU=(padunit=='%'?'%':'');hU=(heightunit=='%'?'%':'');wU=(widthunit=='%'?'%':'');txt='<table width="'+width+wU+'" border="0" cellpadding="0" cellspacing="0" height="'+height+hU+'"><tr><td colspan="3" height="'+padyt+pU+'"></td></tr><tr><td width="'+padxl+pU+'"></td><td valign="TOP"'+(textalign?' align="'+textalign+'"':'')+' width="'+(width-padxl-padxr)+pU+'"><font style="font-family: '+textfont+';color: '+textcolor+';font-size: '+textsize+textsizeunit+';">'+text+'</font></td><td width="'+padxr+pU+'"></td></tr><tr><td colspan="3" height="'+padyb+pU+'"></td></tr></table>';}}
set_background(picture);return txt;}
registerRunTimeFunction(setCSSStyleVariables);registerCmdLineFunction(parseCSSStyleExtras);registerHook("ctContentSimple",ctContentSimpleCssstyle,FALTERNATE,CSSSTYLE);registerHook("ctContentCaption",ctContentCaptionCssstyle,FALTERNATE,CSSSTYLE);registerHook("ctContentBackground",ctContentBackgroundCssstyle,FALTERNATE,CSSSTYLE);}
