/****** eureca.js ******/
/*
* Common JavaScript library for Eureca
*
*
* $Id: eureca.js,v 1.9 2008-01-07 01:05:26 cvscore Exp $
*/
/*
* findPosY : return the y position on the screen of the provided object.
*
* from http://quirksmode.org
*/
function findPosY ( obj )
{
var curtop = 0;
if (obj.offsetParent)
{
while (obj.offsetParent)
{
curtop += obj.offsetTop
obj = obj.offsetParent;
}
}
else if (obj.y)
curtop += obj.y;
return curtop;
}
/**
* Change the UTF-8 Html entities into UTF-8-hex html entities
* eg. é => 쎩
* This should only be done on javascript interpreted text !
*/
function encode_utf_entities( str )
{
var a_entities = [
{ dec : "'", hex : "\x27" }, //'
{ dec : "à", hex : "\xE0" }, //à
{ dec : "â", hex : "\xE2" }, //â
{ dec : "ä", hex : "\xE4" }, //ä
{ dec : "ç", hex : "\xE7" }, //ç
{ dec : "è", hex : "\xE8" }, //è
{ dec : "é", hex : "\xE9" }, //é
{ dec : "ê", hex : "\xEA" }, //ê
{ dec : "ë", hex : "\xEB" }, //ë
{ dec : "î", hex : "\xEE" }, //î
{ dec : "ï", hex : "\xEF" }, //ï
{ dec : "ô", hex : "\xF4" }, //ô
{ dec : "ö", hex : "\xF6" }, //ö
{ dec : "ù", hex : "\xF9" }, //ù
{ dec : "û", hex : "\xFB" }, //û
{ dec : "ü", hex : "\xFC" } //ü
];
for ( var i=0; i < a_entities.length; i++ ) {
while (str.indexOf( a_entities[i].dec )>=0)
str = str.replace( a_entities[i].dec, a_entities[i].hex );
}
return str;
}
/**
* onchange_browse_panel_offset_path : called in browse panel macro
* to set properly br-offset-path param
* with user input.
*
*/
function onchange_browse_panel_offset_path ( form_id )
{
var oform = document.forms[form_id];
if ( oform )
{
var user_offset = oform.elements["br-offset"].value;
var max_offset = oform.elements["br-offset-max"].value;
if ( (typeof user_offset == "undefined") ||
(user_offset == "") || !user_offset)
user_offset = 1;
if ( user_offset - 1 > max_offset )
user_offset = max_offset;
/* decrement offset to reflect real value */
if ( user_offset )
user_offset--;
/* fetch br-offset-path */
var offset_path = oform.elements["br-offset-path"].value;
offset_path = offset_path.replace(/:$/, '');
var a_offset_path = offset_path.split(":");
a_offset_path[a_offset_path.length - 1] = user_offset;
var offset_path_n = '';
for ( var i = 0; i < a_offset_path.length; i++ )
offset_path_n += a_offset_path[i]+':';
oform.elements["br-offset-path"].value = offset_path_n;
}
}
/**
* onchange_browse_panel_browseidx : called in browse panel macro, for simple
* browses to increment index counter.
*
*/
function onchange_browse_panel_browseidx ( form_id )
{
var oform = document.forms[ form_id ];
if ( oform )
{
var idx = parseInt(oform.elements["editor-browseidx"].value);
var max = parseInt(oform.elements["editor-browseidxmax"].value);
var next = idx;
if ( next + 1 > max )
next = max;
oform.elements["editor-browseidx"].value = next;
}
}
/**
* EUreca
*/
var _EUreca = Class.create();
_EUreca.prototype = {
_a_slpublisher : $A([
{ slpublisher_id : 1, slpublisher_key : 'google' }
,{ slpublisher_id : 2, slpublisher_key : 'overture' }
,{ slpublisher_id : 3, slpublisher_key : 'espotting' }
,{ slpublisher_id : 4, slpublisher_key : 'mirago' }
,{ slpublisher_id : 5, slpublisher_key : 'wanadoo' }
,{ slpublisher_id : 6, slpublisher_key : 'msn' }
,{ slpublisher_id : 7, slpublisher_key : 'daooda' }
,{ slpublisher_id : 8, slpublisher_key : 'himedia' }
]),
_a_entities : $A([
{ dec : "'", hex : "\x27" }, //'
{ dec : "à", hex : "\xE0" }, //à
{ dec : "â", hex : "\xE2" }, //â
{ dec : "ä", hex : "\xE4" }, //ä
{ dec : "ç", hex : "\xE7" }, //ç
{ dec : "è", hex : "\xE8" }, //è
{ dec : "é", hex : "\xE9" }, //é
{ dec : "ê", hex : "\xEA" }, //ê
{ dec : "ë", hex : "\xEB" }, //ë
{ dec : "î", hex : "\xEE" }, //î
{ dec : "ï", hex : "\xEF" }, //ï
{ dec : "ô", hex : "\xF4" }, //ô
{ dec : "ö", hex : "\xF6" }, //ö
{ dec : "ù", hex : "\xF9" }, //ù
{ dec : "û", hex : "\xFB" }, //û
{ dec : "ü", hex : "\xFC" } //ü
]),
_h_media_by_key : $H({
mailing : 2,
advertising : 3,
affiliation : 4,
sponsoredlink : 5,
partner : 6,
trustedfeed : 7
}),
initialize : Prototype.emptyFunction
/**
* getSLPublisher : return list of slpublishers.
*/
,getSLPublisher : function () {
return this._a_slpublisher;
}
/**
* getMediaIdByKey : return the media-id for a given media-key
*/
,getMediaIdByKey : function ( key ) {
var id = this._h_media_by_key.get(key);
return ( id ) ? id : 0;
}
/**
* getElementTextNS : implement a cross-browser method for fetching content
* of a 'content:encoded' type node
*
*/
,getElementTextNS : function ( prefix, local, parentElem, index ) {
var result = "";
if (prefix && Prototype.Browser.IE) {
/* IE/Windows way of handling namespaces */
result = parentElem.getElementsByTagName(prefix + ":" + local)[index];
} else {
/** the namespace versions of this method (getElementsByTagNameNS()) operate
* differently in Safari and Mozilla, but both return value with just local
* name, provided there aren't conflicts with non-namespace element names */
result = parentElem.getElementsByTagName(local)[index];
}
if (result) {
// get text, accounting for possible
// whitespace (carriage return) text nodes
if (result.childNodes.length > 1) {
return result.childNodes[1].nodeValue;
} else {
return result.firstChild.nodeValue;
}
} else {
return "n/a";
}
}
/* unicode_to_utf8 */
,unicode_to_utf8 : function ( s ) {
var utf8 = "";
for (var n = 0; n < s.length; n++) {
var c = s.charCodeAt(n);
if (c <= 0x7F) {
// 0x00 - 0x7F: Emit as single byte, unchanged
utf8 += String.fromCharCode(c);
} else if ((c >= 0x80) && (c <= 0x7FF)) {
// 0x80 - 0x7FF: Output as two byte code, 0xC0 in first byte
// 0x80 in second byte
utf8 += String.fromCharCode((c >> 6) | 0xC0);
utf8 += String.fromCharCode((c & 0x3F) | 0x80);
} else {
// 0x800 - 0xFFFF: Output as three bytes, 0xE0 in first byte
// 0x80 in second byte
// 0x80 in third byte
utf8 += String.fromCharCode((c >> 12) | 0xE0);
utf8 += String.fromCharCode(((c >> 6) & 0x3F) | 0x80);
utf8 += String.fromCharCode((c & 0x3F) | 0x80);
}
}
return utf8;
}
/* UTF8_TO_UNICODE --
Decode UTF-8 argument into Unicode string return value
*/
,utf8_to_unicode : function ( utf8 ) {
var s = "", i = 0, b1, b2, b2;
if (! utf8) return utf8;
while (i < utf8.length) {
b1 = utf8.charCodeAt(i);
if (b1 < 0x80) { // One byte code: 0x00 0x7F
s += String.fromCharCode(b1);
i++;
} else if((b1 >= 0xC0) && (b1 < 0xE0)) { // Two byte code: 0x80 - 0x7FF
b2 = utf8.charCodeAt(i + 1);
s += String.fromCharCode(((b1 & 0x1F) << 6) | (b2 & 0x3F));
i += 2;
} else { // Three byte code: 0x800 - 0xFFFF
b2 = utf8.charCodeAt(i + 1);
b3 = utf8.charCodeAt(i + 2);
s += String.fromCharCode(((b1 & 0xF) << 12) |
((b2 & 0x3F) << 6) |
(b3 & 0x3F));
i += 3;
}
}
return s;
}
/* ENCODE_UTF8 -- Encode string as UTF8 only if it contains
a character of 0x9D (Unicode OPERATING
SYSTEM COMMAND) or a character greater
than 0xFF. This permits all strings
consisting exclusively of 8 bit
graphic characters to be encoded as
themselves. We choose 0x9D as the sentinel
character as opposed to one of the more
logical PRIVATE USE characters because 0x9D
is not overloaded by the regrettable
"Windows-1252" character set. Now such characters
don't belong in JavaScript strings, but you never
know what somebody is going to paste into a
text box, so this choice keeps Windows-encoded
strings from bloating to UTF-8 encoding. */
,encode_utf8 : function ( s ) {
var i, necessary = false;
for (i = 0; i < s.length; i++) {
if ((s.charCodeAt(i) == 0x9D) ||
(s.charCodeAt(i) > 0xFF)) {
necessary = true;
break;
}
}
if (!necessary) {
return s;
}
return String.fromCharCode(0x9D) + this.unicode_to_utf8(s);
}
/* DECODE_UTF8 -- Decode a string encoded with encode_utf8
above. If the string begins with the
sentinel character 0x9D (OPERATING
SYSTEM COMMAND), then we decode the
balance as a UTF-8 stream. Otherwise,
the string is output unchanged, as
it's guaranteed to contain only 8 bit
characters excluding 0x9D. */
,decode_utf8 : function ( s ) {
if ((s.length > 0) && (s.charCodeAt(0) == 0x9D)) {
return this.utf8_to_unicode(s.substring(1));
}
return s;
}
/**
* empty a dom of child
*/
,removeChild : function ( o ) {
try {
if ( o )
while ( o.hasChildNodes() )
o.removeChild(o.childNodes[0]);
} catch ( e ) {}
}
/**
* epoch2calendar : from an epoch date return a date string
*/
,epoch2calendar : function ( epoch, lang ) {
var d = new Date();
if ( typeof(epoch) == 'undefined' )
epoch= (d.getTime()-d.getMilliseconds())/1000;
d.setTime( epoch * 1000 );
if ( typeof(lang) == 'undefined' )
lang = 'fr';
var a_d = [];
if ( lang == 'en' )
a_d = [ (d.getMonth()+1).toPaddedString(2), d.getDate().toPaddedString(2) ];
else
a_d = [ d.getDate().toPaddedString(2), (d.getMonth()+1).toPaddedString(2) ];
a_d.push( d.getFullYear() );
return a_d.join('/');
}
/**
* formatChunked : given a number, generate chunks.
*/
,formatChunked : function ( str ) {
var _str = String(str);
var _rgxp = /^(.*\s)?(\d+)(\d{3}\b)/;
return ( _str == ( _str = _str.replace(_rgxp, "$1$2 $3")) ) ?
_str : this.formatChunked(_str);
}
/**
* formatFloat : format a float int.
*/
,formatFloat : function ( num, dec ) {
if ( typeof num == 'undefined' )
num = 0;
if ( typeof dec == 'undefined' )
dec = 2;
var onum = new Number(num);
return onum.toFixed(dec);
}
/**
* formatPct : format a percentage value.
*/
,formatPct : function ( num ) {
if ( typeof(num) == 'undefined' )
num = 0;
return this.formatFloat(Number(num * 100));
}
/**
* roundFloat : round a float number.
*/
,roundFloat : function ( val ) {
var i = parseFloat(val);
if (isNaN(i)) { i = 0.00; }
var minus = '';
if (i < 0) { minus = '-'; }
i = Math.abs(i);
i = parseInt((i + .005) * 100);
i = i / 100;
var s = new String(i);
if(s.indexOf('.') < 0) { s += '.00'; }
if(s.indexOf('.') == (s.length - 2)) { s += '0'; }
s = minus + s;
return s;
}
/**
* generateRandomStr : generate a random string, to bypass browser caching.
*
*/
,generateRandomStr : function () {
var e_rn = '001234567890';
var e_rns1 = '1234567890'; var e_rns2 = '0987654321';
e_rn = new String (Math.random()); e_rns1 = e_rn.substring(2, 11);
e_rn = new String (Math.random()); e_rns2 = e_rn.substring(2, 11);
return e_rns1+e_rns2;
}
/**
* redirect : redirect a url
*/
,redirect : function ( url, a_p ) {
if ( window && window.location && url ) {
url = url.replace(/_rnd=\d+/, '').replace(/\?\&/, '');
var p = ( a_p ) ? '&'+$A(a_p).join('&') : '';
window.location.href = ( p ) ? ( ( /\?/.url ) ? url+p : url+'?'+p ) : url;
}
}
/**
* getCurrentUrl : return the current url without hostname.
*/
,getCurrentUrl : function () {
return window.location.href.replace(/^http(|s):\/\/(.+?)\//, '/');
}
/**
* getCurrentUrlBase : return the current base url without params.
*/
,getCurrentUrlBase : function () {
return this.getCurrentUrl().replace(/\?.*?$/, '');
}
/**
* validateUrl
*/
,validateUrl : function ( url ) {
return /^(http|https):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)+)?.*/.test(url);
}
/**
* validateFloat
*/
,validateFloat : function ( num ) {
var val = Number(parseFloat(num.replace(/,/, '.') || 0));
return ( /^\d+(|\.\d+)$/.test(val) ) ? val : 0;
}
/**
* exceptionDebug : debug output for an exception error.
*/
,exceptionDebug : function ( e, str ) {
var message = e.name+':\n'+e.message+'\n'+
(e.fileName && e.lineNumber ? e.fileName+' (line '+e.lineNumber+')\n\n':'')+
(e.description ? 'Description: '+e.description+'\n':'')+
(e.stack ? 'Stack trace: '+e.stack+'\n':'')+
(e.Number ? 'Number: '+e.Number+'\n':'')+
(e['opera#sourceloc'] ? 'Location: '+e['opera#sourceloc']+'\n':'');
this.log('Exception : '+str+' >> '+message);
}
/**
* log : log messsage to console if possible.
*/
,log : function ( message ) {/*
if ( !Prototype.Browser.IE && (typeof(console) != 'undefined') )
console.log(message);
else
alert(message);*/
}
/**
* whiteSpace
*/
,whiteSpace : function ( num ) {
var span = document.createElement('span');
span.innerHTML= ' '.times(num);
return span;
}
/**
* borderError : set the border of element to error styling.
*/
,borderError : function ( element ) {
if ( $(element) )
$(element).setStyle({ border : '1px solid red' });
}
/**
* borderOK : set the border of element to ok styling.
*/
,borderOK : function ( element ) {
if ( $(element) )
$(element).setStyle({ border : '1px solid #9b9a99' });
}
/**
* newOption : create a new
*/
,newOption : function ( h_p ) {
var opt = $(document.createElement('option'));
opt.setAttribute('value', h_p['value'] || '' );
opt.appendChild( document.createTextNode( h_p['text'] || '--' ) );
return opt;
}
/**
* appendBR : append tag to provided object.
*/
,appendBR : function ( o ) {
$(o).appendChild( document.createElement('br') );
}
/**
* encode_utf_entities
*/
,encode_utf_entities : function ( str ) {
this._a_entities.each( function ( entity ) {
while (str.indexOf( entity.dec ) >= 0 )
str = str.replace( entity.dec, entity.hex );
});
return str;
}
/**
* hideDateSelector : if we have datepickers || refperiod opened, hide them.
*/
,hideDateSelector : function () {
[ 'datepicker_tr_from', 'datepicker_tr_to', 'refperiod_tr_refperiod' ].each(
function ( item ) {
var o = eval(item);
if ( o && o.visible() )
o.close();
});
}
/**
* xmlParser : return an xmlparser object.
*/
,xmlParser : function ( xml ) {
var doc = null;
if ( window.ActiveXObject ) {
doc = new ActiveXObject("Microsoft.XMLDOM");
doc.async = 'false';
doc.loadXML(xml);
} else {
var parser = new DOMParser();
doc = parser.parseFromString(xml, 'text/xml');
}
return doc.documentElement;
}
,decode : function ( utf8 ) {
var str = "";
var i = 0;
var c = c1 = c2 = 0;
while ( i < utf8.length ) {
c = utf8.charCodeAt(i);
if (c < 128) {
str += String.fromCharCode(c);
i++;
}
else if((c > 191) && (c < 224)) {
c2 = utf8.charCodeAt(i+1);
str += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
i += 2;
}
else {
c2 = utf8.charCodeAt(i+1);
c3 = utf8.charCodeAt(i+2);
str += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
i += 3;
}
}
return str;
}
,encode : function ( str ) {
str = str.replace(/\r\n/g,"\n");
var utftext = "";
for (var n = 0; n < str.length; n++) {
var c = str.charCodeAt(n);
if (c < 128) {
utftext += String.fromCharCode(c);
} else if((c > 127) && (c < 2048)) {
utftext += String.fromCharCode((c >> 6) | 192);
utftext += String.fromCharCode((c & 63) | 128);
} else {
utftext += String.fromCharCode((c >> 12) | 224);
utftext += String.fromCharCode(((c >> 6) & 63) | 128);
utftext += String.fromCharCode((c & 63) | 128);
}
}
return utftext;
}
};
/* init global object */
var EUreca = new _EUreca();
/****** $_ ******/
/****** cookie.js ******/
/**
* Copyright (C) 2002-2003, CodeHouse.com. All rights reserved.
* CodeHouse(TM) is a registered trademark.
*
* THIS SOURCE CODE MAY BE USED FREELY PROVIDED THAT
* IT IS NOT MODIFIED OR DISTRIBUTED, AND IT IS USED
* ON A PUBLICLY ACCESSIBLE INTERNET WEB SITE.
*
* CodeHouse.com JavaScript Library Module: Cookie Utility Class
*
* You can obtain this script at http://www.codehouse.com
*
* Adapted to use Prototype-style Class creation :
* Mathieu Jondet , Eulerian Technologies
*
* $Id: cookie.js,v 1.2 2007-10-15 00:50:57 cvscore Exp $
*
*/
var Cookie = Class.create();
Cookie.prototype = {
_name : null,
_expires : null,
_path : null,
_domain : null,
_secure : 0,
_ck_str : null,
initialize : function ( name, duration, path, domain, secure ) {
this._name = name;
if ( typeof duration != "undefined" )
this._expires = this._duration( duration );
this._path = ( path ) ? path : '/';
this._domain = ( domain ) ? domain : document.domain;
this._secure = secure;
var a_cookie = [ "" ];
if ( this._expires )
a_cookie.push( 'expires='+this._expires );
if ( this._path )
a_cookie.push( 'path='+this._path );
if ( this._domain )
a_cookie.push( 'domain='+this._domain );
if ( this._secure )
a_cookie.push( 'secure='+this._secure );
this._ck_str = a_cookie.join(';');
},
_duration : function ( duration ) {
var d = new Date();
var n = new Date().getTime();
d.setTime( n + (1000 * 60 * duration));
return d.toGMTString();
},
expire : function () {
var d = new Date();
d.setFullYear(d.getYear() - 1);
document.cookie= this._name + "=noop; expires=" + d.toGMTString();
},
/* set : set key=value to cookie */
set : function ( k, v ) {
var ck = this.fetch();
// Mac IE doesn't support encodeURI
if ( /[;, ]/.test(v) )
value = window.encodeURI ? encodeURI(v) : escape(v);
var dc_ck = null;
if ( v )
{
var attrPair = "@" + k + v;
if ( ck )
if ( new RegExp("@" + k).test(ck) )
dc_ck = ck.replace(
new RegExp("@" + k + "[^@;]*"), attrPair
) + this._ck_str;
else
dc_ck = ck.replace(
new RegExp("(" + this._name + "=[^;]*)(;|$)"), "$1" + attrPair
) + this._ck_str;
else
dc_ck = this._name + "=" + attrPair + this._ck_str;
}
else
if ( new RegExp("@" + k).test(ck) )
dc_ck = ck.replace(new RegExp("@" + k + "[^@;]*"), "") + this._ck_str;
document.cookie = dc_ck;
},
/* get : return value for a key */
get : function ( k ) {
var ck = this.fetch();
if ( ck )
{
var m = ck.match(new RegExp("@" + k + "([^@;]*)"));
if ( m )
{
var value = m[1];
// Mac IE doesn't support decodeURI
if ( value )
return window.decodeURI ? decodeURI(value) : unescape(value);
}
}
return null;
},
/* exists : return boolean on cookie existence */
exists : function () {
return this.fetch() ? true : false;
},
/* fetch : return cookie */
fetch : function () {
var m = document.cookie.match(new RegExp("(" + this._name + "=[^;]*)(;|$)"));
return m ? m[1] : null;
}
}
/* Load it */
var ecookie = new Cookie('ejscookie');
/****** $_ ******/
/****** login.js ******/
/**
* Login class managing login page with information
*
* $Id: login.js,v 1.3 2007-12-05 02:58:23 cvscore Exp $
*
*/
var Login = Class.create();
Login.prototype = {
/* global vars */
_a_feed : $A(),
_i_feed_cur_item : 0,
_i_feed_fade : 0,
_i_feed_title_sz : 30,
_feed_container : 'js-feed-reader-content',
_id_formlogin : 'formlogin',
_id_authlogin : 'auth-login',
_id_spreadfirefox : 'spreadfirefox',
/* initialize : called by Prototype on Class creation */
initialize : function () {
document.observe('dom:loaded',
this.load.bindAsEventListener(this), false);
},
load : function () {
if ( $(this._id_formlogin) ) {
/* set the js cookie */
ecookie.set('login', 1);
Event.observe($('feed-prev'), 'click',
this.feed_prev.bindAsEventListener(this), false);
Event.observe($('feed-next'), 'click',
this.feed_next.bindAsEventListener(this), false);
/* focus on user login */
$(this._id_authlogin).focus();
/* launch feed UI */
this._start_feed_reader();
/* diplay spreadfirefox message if is IE */
if ( Prototype.Browser.IE )
$(this._id_spreadfirefox).show();
}
},
_buildDiv : function ( message ) {
var div = document.createElement('div');
Element.extend(div);
div.setStyle({ 'text-align' : 'center' });
div.innerHTML = Lang.lget(message);
return div;
},
/* _start_feed_reader : load feed content */
_start_feed_reader : function () {
var ologin = this;
var _self = this;
var jx = new Ajax.Request('/proxy?u=eureca-blog',
{
method : 'get',
onLoading : function ( req ) {
EUreca.removeChild($(ologin._feed_container));
$(ologin._feed_container).appendChild(
_self._buildDiv('generic_ajax_loading'));
},
onError : function ( req ) {
EUreca.removeChild($(ologin._feed_container));
$(ologin._feed_container).appendChild(
_self._buildDiv('generic_ajax_error'));
},
onTimeout : function ( req ) {
EUreca.removeChild($(ologin._feed_container));
$(ologin._feed_container).appendChild(
_self._buildDiv('generic_ajax_timeout'));
},
onSuccess : function ( req ) {
try {
/* populate the feed array with the data */
var xmldoc = req.responseXML;
if ( xmldoc ) {
EUreca.removeChild($(ologin._feed_container));
var a_item = $A(xmldoc.getElementsByTagName("item"));
a_item.each( function ( item ) {
ologin._a_feed.push({
'title' : encode_utf_entities(item.getElementsByTagName("title")[0].firstChild.nodeValue),
'link' : item.getElementsByTagName("link")[0].firstChild.nodeValue,
'date' : item.getElementsByTagName("date")[0].firstChild.nodeValue,
'description' : String(encode_utf_entities(EUreca.getElementTextNS('content', 'encoded', item, 0).replace('"', ''))).stripTags()
});
});
/* start : the feed cycle */
ologin.feed_next();
if ( ologin._a_feed.length > 1 )
setInterval("myLogin.feed_next();", 5000);
} else {
this.onError();
}
} catch ( e ) {
this.onError();
}
}
});
},
/* feed_prev : display previous feed item */
feed_prev : function () {
try {
if ( this._i_feed_cur_item == 0 )
this._i_feed_cur_item = this._a_feed.length - 1;
else
this._i_feed_cur_item--;
this.feed_set();
} catch ( e ) {}
},
/* feed_next : display next feed item */
feed_next : function () {
try {
if ( this._i_feed_cur_item == (this._a_feed.length - 1) )
this._i_feed_cur_item = 0;
else
this._i_feed_cur_item++;
this.feed_set();
} catch ( e ) {}
},
/* feed_set : display a feed with effects */
feed_set : function () {
try {
var id = 'js-feed-'+this._i_feed_cur_item;
var h_feed = this._a_feed[this._i_feed_cur_item];
var title = h_feed["title"];
if ( title.length > this._i_feed_title_sz )
title = title.substr(0, this._i_feed_title_sz)+"...";
var html = '';
$(this._feed_container).update(html);
new Effect.Appear($(id), { duration : 0.8 });
} catch ( e ) {}
}
};
/**
* Instanciate myLogin object to make available, set the observer onload
*
*/
var myLogin = new Login();
/****** $_ ******/