\n"+ "
\n"; } else {return ""} } //******************* API ********************** // where you want function canAcceptBehavior(){ return true; } function behaviorFunction(){ return "YY_Zoomtext\n"; } function applyBehavior(uniqueName) { //var yyleft,yytop,yytxt,yydiv,yystart,yyend,yybilder,yyloop,yyendleft,yyendtop,yyto,yycnt,yycol,yyfont,yywt; // !!! yytxt = escQ(document.theForm.txt.value); yystart = escape(document.theForm.start.value); yyleft = escape(document.theForm.left.value); yytop = escape(document.theForm.top.value); divArray = getObjectRefs("NS 4.0", "document", "DIV"); if (divArray[document.theForm.le.selectedIndex-1]) {yydiv = escQ(divArray[document.theForm.le.selectedIndex-1])}else{yydiv=' '} // the layer to show/hide yystart = escape(document.theForm.start.value); yyend = escape(document.theForm.end.value); yybilder = escape(document.theForm.bilder.value); if (document.theForm.radiobutton[3].checked) {yyloop=3} else//loop if (document.theForm.radiobutton[0].checked) {yyloop=0} else // keep if (document.theForm.radiobutton[1].checked) {yyloop=1} else// show if (document.theForm.radiobutton[2].checked) {yyloop=2}// hide yyendleft = escape(document.theForm.endleft.value); yyendtop = escape(document.theForm.endtop.value); yyto = escape(document.theForm.to.value); yycnt = 0; // counter must be zero!!! yycol = escape(document.theForm.farbe.value); yyfont = escQ(yyReplace(document.theForm.font.value,'"','')); //alert(document.theForm.font.value+'\n'+yyfont); yywt = escQ(document.theForm.wt.value); myErr=""; myErr+=(yyendtop=="")?"End top; ":""; myErr+=(yyendleft=="")?"End left; ":""; myErr+=(yyleft=="")?"Start Left; ":""; myErr+=(yytop=="")?"Start Top; ":""; myErr+=(yybilder=="")?"Frames; ":""; myErr+=(yyto=="")?"Delay; ":""; myErr+=(yystart=="")?"Startsize; ":""; myErr+=(yycol=="")?"Color; ":""; myErr+=(yyfont=="")?"Text Font; ":""; myErr+=(yytxt=="")?"Text; ":""; myErr+=(yywt=="Weight")?"; ":""; myErr+=(yyend=="")?"Endsize; ":""; myErr= (myErr=="")?"":"The following field(s) must be filled: "+myErr; if (!myErr) return "YY_Zoomtext("+yyleft+","+yytop+",\'"+yytxt+"\',\'"+yydiv+"\',"+ yystart+","+yyend+","+yybilder+","+yyloop+","+yyendleft+","+yyendtop+","+yyto+","+yycnt+",\'"+yycol+"\',\'"+yyfont+"\',\'"+yywt+"\',\'"+"YY_Zoomtext1"+"\')"; else return myErr; } //Passed the function call above, takes prior arguments and reloads the UI. function inspectBehavior(msgStr){ var argArray = getTokens(msgStr,"()',"); //yyleft,yytop,yytxt,yydiv,yystart,yyend,yybilder,yyloop,yyendleft,yyendtop,yyto,yycnt,yycol,yyfont,yywt; document.theForm.left.value = argArray[1]; document.theForm.top.value = argArray[2]; yytxt = unescQ(argArray[3]); document.theForm.txt.value = yytxt; document.theForm.start.value = argArray[5]; document.theForm.end.value = argArray[6]; document.theForm.bilder.value = argArray[7]; if (argArray[8]=="true"){document.theForm.radiobutton[3].checked=true} else if (argArray[8]=="false"){document.theForm.radiobutton[0].checked=true} else{document.theForm.radiobutton[argArray[8]].checked=true} // 0=keep; 1=show; 2=hide; 3=loop; document.theForm.endleft.value = argArray[9]; document.theForm.endtop.value = argArray[10]; document.theForm.to.value = argArray[11]; document.theForm.farbe.value = argArray[13]; document.theForm.font.value = unescQ(argArray[14]); if (argArray[15].indexOf('YY_Zoomtext')==-1) {document.theForm.wt.value = unescQ(argArray[15])}else {document.theForm.wt.value = 'normal'} divArray = getObjectRefs("NS 4.0", "document", "DIV"); for (j=0;j