// JavaScript Document var TopTens = new Array(); TopTens[0] = new Array(); TopTens[0]['Title'] = '"First Cats" in the White House'; TopTens[0]['Desc'] = ''; TopTens[0]['Link'] = 'http://www.thedailycat.com/acecatfurniture/topten/catsplaywith/index.html'; function GetParams() { Params = new Array(); // get the script object that "included" this JavaScript file in the src attribute var Scripts = document.getElementsByTagName('script'); if( Scripts && Scripts.length > 0 ) { // the script object that "included" us is currently the last script object loaded // (any following script objects will be created after this code executes) var ThisScript = Scripts[Scripts.length-1]; var QueryString = ThisScript.src.replace(/^[^\?]+\??/,''); var KeyValuePairs = QueryString.split( '&' ); for( var i=0; i 0 ) { var key = KeyValuePairs[i].substring(0,pos); var val = KeyValuePairs[i].substring(pos+1); Params[key] = val; } } } return Params; } var Params = GetParams(); var TopTenFormat = Params['Format']; if( !TopTenFormat ){ TopTenFormat = 'Desc' } var TopTenCount = parseInt( Params['Count'] ); if( !TopTenCount ){ TopTenCount = 1 } var TopTenSponsor = Params['Sponsor']; if( !TopTenSponsor ){ TopTenSponsor = '1' } // display top tens document.writeln(''); if( TopTenFormat == 'Image' ) { document.writeln(''); for( var TopTenIndex = 0; TopTens[TopTenIndex] != null && TopTenIndex < TopTenCount; TopTenIndex++ ) { document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln('
'); document.writeln('

'); document.writeln('' + TopTens[TopTenIndex]['Title'] + ' -- ' + TopTens[TopTenIndex]['Desc'] + '

'); } if( TopTenSponsor != '0' ) { document.writeln('
'); } } else { document.writeln('
'); document.writeln('
    '); for( var TopTenIndex = 0; TopTens[TopTenIndex] != null && TopTenIndex < TopTenCount; TopTenIndex++ ) { document.writeln('
  • ' + TopTens[TopTenIndex]['Title'] + '' + ( TopTenFormat == 'Desc' ? ' -- ' + TopTens[TopTenIndex]['Desc'] : '' ) + '
  • '); } document.writeln('
'); document.writeln('
'); if( TopTenSponsor != '0' ) { document.writeln(''); document.writeln('
'); } }