/****************************************************************************** This page provides formatting information for vserver.js and data.js Required with display.js & data.js ******************************************************************************/ /* debugmessage alert('Start voddata.def'); */ /****************************************************************************** Declare default global system variables ******************************************************************************/ baseUrl = 'vodashow.htm'; searchField = '2'; // iDisplay field indexField = '1'; // sort field by docText = ''; docFooter = ''; docCss = cssRoot+'wss.css'; docPrint = (printPrompt()); docRoot = ''; helpmenu = 0; pgLngth = new Array('tdx',25,'mdx',20,'pdx',40); breaks = new Array('0','1','2'); folders = new Array('nc'); hilite = '"style background-color:'+hColor+'"'; pics = new Array('pic','pic2','jpg|gif|jpeg|JPG|GIF|JPEG'); pdfs = new Array('pdf','pdf2','pdf|PDF'); docs = new Array('doc','doc2','doc|DOC|txt|TXT'); htms = new Array('ndoc','ndoc2','htm|HTM|html|HTML|shtml'); wwws = new Array('www','www2','www|WWW'); icons = new Array(); icons['spc'] = new Array('spc2','nl'); icons['node0'] = new Array('nc0','no0'); icons['node1'] = new Array('nc1','no1'); icons['node2'] = new Array('nc1','no1'); icons['folder'] = new Array('nfc','nfo'); /****************************************************************************** Preload images ******************************************************************************/ pic = new Image(); pic.src = imgRoot+'pic.gif'; pic2 = new Image(); pic2.src = imgRoot+'pic2.gif'; ndoc = new Image(); ndoc.src = imgRoot+'ndoc.gif'; ndoc2 = new Image(); ndoc2.src= imgRoot+'ndoc2.gif'; www = new Image(); www.src = imgRoot+'www.gif'; www2 = new Image(); www2.src = imgRoot+'www2.gif'; spc2 = new Image(); spc2.src = imgRoot+'spacer.gif'; nl = new Image(); nl.src = imgRoot+'nl.gif'; nfc = new Image(); nfc.src = imgRoot+'nfc.gif'; nfo = new Image(); nfo.src = imgRoot+'nfo.gif'; no0 = new Image(); no0.src = imgRoot+'no0.gif'; no1 = new Image(); no1.src = imgRoot+'no1.gif'; no2 = new Image(); no2.src = imgRoot+'no2.gif'; nc0 = new Image(); nc0.src = imgRoot+'nc0.gif'; nc1 = new Image(); nc1.src = imgRoot+'nc1.gif'; nc2 = new Image(); nc2.src = imgRoot+'nc2.gif'; nd1 = new Image(); nd1.src = imgRoot+'nd1.gif'; nd2 = new Image(); nd2.src = imgRoot+'nd2.gif'; //proprietry logos pdf = new Image(); pdf.src = imgRoot+'pdf.gif'; pdf2 = new Image(); pdf2.src = imgRoot+'pdf2.gif'; doc = new Image(); doc.src = imgRoot+'doc.gif'; doc2 = new Image(); doc2.src = imgRoot+'doc2.gif'; function defineFields() { /****************************************************************************** Syntax: defineFields(recnum) Retrieve & format data values performed for each record in dataset Fields: chp,$name,uri,$publ,$author,date,size,descr,descr2,thumbnail,icon ******************************************************************************/ $field = Array(''); $name = ' '; $uri = ''; $descr = ' '; $descr2 = ' '; $ext = ''; iconStr = ''; $ur = ' '; $img = ''; $thumb = ''; $imgsrc = new Image(); $imgsrc.src = spc2.src; dLink = ''; iLink = ''; sLink = ''; icons['doc'] = pics; //set default icon //confirm(self_url()+'/defineFields:'+ '\narguments[0] = '+ arguments[0] ); if(parseInt(arguments[0])>=0){ $field = dBase[arguments[0]].split('|'); $docAddr = $field[0].split('.')[0]; if($field[1]!=''){$name = $field[1]; docTitle = $field[1]} if($field[2]!=''){$uri = $field[2]; //$imgsrc.src = imgRoot+$uri+'.jpg'; //$img = $imgsrc.src; } if($field[3]!=''){$publ='$publ: '+$field[3]+' ';} if($field[4]!=''){$descr = dBase[arguments[0]].split('|')[4]+' ';} if($field[5]!=''){$descr2 = dBase[arguments[0]].split('|')[5]+' ';} if($field[9]!=''){$thumb='';} if($uri.length>0){ //get icons['doc'] from $uri $ext = getDoctype($uri); icons['fol0'] = icons['folder']; icons['fol1'] = icons['folder']; icons['fol2'] = icons['folder']; icons['doc0'] = icons['doc']; icons['doc1'] = icons['doc']; icons['doc2'] = icons['doc']; icons['doc3'] = icons['doc']; dLink = $uri+".htm"; sLink = "javascript:parent.imagePage('"+$uri+"');"; $uri.indexOf("?")<0?$ur=$uri:$ur=$uri.substring(0,$uri.indexOf("?")); if(arguments[1]!='idx'){dLink="javascript:parent.vPage('"+$uri+"');";} if($uri.indexOf(".")==-1){ $imgsrc.src = imgRoot+$uri+'.jpg'; $img = $imgsrc.src; } } if($ext.length>0){ $ext='Format: '+$ext+' '; $ur=$uri; } if($ext.length>0){ $ext='Format: '+$ext+' '; $ur=$uri; } } //confirm(self_url()+'/defineFields:'+ '\narguments[0] = '+ arguments[0]+ '\n$field[0] = '+ $field[0]+ '\n$img = '+ $img); } function definePage() { /****************************************************************************** Format Page headers & footers Syntax: defineHeader(target,calling_obj) Called only once at top of loop ******************************************************************************/ docInit = '\n\n'+docTitle+'\n\n\n'; docExit = '\n'; docHead = '\n'; docFoot = '
'; docInTable = ''; if(is.ns){ docInTable = '
';} last1 = 0;last2 = 0;last3 = 0; if (arguments[0].indexOf("main")!=-1){ docHead = docInTable + '\n'; if (arguments[1]!="idx"){docHead=docHead + ''} docHead = docHead+'\n
' + '\n' + 'Back to '+backUrl+'' + '
' + '

'+docTitle+'

\n
\n

'+navObj+'

\n
\n'; //docFoot=docFoot+docInTable+'
 
'; if (arguments[1]!="idx"){docFoot=docFoot+docInTable+'\n\n

'+ navObj + '

\n\n' +'
\n
' + '\n
\n

'+docText+'

' + '\n
' + '\n

Print-friendly Page

View printer-formatted page
' + '\n
';} } } function defineHeader() { /****************************************************************************** Format Page headers & footers Syntax: defineHeader(target,calling_obj) Called at top of each page loop ******************************************************************************/ prnHead = prnTable + '
' + '\n
' + ' 
' + '
' + '\n

'+ docTitle+'

' + '
' + '

'+(printPrompt())+'

' + '
\n
' + '\n'; prnFoot = '
' + '\n

'+ navObj + '

' + '\n
' + '\n

'+ navObj + '

' + '
' + '\n
' + '\n
' + ' 
' + '
' + '

'+ docText + '


' + '
' + '

'+(printPrompt())+'

' + '
' + '\n

'+prnTablend; } /******* end Function *********************************************/ /****************************************************************************** Format plain text output ******************************************************************************/ function textFormat(){ mTree(); //iconstr = ''; xx=$name;if($uri!=''){xx=''+$name+'';} return('' + ' '+iconstr+ xx + ''); } /****************************************************************************** Format medium text output ******************************************************************************/ function mtextFormat(){return textboxFormat();} /****************************************************************************** Format printed output ******************************************************************************/ function printFormat(){return textboxFormat();} /****************************************************************************** Format textbox ******************************************************************************/ function textboxFormat(){ mTree(); iconstr = ''; xx=$name;if($uri != ''){xx=''+$name+'';} return('' + '' + xx + $publ+' '+$ddate + ' '+$descr + ' '+$descr2 + ''); } /* debugmessage alert('End voddataf.js'); */