, =
http://www.iceburg.net
* Licensed under the MIT License:
* http://www.opensource.org/licenses/mit-license.php
*=20
* $Version: 2007.02.25 +r9
*/
(function($) {
$.fn.jqm=3Dfunction(o){
var _o =3D {
zIndex: 3000,
overlay: 50,
overlayClass: 'jqmOverlay',
closeClass: 'jqmClose',
trigger: '.jqModal',
ajax: false,
target: false,
modal: false,
onShow: false,
onHide: false,
onLoad: false
};
return this.each(function(){if(this._jqm)return; s++; this._jqm=3Ds;
hash[s]=3D{c:$.extend(_o, o),a:false,w:$(this).addClass('jqmID'+s),s:s};
if(_o.trigger)$(this).jqmAddTrigger(_o.trigger);
});}
$.fn.jqmAddClose=3Dfunction(e){hs(this,e,'jqmHide'); return this;}
$.fn.jqmAddTrigger=3Dfunction(e){hs(this,e,'jqmShow'); return this;}
$.fn.jqmShow=3Dfunction(t){return =
this.each(function(){if(!hash[this._jqm].a)$.jqm.open(this._jqm,t)});}
$.fn.jqmHide=3Dfunction(t){return =
this.each(function(){if(hash[this._jqm].a)$.jqm.close(this._jqm,t)});}
$.jqm =3D {
open:function(s,t){var =
h=3Dhash[s],c=3Dh.c,cc=3D'.'+c.closeClass,z=3D(/^\d+$/.test(h.w.css('z-in=
dex')))?h.w.css('z-index'):c.zIndex,o=3D$('
').css({height:'100=
%',width:'100%',position:'fixed',left:0,top:0,'z-index':z-1,opacity:c.ove=
rlay/100});h.t=3Dt;h.a=3Dtrue;h.w.css('z-index',z);
if(c.modal) {if(ma.length =3D=3D =
0)mf('bind');ma.push(s);o.css('cursor','wait');}
else if(c.overlay > 0)h.w.jqmAddClose(o);
else o=3Dfalse;
h.o=3D(o)?o.addClass(c.overlayClass).appendTo('body'):false;
=
if(ie6){$('html,body').css('height','100%');if(o){o=3Do.css({position:'ab=
solute'})[0];for(var y in =
{Top:1,Left:1})o.style.setExpression(y.toLowerCase(),"(_=3D(document.docu=
mentElement.scroll"+y+" || document.body.scroll"+y+"))+'px'");}}
if(c.ajax) {var r=3Dc.target,u=3Dc.ajax;
r=3D(r)?(typeof r =3D=3D 'string')?$(r,h.w):$(r):h.w; =
u=3D(u.substr(0,1) =3D=3D '@')?$(t).attr(u.substring(1)):u;
=
r.load(u,function(){if(c.onLoad)c.onLoad.call(this,h);if(cc)h.w.jqmAddClo=
se($(cc,h.w));f(h);});}
else if(cc)h.w.jqmAddClose($(cc,h.w));
(c.onShow)?c.onShow(h):h.w.show();f(h);return false;
},
close:function(s){var h=3Dhash[s];h.a=3Dfalse;
if(ma.length !=3D 0){ma.pop();if(ma.length =3D=3D 0)mf('unbind');}
if(h.c.onHide)h.c.onHide(h);else{h.w.hide();if(h.o)h.o.remove();} =
return false;
}};
var s=3D0,hash=3D{},ma=3D[],ie6=3D$.browser.msie && typeof =
XMLHttpRequest =3D=3D 'function',
i=3D$('').css({opacity:0}),
f=3Dfunction(h){if(ie6)if(h.o)h.o.html('').prepend(i);else =
if($('iframe.jqm',h.w).length =3D=3D 0)h.w.prepend(i);
h.f=3D$(':input:visible',h.w)[0]||h.w[0];h.f.focus();},
mf=3Dfunction(t){$()[t]("keypress",m)[t]("keydown",m)[t]("mousedown",m);}=
,
m=3Dfunction(e) {var h=3Dhash[ma[ma.length-1]], =
r=3D(!$(e.target).parents('.jqmID'+h.s).length =3D=3D =
0);if(!r)h.f.focus();return r;},
hs=3Dfunction(w,e,y){var s=3D[];w.each(function(){s.push(this._jqm)});
=
$(e).each(function(){if(this[y])$.extend(this[y],s);else{this[y]=3Ds;$(th=
is).click(function(){for(var i in {jqmShow:1,jqmHide:1})for(var s in =
this[i])if(hash[this[i][s]])hash[this[i][s]].w[i](this);return =
false;});}});};
})(jQuery);
------=_NextPart_000_0000_01CA3183.25C0F580
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: http://paper.avui.cat/js/jqForm.js
/*
* jQuery form plugin
* @requires jQuery v1.0.3
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* Revision: $Id: jqForm.js,v 1.1 2007/04/16 12:04:04 jpenin Exp $
* Version: .95
*/
/**
* ajaxSubmit() provides a mechanism for submitting an HTML form using =
AJAX.
*
* ajaxSubmit accepts a single argument which can be either a success =
callback function
* or an options Object. If a function is provided it will be invoked =
upon successful
* completion of the submit and will be passed the response from the =
server.
* If an options Object is provided, the following attributes are =
supported:
*
* target: Identifies the element(s) in the page to be updated with =
the server response.
* This value may be specified as a jQuery selection string, =
a jQuery object,
* or a DOM element.
* default value: null
*
* url: URL to which the form data will be submitted.
* default value: value of form's 'action' attribute
*
* type: The method in which the form data should be submitted, =
'GET' or 'POST'.
* default value: value of form's 'method' attribute (or =
'GET' if none found)
*
* beforeSubmit: Callback method to be invoked before the form is =
submitted.
* default value: null
*
* success: Callback method to be invoked after the form has been =
successfully submitted
* and the response has been returned from the server
* default value: null
*
* dataType: Expected dataType of the response. One of: null, 'xml', =
'script', or 'json'
* default value: null
*
* semantic: Boolean flag indicating whether data must be submitted in =
semantic order (slower).
* default value: false
*
* resetForm: Boolean flag indicating whether the form should be reset =
if the submit is successful
*
* clearForm: Boolean flag indicating whether the form should be =
cleared if the submit is successful
*
*
* The 'beforeSubmit' callback can be provided as a hook for running =
pre-submit logic or for
* validating the form data. If the 'beforeSubmit' callback returns =
false then the form will
* not be submitted. The 'beforeSubmit' callback is invoked with three =
arguments: the form data
* in array format, the jQuery object, and the options object passed =
into ajaxSubmit.
* The form data array takes the following form:
*
* [ { name: 'username', value: 'jresig' }, { name: 'password', =
value: 'secret' } ]
*
* If a 'success' callback method is provided it is invoked after the =
response has been returned
* from the server. It is passed the responseText or responseXML value =
(depending on dataType).
* See jQuery.ajax for further details.
*
*
* The dataType option provides a means for specifying how the server =
response should be handled.
* This maps directly to the jQuery.httpData method. The following =
values are supported:
*
* 'xml': if dataType =3D=3D 'xml' the server response is =
treated as XML and the 'after'
* callback method, if specified, will be passed the =
responseXML value
* 'json': if dataType =3D=3D 'json' the server response will be =
evaluted and passed to
* the 'after' callback, if specified
* 'script': if dataType =3D=3D 'script' the server response is =
evaluated in the global context
*
*
* Note that it does not make sense to use both the 'target' and =
'dataType' options. If both
* are provided the target will be ignored.
*
* The semantic argument can be used to force form serialization in =
semantic order.
* This is normally true anyway, unless the form contains input elements =
of type=3D'image'.
* If your form must be submitted with name/value pairs in semantic =
order and your form
* contains an input of type=3D'image" then pass true for this arg, =
otherwise pass false
* (or nothing) to avoid the overhead for this logic.
*
*
* When used on its own, ajaxSubmit() is typically bound to a form's =
submit event like this:
*
* $("#form-id").submit(function() {
* $(this).ajaxSubmit(options);
* return false; // cancel conventional submit
* });
*
* When using ajaxForm(), however, this is done for you.
*
* @example
* $('#myForm').ajaxSubmit(function(data) {
* alert('Form submit succeeded! Server returned: ' + data);
* });
* @desc Submit form and alert server response
*
*
* @example
* var options =3D {
* target: '#myTargetDiv'
* };
* $('#myForm').ajaxSubmit(options);
* @desc Submit form and update page element with server response
*
*
* @example
* var options =3D {
* success: function(responseText) {
* alert(responseText);
* }
* };
* $('#myForm').ajaxSubmit(options);
* @desc Submit form and alert the server response
*
*
* @example
* var options =3D {
* beforeSubmit: function(formArray, jqForm) {
* if (formArray.length =3D=3D 0) {
* alert('Please enter data.');
* return false;
* }
* }
* };
* $('#myForm').ajaxSubmit(options);
* @desc Pre-submit validation which aborts the submit operation if form =
data is empty
*
*
* @example
* var options =3D {
* url: myJsonUrl.php,
* dataType: 'json',
* success: function(data) {
* // 'data' is an object representing the the evaluated json =
data
* }
* };
* $('#myForm').ajaxSubmit(options);
* @desc json data returned and evaluated
*
*
* @example
* var options =3D {
* url: myXmlUrl.php,
* dataType: 'xml',
* success: function(responseXML) {
* // responseXML is XML document object
* var data =3D $('myElement', responseXML).text();
* }
* };
* $('#myForm').ajaxSubmit(options);
* @desc XML data returned from server
*
*
* @example
* var options =3D {
* resetForm: true
* };
* $('#myForm').ajaxSubmit(options);
* @desc submit form and reset it if successful
*
* @example
* $('#myForm).submit(function() {
* $(this).ajaxSubmit();
* return false;
* });
* @desc Bind form's submit event to use ajaxSubmit
*
*
* @name ajaxSubmit
* @type jQuery
* @param options object literal containing options which control the =
form submission process
* @cat Plugins/Form
* @return jQuery
* @see formToArray
* @see ajaxForm
* @see $.ajax
* @author jQuery Community
*/
jQuery.fn.ajaxSubmit =3D function(options) {
if (typeof options =3D=3D 'function')
options =3D { success: options };
options =3D options || {};
options.url =3D options.url || this.attr('action') || =
window.location;
options.type =3D options.type || this.attr('method') || 'GET';
var a =3D this.formToArray(options.semantic);
// give pre-submit callback an opportunity to abort the submit
if (options.beforeSubmit && options.beforeSubmit(a, this, options) =
=3D=3D=3D false) return this;
// fire vetoable 'validate' event
var veto =3D {};
jQuery.event.trigger('form.submit.validate', [a, this, options, =
veto]);
if (veto.veto)
return this;
var q =3D jQuery.param(a);//.replace(/%20/g,'+');
if (options.type.toUpperCase() =3D=3D 'GET') {
options.url +=3D (options.url.indexOf('?') >=3D 0 ? '&' : '?') + =
q;
options.data =3D null; // data is null for 'get'
}
else
options.data =3D q; // data is the query string for 'post'
var $form =3D this, callbacks =3D [];
if (options.resetForm) callbacks.push(function() { =
$form.resetForm(); });
if (options.clearForm) callbacks.push(function() { =
$form.clearForm(); });
// perform a load on the target only if dataType is not provided
if (!options.dataType && options.target) {
var oldSuccess =3D options.success || function(){};
callbacks.push(function(data, status) {
jQuery(options.target).attr("innerHTML", =
data).evalScripts().each(oldSuccess, [data, status]);
});
}
else if (options.success)
callbacks.push(options.success);
options.success =3D function(data, status) {
for (var i=3D0, max=3Dcallbacks.length; i < max; i++)
callbacks[i](data, status);
};
// are there files to upload?
var files =3D jQuery('input:file', this).fieldValue();
var found =3D false;
for (var j=3D0; j < files.length; j++)
if (files[j])=20
found =3D true;
if (options.iframe || found) // options.iframe allows user to force =
iframe mode
fileUpload();
else
jQuery.ajax(options);
// fire 'notify' event
jQuery.event.trigger('form.submit.notify', [this, options]);
return this;
// private function for handling file uploads (hat tip to YAHOO!)
function fileUpload() {
var form =3D $form[0];
var opts =3D jQuery.extend({}, jQuery.ajaxSettings, options);
=20
var id =3D 'jqFormIO' + jQuery.fn.ajaxSubmit.counter++;
var $io =3D jQuery('');
var io =3D $io[0];
var op8 =3D jQuery.browser.opera && window.opera.version() < 9;
if (jQuery.browser.msie || op8) io.src =3D =
'javascript:false;document.write("");';
$io.css({ position: 'absolute', top: '-1000px', left: '-1000px' =
});
// make sure form attrs are set
form.method =3D 'POST';
form.encoding ? form.encoding =3D 'multipart/form-data' : =
form.enctype =3D 'multipart/form-data';
var xhr =3D { // mock object
responseText: null,
responseXML: null,
status: 0,
statusText: 'n/a',
getAllResponseHeaders: function() {},
getResponseHeader: function() {},
setRequestHeader: function() {}
};
=20
var g =3D opts.global;
// trigger ajax global events so that activity/block indicators =
work like normal
if (g && ! jQuery.active++) jQuery.event.trigger("ajaxStart");
if (g) jQuery.event.trigger("ajaxSend", [xhr, opts]);
=20
var cbInvoked =3D 0;
var timedOut =3D 0;
=20
// take a breath so that pending repaints get some cpu time =
before the upload starts
setTimeout(function() {
$io.appendTo('body');
// jQuery's event binding doesn't work for iframe events in =
IE
io.attachEvent ? io.attachEvent('onload', cb) : =
io.addEventListener('load', cb, false);
form.action =3D opts.url;
var t =3D form.target;
form.target =3D id;
// support timout
if (opts.timeout)
setTimeout(function() { timedOut =3D true; cb(); }, =
opts.timeout);
form.submit();
form.target =3D t; // reset
}, 10);
=20
function cb() {
if (cbInvoked++) return;
=20
io.detachEvent ? io.detachEvent('onload', cb) : =
io.removeEventListener('load', cb, false);
var ok =3D true;
try {
if (timedOut) throw 'timeout';
// extract the server response from the iframe
var data, doc;
doc =3D io.contentWindow ? io.contentWindow.document : =
io.contentDocument ? io.contentDocument : io.document;
xhr.responseText =3D doc.body ? doc.body.innerHTML : =
null;
xhr.responseXML =3D doc.XMLDocument ? doc.XMLDocument : =
doc;
=20
if (opts.dataType =3D=3D 'json' || opts.dataType =3D=3D =
'script') {
var ta =3D doc.getElementsByTagName('textarea')[0];
data =3D ta ? ta.value : xhr.responseText;
if (opts.dataType =3D=3D 'json')
eval("data =3D " + data);
else
jQuery.globalEval(data);
}
else if (opts.dataType =3D=3D 'xml') {
data =3D xhr.responseXML;
if (!data && xhr.responseText !=3D null)
data =3D toXml(xhr.responseText);
}
else {
data =3D xhr.responseText;
}
}
catch(e){
ok =3D false;
jQuery.handleError(opts, xhr, 'error', e);
}
// ordering of these callbacks/triggers is odd, but that's =
how $.ajax does it
if (ok) {
opts.success(data, 'success');
if (g) jQuery.event.trigger("ajaxSuccess", [xhr, opts]);
}
if (g) jQuery.event.trigger("ajaxComplete", [xhr, opts]);
if (g && ! --jQuery.active) =
jQuery.event.trigger("ajaxStop");
if (opts.complete) opts.complete(xhr, ok ? 'success' : =
'error');
// clean up
setTimeout(function() {=20
$io.remove();=20
xhr.responseXML =3D null;
}, 100);
};
=20
function toXml(s, doc) {
if (window.ActiveXObject) {
doc =3D new ActiveXObject('Microsoft.XMLDOM');
doc.async =3D 'false';
doc.loadXML(s);
}
else
doc =3D (new DOMParser()).parseFromString(s, =
'text/xml');
return (doc && doc.documentElement && =
doc.documentElement.tagName !=3D 'parsererror') ? doc : null;
}
};
};
jQuery.fn.ajaxSubmit.counter =3D 0; // used to create unique iframe ids
/**
* ajaxForm() provides a mechanism for fully automating form submission.
*
* The advantages of using this method instead of ajaxSubmit() are:
*
* 1: This method will include coordinates for =
elements (if the element
* is used to submit the form).
* 2. This method will include the submit element's name/value data (for =
the element that was
* used to submit the form).
* 3. This method binds the submit() method to the form for you.
*
* Note that for accurate x/y coordinates of image submit elements in =
all browsers
* you need to also use the "dimensions" plugin (this method will =
auto-detect its presence).
*
* The options argument for ajaxForm works exactly as it does for =
ajaxSubmit. ajaxForm merely
* passes the options argument along after properly binding events for =
submit elements and
* the form itself. See ajaxSubmit for a full description of the =
options argument.
*
*
* @example
* var options =3D {
* target: '#myTargetDiv'
* };
* $('#myForm').ajaxSForm(options);
* @desc Bind form's submit event so that 'myTargetDiv' is updated with =
the server response
* when the form is submitted.
*
*
* @example
* var options =3D {
* success: function(responseText) {
* alert(responseText);
* }
* };
* $('#myForm').ajaxSubmit(options);
* @desc Bind form's submit event so that server response is alerted =
after the form is submitted.
*
*
* @example
* var options =3D {
* beforeSubmit: function(formArray, jqForm) {
* if (formArray.length =3D=3D 0) {
* alert('Please enter data.');
* return false;
* }
* }
* };
* $('#myForm').ajaxSubmit(options);
* @desc Bind form's submit event so that pre-submit callback is invoked =
before the form
* is submitted.
*
*
* @name ajaxForm
* @param options object literal containing options which control the =
form submission process
* @return jQuery
* @cat Plugins/Form
* @type jQuery
* @see ajaxSubmit
* @author jQuery Community
*/
jQuery.fn.ajaxForm =3D function(options) {
return this.each(function() {
jQuery("input:submit,input:image,button:submit", =
this).click(function(ev) {
var $form =3D this.form;
$form.clk =3D this;
if (this.type =3D=3D 'image') {
if (ev.offsetX !=3D undefined) {
$form.clk_x =3D ev.offsetX;
$form.clk_y =3D ev.offsetY;
} else if (typeof jQuery.fn.offset =3D=3D 'function') { =
// try to use dimensions plugin
var offset =3D jQuery(this).offset();
$form.clk_x =3D ev.pageX - offset.left;
$form.clk_y =3D ev.pageY - offset.top;
} else {
$form.clk_x =3D ev.pageX - this.offsetLeft;
$form.clk_y =3D ev.pageY - this.offsetTop;
}
}
// clear form vars
setTimeout(function() {
$form.clk =3D $form.clk_x =3D $form.clk_y =3D null;
}, 10);
})
}).submit(function(e) {
jQuery(this).ajaxSubmit(options);
return false;
});
};
/**
* formToArray() gathers form element data into an array of objects that =
can
* be passed to any of the following ajax functions: $.get, $.post, or =
load.
* Each object in the array has both a 'name' and 'value' property. An =
example of
* an array for a simple login form might be:
*
* [ { name: 'username', value: 'jresig' }, { name: 'password', value: =
'secret' } ]
*
* It is this array that is passed to pre-submit callback functions =
provided to the
* ajaxSubmit() and ajaxForm() methods.
*
* The semantic argument can be used to force form serialization in =
semantic order.
* This is normally true anyway, unless the form contains input elements =
of type=3D'image'.
* If your form must be submitted with name/value pairs in semantic =
order and your form
* contains an input of type=3D'image" then pass true for this arg, =
otherwise pass false
* (or nothing) to avoid the overhead for this logic.
*
* @example var data =3D $("#myForm").formToArray();
* $.post( "myscript.cgi", data );
* @desc Collect all the data from a form and submit it to the server.
*
* @name formToArray
* @param semantic true if serialization must maintain strict semantic =
ordering of elements (slower)
* @type Array
* @cat Plugins/Form
* @see ajaxForm
* @see ajaxSubmit
* @author jQuery Community
*/
jQuery.fn.formToArray =3D function(semantic) {
var a =3D [];
if (this.length =3D=3D 0) return a;
var form =3D this[0];
var els =3D semantic ? form.getElementsByTagName('*') : =
form.elements;
if (!els) return a;
for(var i=3D0, max=3Dels.length; i < max; i++) {
var el =3D els[i];
var n =3D el.name;
if (!n) continue;
if (semantic && form.clk && el.type =3D=3D "image") {
// handle image inputs on the fly when semantic =3D=3D true
if(!el.disabled && form.clk =3D=3D el)
a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', =
value: form.clk_y});
continue;
}
var v =3D jQuery.fieldValue(el, true);
if (v =3D=3D=3D null) continue;
if (v.constructor =3D=3D Array) {
for(var j=3D0, jmax=3Dv.length; j < jmax; j++)
a.push({name: n, value: v[j]});
}
else
a.push({name: n, value: v});
}
if (!semantic && form.clk) {
// input type=3D=3D'image' are not found in elements array! =
handle them here
var inputs =3D form.getElementsByTagName("input");
for(var i=3D0, max=3Dinputs.length; i < max; i++) {
var input =3D inputs[i];
var n =3D input.name;
if(n && !input.disabled && input.type =3D=3D "image" && =
form.clk =3D=3D input)
a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', =
value: form.clk_y});
}
}
return a;
};
/**
* Serializes form data into a 'submittable' string. This method will =
return a string
* in the format: name1=3Dvalue1&name2=3Dvalue2
*
* The semantic argument can be used to force form serialization in =
semantic order.
* If your form must be submitted with name/value pairs in semantic =
order then pass
* true for this arg, otherwise pass false (or nothing) to avoid the =
overhead for
* this logic (which can be significant for very large forms).
*
* @example var data =3D $("#myForm").formSerialize();
* $.ajax('POST', "myscript.cgi", data);
* @desc Collect all the data from a form into a single string
*
* @name formSerialize
* @param semantic true if serialization must maintain strict semantic =
ordering of elements (slower)
* @type String
* @cat Plugins/Form
* @see formToArray
* @author jQuery Community
*/
jQuery.fn.formSerialize =3D function(semantic) {
//hand off to jQuery.param for proper encoding
return jQuery.param(this.formToArray(semantic));
};
/**
* Serializes all field elements in the jQuery object into a query =
string.
* This method will return a string in the format: =
name1=3Dvalue1&name2=3Dvalue2
*
* The successful argument controls whether or not serialization is =
limited to
* 'successful' controls (per =
http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
* The default value of the successful argument is true.
*
* @example var data =3D $("input").formSerialize();
* @desc Collect the data from all successful input elements into a =
query string
*
* @example var data =3D $(":radio").formSerialize();
* @desc Collect the data from all successful radio input elements into =
a query string
*
* @example var data =3D $("#myForm :checkbox").formSerialize();
* @desc Collect the data from all successful checkbox input elements in =
myForm into a query string
*
* @example var data =3D $("#myForm :checkbox").formSerialize(false);
* @desc Collect the data from all checkbox elements in myForm (even the =
unchecked ones) into a query string
*
* @example var data =3D $(":input").formSerialize();
* @desc Collect the data from all successful input, select, textarea =
and button elements into a query string
*
* @name fieldSerialize
* @param successful true if only successful controls should be =
serialized (default is true)
* @type String
* @cat Plugins/Form
*/
jQuery.fn.fieldSerialize =3D function(successful) {
var a =3D [];
this.each(function() {
var n =3D this.name;
if (!n) return;
var v =3D jQuery.fieldValue(this, successful);
if (v && v.constructor =3D=3D Array) {
for (var i=3D0,max=3Dv.length; i < max; i++)
a.push({name: n, value: v[i]});
}
else if (v !=3D=3D null && typeof v !=3D 'undefined')
a.push({name: this.name, value: v});
});
//hand off to jQuery.param for proper encoding
return jQuery.param(a);
};
/**
* Returns the value(s) of the first (successful) element(s) in the =
matched set in an array. If there are
* other elements in the matched set with the same name, the values of =
those elements is included
* in the result. For example, consider the following form:
*
*
*
* var v =3D $(':text').fieldValue();
* // if no values are entered into the text inputs
* v =3D=3D ['','']
* // if values entered into the text inputs are 'foo' and 'bar'
* v =3D=3D ['foo','bar']
*
* var v =3D $(':checkbox').fieldValue();
* // if neither checkbox is checked
* v =3D=3D=3D undefined
* // if both checkboxes are checked
* v =3D=3D ['B1', 'B2']
*
* var v =3D $(':radio').fieldValue();
* // if neither radio is checked
* v =3D=3D=3D undefined
* // if first radio is checked
* v =3D=3D ['C1']
*
* The successful argument controls whether or not the field element =
must be 'successful'
* (per =
http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
* The default value of the successful argument is true. If this value =
is false then
* the value of the first field element in the jQuery object is =
returned.
*
* Note: This method *always* returns an array. If no valid value can =
be determined the
* array will be empty, otherwise it will contain one or more =
values.
*
* @example var data =3D $("#myPasswordElement").fieldValue();
* alert(data[0]);
* @desc Alerts the current value of the myPasswordElement element
*
* @example var data =3D $("#myForm :input").fieldValue();
* @desc Get the value(s) of the first successful form element in myForm
*
* @example var data =3D $("#myForm :checkbox").fieldValue();
* @desc Get the value(s) for the first successful checkbox element(s) =
in the jQuery object.
*
* @example var data =3D $("#mySingleSelect").fieldValue();
* @desc Get the value(s) of the select control
*
* @example var data =3D $(':text').fieldValue();
* @desc Get the value(s) of the first successful text input or textarea
*
* @example var data =3D $("#myMultiSelect").fieldValue();
* @desc Get the values for the select-multiple control
*
* @name fieldValue
* @param Boolean successful true if value returned must be for a =
successful controls (default is true)
* @type Array
* @cat Plugins/Form
*/
jQuery.fn.fieldValue =3D function(successful) {
var val=3D[], name;
// loop until we find a value
for (var i=3D0, max=3Dthis.length; i < max; i++) {
var el =3D this[i];
var v =3D jQuery.fieldValue(el, successful);
if (v =3D=3D=3D null || typeof v =3D=3D 'undefined' || =
(v.constructor =3D=3D Array && !v.length))
continue; // keep looping until we find an element with a =
value
name =3D name || el.name;
if (name !=3D el.name) // once we have a value we only add to =
the array for elements with the same name
continue;
v.constructor =3D=3D Array ? jQuery.merge(val, v) : val.push(v);
}
return val;
};
/**
* Returns the value of the field element.
*
* The successful argument controls whether or not the field element =
must be 'successful'
* (per =
http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
* The default value of the successful argument is true. If the given =
element is not
* successful and the successful arg is not false then the returned =
value will be null.
*
* Note: If the successful flag is true (default) but the element is not =
successful, the return will be null
* Note: The value returned for a successful select-multiple element =
will always be an array.
* Note: If the element has no value the return value will be undefined.
*
* @example var data =3D jQuery.fieldValue($("#myPasswordElement")[0]);
* @desc Gets the current value of the myPasswordElement element
*
* @name fieldValue
* @param Element el The DOM element for which the value will be =
returned
* @param Boolean successful true if value returned must be for a =
successful controls (default is true)
* @type String or Array or null or undefined
* @cat Plugins/Form
*/
jQuery.fieldValue =3D function(el, successful) {
var n =3D el.name, t =3D el.type, tag =3D el.tagName.toLowerCase();
if (typeof successful =3D=3D 'undefined') successful =3D true;
if (successful && (!n || el.disabled || t =3D=3D 'reset' || t =3D=3D =
'button' ||
(t =3D=3D 'checkbox' || t =3D=3D 'radio') && !el.checked ||
(t =3D=3D 'submit' || t =3D=3D 'image') && el.form && =
el.form.clk !=3D el ||
tag =3D=3D 'select' && el.selectedIndex =3D=3D -1))
return null;
if (tag =3D=3D 'select') {
var index =3D el.selectedIndex;
if (index < 0) return null;
var a =3D [], ops =3D el.options;
var one =3D (t =3D=3D 'select-one');
var max =3D (one ? index+1 : ops.length);
for(var i=3D(one ? index : 0); i < max; i++) {
var op =3D ops[i];
if (op.selected) {
// extra pain for IE...
var v =3D jQuery.browser.msie && =
!(op.attributes['value'].specified) ? op.text : op.value;
if (one) return v;
a.push(v);
}
}
return a;
}
return el.value;
};
/**
* Clears the form data. Takes the following actions on the form's =
input fields:
* - input text fields will have their 'value' property set to the =
empty string
* - select elements will have their 'selectedIndex' property set to -1
* - checkbox and radio inputs will have their 'checked' property set =
to false
* - inputs of type submit, button, reset, and hidden will *not* be =
effected
* - button elements will *not* be effected
*
* @example $('form').clearForm();
* @desc Clears all forms on the page.
*
* @name clearForm
* @type jQuery
* @cat Plugins/Form
* @see resetForm
*/
jQuery.fn.clearForm =3D function() {
return this.each(function() {
jQuery('input,select,textarea', this).clearFields();
});
};
/**
* Clears the selected form elements. Takes the following actions on =
the matched elements:
* - input text fields will have their 'value' property set to the =
empty string
* - select elements will have their 'selectedIndex' property set to -1
* - checkbox and radio inputs will have their 'checked' property set =
to false
* - inputs of type submit, button, reset, and hidden will *not* be =
effected
* - button elements will *not* be effected
*
* @example $('.myInputs').clearFields();
* @desc Clears all inputs with class myInputs
*
* @name clearFields
* @type jQuery
* @cat Plugins/Form
* @see clearForm
*/
jQuery.fn.clearFields =3D jQuery.fn.clearInputs =3D function() {
return this.each(function() {
var t =3D this.type, tag =3D this.tagName.toLowerCase();
if (t =3D=3D 'text' || t =3D=3D 'password' || tag =3D=3D =
'textarea')
this.value =3D '';
else if (t =3D=3D 'checkbox' || t =3D=3D 'radio')
this.checked =3D false;
else if (tag =3D=3D 'select')
this.selectedIndex =3D -1;
});
};
/**
* Resets the form data. Causes all form elements to be reset to their =
original value.
*
* @example $('form').resetForm();
* @desc Resets all forms on the page.
*
* @name resetForm
* @type jQuery
* @cat Plugins/Form
* @see clearForm
*/
jQuery.fn.resetForm =3D function() {
return this.each(function() {
// guard against an input with the name of 'reset'
// note that IE reports the reset function as an 'object'
if (typeof this.reset =3D=3D 'function' || (typeof this.reset =
=3D=3D 'object' && !this.reset.nodeType))
this.reset();
});
};
------=_NextPart_000_0000_01CA3183.25C0F580
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: http://paper.avui.cat/js/checking.js
------=_NextPart_000_0000_01CA3183.25C0F580
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: http://paper.avui.cat/js/detail.js
$(document).ready(function(){
$('#voteButton').click(function(){
$.getJSON( "vote.php",
{ id: $(this).attr("art") },
function(data){
$('#totalvotes').empty().append(data.totalvotes);
$('#txt_totalvotes').empty().append((data.totalvotes=3D=3D1)? =
'vot':'vots');
alert(data.message);
}
);
return false;
});
//Enviar amigo DIALOG
$('body').append($('#enviaaunamigo_modal')); //avoid ie6 bug
$('#enviaaunamigo_modal').jqm({modal: true});
//enviar amigo FORM
$('#enviaramigoform').ajaxForm({ beforeSubmit: submit_amigo, success: =
showResponse_amigo, dataType: 'json', error: raiseError });=20
});
function vote_article(pk) {
$.getJSON( "vote.php",
{ id: pk },
function(data){
$('#totalvotes'+pk).empty().append(data.totalvotes);
$('#txt_totalvotes'+pk).empty().append((data.totalvotes=3D=3D1)? =
'vot':'vots');
alert(data.message);
}
);
}
function showPopup_amigo(id) {
$('#enviaaunamigo_pk').val(id);
$('#enviaaunamigo_modal').jqmShow();
}
function submit_amigo(formData, jqForm, options) {
var f =3D jqForm[0];=20
if (f.txt_SourceName.value=3D=3D'')
{
alert("El camp \'El teu nom\' =E9s obligatori");
f.txt_SourceName.focus();
return false;
}
=09
if (f.txt_DestMail.value=3D=3D'')
{
alert("El camp \'Email del teu amic\' =E9s obligatori");
f.txt_DestMail.focus();
return false;
}
=09
if (!isValidEmail(f.txt_DestMail.value))
{
alert("Format incorrecte en el camp \'Emails dels teus amics\'");
f.txt_DestMail.focus();
return false;
}
document.getElementById("btrecomendar").disabled=3Dtrue;
=09
}
function showResponse_amigo(data, statusText) {=20
alert(data.message);
$('#enviaaunamigo_modal').jqmHide();
document.getElementById("btrecomendar").disabled=3Dfalse;
if (data.status =3D=3D 1) $('#enviaramigoform').clearForm();
}
function raiseError() {
//alert("Error: no =E9s possible enviar el correu electr=F2nic");
alert("Mail Enviat");
document.getElementById("btrecomendar").disabled=3Dfalse;
}
//
// Funcions del modul d'opinions
//
String.prototype.trim =3D function() { return this.replace(/^\s+|\s+$/, =
''); };
function ValidatePost(f)
{
if (f.txt_comentario.value=3D=3D'')
{
alert("El camp 'Comentari' =E9s obligatori");
f.txt_comentario.focus();
return false;
}
if (f.txt_comentario.value.length > 500)
{
alert("El camp 'Comentari' no pot tenir m=E9s de 500 car=E0cters");
f.txt_comentario.focus();
return false;
}
str =3D f.txt_Name.value.trim();
if (str=3D=3D'')
{
alert("El camp 'Nom' =E9s obligatori");
f.txt_Name.focus();
return false;
}
if (f.txt_security_code.value.length !=3D 6)
{
alert("El camp del captcha =E9s obligatori i ha de contenir 6 =
car=E0cters");
f.txt_security_code.focus();
return false;
}
return true;
}
var newOpiwindow =3D '';
function viewOpinions(id,tId) {
var url =3D "/opinions/list.php?id=3D"+id+"&tId=3D"+tId;
if (!newOpiwindow.closed && newOpiwindow.location) {
newOpiwindow.location.href =3D url;
} else {
var w =3D '800';
var h =3D '600';
LeftPosition =3D (screen.width) ? (screen.width-w)/2 : 0;
TopPosition =3D (screen.height) ? (screen.height-h)/2 : 0;
settings =
=3D'height=3D'+h+',width=3D'+w+',top=3D'+TopPosition+',left=3D'+LeftPosit=
ion+',toolbar=3D0,location=3D0,status=3D0,menubar=3D0,scrollbars=3D1,tool=
bar=3D0,resizable=3D0';
newOpiwindow =3D window.open(url,"Opinions",settings);
}
if (window.focus) newOpiwindow.focus();
}
//
// Altres funcions
//
function mailAntiSpam(u,d,n){
document.write(''+n+' ');
}
------=_NextPart_000_0000_01CA3183.25C0F580
Content-Type: application/octet-stream
Content-Transfer-Encoding: 7bit
Content-Location: http://adserver.avui.cat/adx.js
------=_NextPart_000_0000_01CA3183.25C0F580
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: http://secure-uk.imrworldwide.com/v53.js
// Netratings SiteCensus v53.js=0A=
// COPYRIGHT 2007 Nielsen//Netratings=0A=
=0A=
function random()=0A=
{=0A=
random.seed =3D (random.seed*random.a + random.c) % random.m;=0A=
return random.seed / random.m;=0A=
}=0A=
random.m=3D714025;=0A=
random.a=3D4096;=0A=
random.c=3D150889;=0A=
random.seed =3D (new Date()).getTime()%random.m;=0A=
=0A=
function _rsEH(){}=0A=
window.onerror=3D_rsEH;=0A=
=0A=
var _rsLP=3Dlocation.protocol.indexOf('https')>-1?'https:':'http:';=0A=
var _rsND=3D_rsLP+_rsDN;=0A=
var _rsRD=3D(new Date()).getTime();=0A=
if (typeof(_rsCC)=3D=3D"undefined") {var _rsCC=3D1;}=0A=
if (typeof(_rsDT)=3D=3D"undefined") {var _rsDT=3D0;}=0A=
if (typeof(_rsSE)=3D=3D"undefined") {var _rsSE=3D0;}=0A=
if (typeof(_rsSV)=3D=3D"undefined") {var _rsSV=3D"";}=0A=
if (typeof(_rsSM)=3D=3D"undefined") {var _rsSM=3D0;}=0A=
if (typeof(_rsSS)=3D=3D"undefined") {var _rsSS=3D1;}=0A=
if (typeof(_rsUT)=3D=3D"undefined") {var _rsUT=3D0;}=0A=
if (typeof(_rsMP)=3D=3D"undefined") {var _rsMP=3D1;}=0A=
if (typeof(_rsIP)=3D=3D"undefined") {var _rsIP=3D0;}=0A=
if (typeof(_rsCG)=3D=3D"undefined") {var _rsCG=3D0;}=0A=
if (typeof(_rsTC)=3D=3D"undefined") {var _rsTC=3D500;}=0A=
if (typeof(_rsSI)=3D=3D"undefined") {var =
_rsSI=3Descape(window.location);}=0A=
if (typeof(_rsCL)=3D=3D"undefined") {var _rsCL=3D0;}=0A=
if (typeof(_rsCU)=3D=3D"undefined") {var _rsCU=3Dwindow.location;}=0A=
if (typeof(_rsPLfl)=3D=3D"undefined") {var _rsPLfl=3D1; }=0A=
if (typeof(_rsPLqt)=3D=3D"undefined") {var _rsPLqt=3D0; }=0A=
if (typeof(_rsPLre)=3D=3D"undefined") {var _rsPLre=3D0; }=0A=
if (typeof(_rsPLwm)=3D=3D"undefined") {var _rsPLwm=3D0; }=0A=
if (typeof(_rsPLjj)=3D=3D"undefined") {var _rsPLjj=3D0; }=0A=
if (typeof(_rsPLac)=3D=3D"undefined") {var _rsPLac=3D0; }=0A=
if (typeof(_rsC0)=3D=3D"undefined") {var _rsC0;}=0A=
if (typeof(_rsC1)=3D=3D"undefined") {var _rsC1;}=0A=
if (typeof(_rsC2)=3D=3D"undefined") {var _rsC2;}=0A=
if (typeof(_rsC3)=3D=3D"undefined") {var _rsC3;}=0A=
if (typeof(_rsC4)=3D=3D"undefined") {var _rsC4;}=0A=
if (typeof(_rsC5)=3D=3D"undefined") {var _rsC5;}=0A=
if (typeof(_rsC6)=3D=3D"undefined") {var _rsC6;}=0A=
if (typeof(_rsC7)=3D=3D"undefined") {var _rsC7;}=0A=
if (typeof(_rsC8)=3D=3D"undefined") {var _rsC8;}=0A=
if (typeof(_rsC9)=3D=3D"undefined") {var _rsC9;}=0A=
=0A=
function _rsPause(_rsMillis) {=0A=
var _rsDate =3D new Date();=0A=
var _rsCurrDate;=0A=
=0A=
do { =0A=
_rsCurrDate =3D new Date(); =0A=
} while(_rsCurrDate - _rsDate < _rsMillis);=0A=
} =0A=
=0A=
function _rsRecordFactory(_rsClickUrl, _rsNewCG) {=0A=
var _rsSrc =3D _rsND + 'cgi-bin/m?rnd=3D' + (new Date()).getTime();=0A=
_rsSrc +=3D '&ci=3D' + _rsCI;=0A=
_rsSrc +=3D '&cg=3D' + escape(_rsNewCG);=0A=
_rsSrc +=3D '&cc=3D0';=0A=
_rsSrc +=3D '&si=3D' + _rsCI + '-ctgw-' + escape(_rsClickUrl);=0A=
_rsSrc +=3D '&rp=3D' + escape(window.location);=0A=
if(_rsSrc.length > 2048) {=0A=
_rsSrc =3D _rsSrc.substring(0, 2048);=0A=
}=0A=
return _rsSrc;=0A=
}=0A=
=0A=
function _rsEvent(_rsClickUrl) {=0A=
var _rsNewCG =3D _rsEvent.arguments.length > 1 ? _rsEvent.arguments[1] =
: _rsCG;=0A=
(new Image(1,1)).src =3D _rsRecordFactory(_rsClickUrl, _rsNewCG);=0A=
}=0A=
=0A=
function _rsLinkTrack(_rsClickUrl) {=0A=
=0A=
var _rsNewCG =3D _rsLinkTrack.arguments.length > 1 ? =
_rsLinkTrack.arguments[1] : _rsCG;=0A=
var _rsClickImg =3D new Image(1,1);=0A=
_rsClickImg.src =3D _rsRecordFactory(_rsClickUrl, _rsNewCG);=0A=
_rsPause(_rsTC);=0A=
}=0A=
=0A=
var _rsClickDst;=0A=
function _rsClick(_rsClickUrl) {=0A=
var _rsNewCG =3D _rsClick.arguments.length > 1 ? =
_rsClick.arguments[1] : _rsCG;=0A=
var _rsClickImg =3D new Image(1,1);=0A=
_rsClickImg.src =3D _rsRecordFactory(_rsClickUrl, _rsNewCG);=0A=
_rsClickDst =3D _rsClickUrl;=0A=
setTimeout("window.location =3D _rsClickDst", _rsTC);=0A=
}=0A=
=0A=
function _rsVerInfo(str, ct) {=0A=
var p =3D 0;=0A=
var sp =3D 0;=0A=
for(var i=3D0;i=3D0;i++) { sp=3Dp+1; p =3D str.indexOf('.', sp); =
}=0A=
if(p>0) {=0A=
var v =3D str.substring(sp, p).match(/\d+$/);=0A=
return v ? v : 0;=0A=
} else {=0A=
return 0;=0A=
}=0A=
}=0A=
=0A=
function _rsPluginDetect() {=0A=
var _rsPlugins =3D [];=0A=
var _rsMT =3D navigator.mimeTypes; // -1 indicates unknown=0A=
if(_rsMT && _rsMT.length > 0) {=0A=
var k;=0A=
if(_rsPLfl=3D=3D1) {=0A=
_rsPlugins['FL']=3D-1;=0A=
k =3D 'application/x-shockwave-flash';=0A=
if(_rsMT[k] && _rsMT[k].enabledPlugin) {=0A=
_rsPlugins['FL'] =3D _rsVerInfo(_rsMT[k].enabledPlugin.description, =
1);=0A=
}=0A=
}=0A=
if(_rsPLqt=3D=3D1) {=0A=
_rsPlugins['QT']=3D-1;=0A=
k =3D 'video/quicktime';=0A=
if(_rsMT[k] && _rsMT[k].enabledPlugin) {=0A=
_rsPlugins['QT'] =3D _rsVerInfo(_rsMT[k].enabledPlugin.name, 1);=0A=
}=0A=
}=0A=
if(_rsPLre=3D=3D1) {=0A=
_rsPlugins['RE']=3D-1;=0A=
k =3D 'audio/x-pn-realaudio-plugin';=0A=
if(_rsMT[k] && _rsMT[k].enabledPlugin) {=0A=
_rsPlugins['RE'] =3D 0;=0A=
}=0A=
}=0A=
if(_rsPLwm=3D=3D1) {=0A=
_rsPlugins['QT']=3D-1;=0A=
var rt =3D true;=0A=
if(window.GeckoActiveXObject) {=0A=
try {=0A=
var p =3D new GeckoActiveXObject("WMPlayer.OCX.7");=0A=
_rsPlugins['WM'] =3D _rsVerInfo(p.versionInfo, 1);=0A=
rt =3D false;=0A=
} catch(e) {}=0A=
} =0A=
if(rt) {=0A=
k =3D 'application/x-mplayer2';=0A=
if(_rsMT[k] && _rsMT[k].enabledPlugin) {=0A=
_rsPlugins['WM'] =3D 0;=0A=
}=0A=
}=0A=
=0A=
}=0A=
if(_rsPLjj=3D=3D1) {=0A=
_rsPlugins['JJ']=3D-1;=0A=
k =3D 'application/x-java-applet';=0A=
if(_rsMT[k] && _rsMT[k].enabledPlugin) {=0A=
var v =3D _rsVerInfo(_rsMT[k].enabledPlugin.description, 2);=0A=
_rsPlugins['JJ'] =3D (v =3D=3D 0 ? v : '1.'+v);=0A=
}=0A=
}=0A=
if(_rsPLac=3D=3D1) {=0A=
_rsPlugins['AC']=3D-1;=0A=
k =3D 'application/pdf';=0A=
if(_rsMT[k] && _rsMT[k].enabledPlugin) {=0A=
_rsPlugins['AC'] =3D 0;=0A=
}=0A=
}=0A=
} else if(window.ActiveXObject) {=0A=
var _rsP;=0A=
=0A=
if(_rsPLfl=3D=3D1) {=0A=
_rsPlugins['FL']=3D-1;=0A=
for(var i=3D14;i>0;i--) {=0A=
try {=0A=
_rsP =3D new ActiveXObject('ShockwaveFlash.ShockwaveFlash.'+i);=0A=
if(_rsP !=3D null) { _rsPlugins['FL'] =3D i; break; }=0A=
} catch(e) {}=0A=
}=0A=
}=0A=
if(_rsPLqt=3D=3D1) {=0A=
_rsPlugins['QT']=3D-1;=0A=
try {=0A=
_rsP =3D new ActiveXObject('QuickTimeCheckObject.QuickTimeCheck.1');=0A=
if(_rsP !=3D null) { _rsPlugins['QT'] =3D =
parseInt(_rsP.QuickTimeVersion.toString(16).substring(0,1)); }=0A=
} catch(e) {}=0A=
}=0A=
if(_rsPLre=3D=3D1) {=0A=
_rsPlugins['RE']=3D-1;=0A=
try {=0A=
_rsP =3D new ActiveXObject('rmocx.RealPlayer G2 Control.1');=0A=
if(_rsP !=3D null) { _rsPlugins['RE'] =3D 0; }=0A=
} catch(e) {}=0A=
}=0A=
if(_rsPLwm=3D=3D1) {=0A=
_rsPlugins['WM']=3D-1;=0A=
try {=0A=
_rsP =3D new ActiveXObject('WMPlayer.OCX.7');=0A=
if(_rsP !=3D null) { _rsPlugins['WM'] =3D =
_rsVerInfo(_rsP.versionInfo, 1); }=0A=
} catch(e) {}=0A=
}=0A=
if(_rsPLjj=3D=3D1) {=0A=
_rsPlugins['JJ']=3D-1;=0A=
try {=0A=
_rsP =3D new ActiveXObject('JavaPlugin');=0A=
if(_rsP !=3D null) { _rsPlugins['JJ'] =3D 0; }=0A=
} catch(e) {}=0A=
}=0A=
if(_rsPLac=3D=3D1) {=0A=
_rsPlugins['AC']=3D-1;=0A=
var rt =3D true;=0A=
try {=0A=
_rsP =3D new ActiveXObject('AcroPDF.PDF.1');=0A=
if(_rsP !=3D null) { _rsPlugins['AC'] =3D =
_rsVerInfo(_rsP.GetVersions(), 1); rt =3D false; }=0A=
} catch(e) {}=0A=
if(rt) {=0A=
for(var i=3D6;i>2;i--) {=0A=
try {=0A=
_rsP =3D new ActiveXObject('PDF.PdfCtrl.'+i);=0A=
if(_rsP !=3D null) { _rsPlugins['AC'] =3D i; break; }=0A=
} catch(e) {}=0A=
}=0A=
}=0A=
}=0A=
}=0A=
return _rsPlugins;=0A=
}=0A=
=0A=
function rsCi()=0A=
{=0A=
var _rsUA=3Dnavigator.appName+" "+navigator.appVersion;=0A=
var _rsRUA=3Dnavigator.userAgent;=0A=
var _rsWS=3Dwindow.screen;=0A=
var _rsBV=3Dnavigator.appVersion.substring(0, 1);=0A=
var _rsNN=3D(_rsUA.indexOf('Netscape'));=0A=
var _rsMC=3D(_rsUA.indexOf('Mac'));=0A=
var _rsIE=3D(_rsUA.indexOf('MSIE'));=0A=
var _rsOP=3D(_rsRUA.indexOf('Opera'));=0A=
var _rsIEV=3D(parseInt(_rsUA.substr(_rsIE+5)));=0A=
var _rsRP=3Descape(document.referrer);=0A=
var _rsSR;=0A=
var _rsCD;=0A=
var _rsLG;=0A=
var _rsJE;=0A=
var _rsCK;=0A=
var _rsTZ;=0A=
var _rsCT;=0A=
var _rsHP;=0A=
var _rsTL;=0A=
var _rsSW;=0A=
var _rsSH;=0A=
var _rsFL;=0A=
var _rsQT;=0A=
var _rsRE;=0A=
var _rsWM;=0A=
var _rsJJ;=0A=
var _rsAC;=0A=
if (_rsMP=3D=3D0) {return;}=0A=
_rsJE=3D(navigator.javaEnabled()=3D=3Dtrue)?"y":"n";=0A=
if (_rsDT=3D=3D1) {=0A=
_rsTL=3Descape(document.title);=0A=
}=0A=
if((_rsIE>0)||((_rsNN!=3D-1)&&(_rsBV >=3D5))) {=0A=
_rsCK=3D(navigator.cookieEnabled=3D=3Dtrue)?"y":"n";=0A=
}=0A=
if((_rsIE>=3D0)&&(_rsIEV>=3D5)&&(_rsMC=3D=3D-1)&&(_rsOP=3D=3D-1)) {=0A=
document.body.addBehavior("#default#clientCaps");=0A=
_rsCT=3Ddocument.body.connectionType;=0A=
document.body.addBehavior("#default#homePage");=0A=
_rsHP=3D(document.body.isHomePage(location.href))?"y":"n";=0A=
}=0A=
var _rsD =3D new Date();=0A=
_rsTZ =3D _rsD.getTimezoneOffset()/-60;=0A=
if((typeof(_rsWS)!=3D"undefined")&&(_rsWS!=3Dnull)) {=0A=
_rsSW=3D_rsWS.width;=0A=
_rsSH=3D_rsWS.height;=0A=
_rsCD=3D_rsWS.colorDepth;=0A=
_rsSR=3D_rsSW+'x'+_rsSH;=0A=
if((_rsNN!=3D-1)&&(_rsBV >=3D4)) {=0A=
_rsCD=3D_rsWS.pixelDepth;=0A=
}=0A=
}=0A=
if((_rsNN!=3D-1)&&(_rsBV >=3D4)||(_rsOP>=3D0)) {=0A=
_rsLG=3Dnavigator.language;=0A=
}=0A=
if((_rsIE!=3D-1)&&(_rsBV >=3D4)&&(_rsOP=3D=3D-1)) {=0A=
_rsLG=3Dnavigator.userLanguage;=0A=
}=0A=
var _rsPlugins =3D _rsPluginDetect();=0A=
var _rsPR=3D"";=0A=
_rsPR=3D' ';=0A=
document.write(_rsPR);=0A=
}=0A=
=0A=
function _rsCLSendIt(_rsSrc, _rsDest, _rsTargetType, _rsClickName, =
_rsClickValue) {=0A=
var _rsCLData =3D _rsND+'cgi-bin/m?rnd=3D'+(new Date()).getTime();=0A=
_rsCLData =3D _rsCLData+'&ci=3D'+_rsCI;=0A=
_rsCLData =3D _rsCLData+'&cg=3D'+escape(_rsCG);=0A=
_rsCLData =3D _rsCLData+'&cc=3D0';=0A=
_rsCLData =3D _rsCLData+'&si=3D'+_rsCI+'-ctpo-'+escape(_rsDest);=0A=
_rsCLData =3D _rsCLData+'&rp=3D'+escape(_rsSrc);=0A=
_rsCLData =3D _rsCLData+'&tt=3D'+escape(_rsTargetType);=0A=
_rsCLData =3D _rsCLData+'&cn=3D'+escape(_rsClickName);=0A=
_rsCLData =3D _rsCLData+'&cv=3D'+escape(_rsClickValue);=0A=
if(_rsCLData.length > 2048) {=0A=
_rsCLData =3D _rsCLData.substring(0, 2048);=0A=
}=0A=
var _rsPx =3D new Image(1,1);=0A=
_rsPx.src =3D _rsCLData;=0A=
_rsPause(_rsTC);=0A=
}=0A=
function _rsCLSendALink(_rsALink) {=0A=
var _rsName =3D _rsALink.innerHTML.toLowerCase().indexOf('img') > -1 ? =
'image' : 'text';=0A=
_rsCLSendIt(_rsCU, _rsALink.href, _rsALink.tagName.toLowerCase(), =
_rsName, _rsALink.innerHTML);=0A=
}=0A=
function _rsCLSendForm(_rsInput) {=0A=
if(_rsInput.form =3D=3D undefined || _rsInput.form.action =3D=3D =
undefined) {=0A=
return;=0A=
}=0A=
=0A=
if (_rsInput.type =3D=3D 'image') {=0A=
var _rsValue =3D _rsInput.src;=0A=
}=0A=
else if (_rsInput.tagName =3D=3D 'BUTTON') {=0A=
var _rsValue =3D =
_rsInput.innerHTML.replace(/^\s+|\s+$/g, '').replace(/\s+/g, ' ');=0A=
if (_rsValue =3D=3D "") _rsValue =3D _rsInput.value;=0A=
}=0A=
else {=0A=
var _rsValue =3D _rsInput.value;=0A=
}=0A=
=0A=
_rsCLSendIt(_rsCU, _rsInput.form.action, =
_rsInput.form.tagName.toLowerCase(), _rsInput.type.toLowerCase(), =
_rsValue);=0A=
}=0A=
function _rsCLCatchIt(e) {=0A=
var _rsCurr =3D e ? e.target : window.event.srcElement;=0A=
if ((_rsCurr.tagName =3D=3D 'INPUT' || _rsCurr.tagName =3D=3D 'BUTTON')=0A=
&& (_rsCurr.type =3D=3D 'image' || _rsCurr.type =3D=3D 'submit' || =
_rsCurr.type =3D=3D 'button')) {=0A=
_rsCLSendForm(_rsCurr);=0A=
}=0A=
else=0A=
{=0A=
do {=0A=
if ((_rsCurr.tagName =3D=3D 'A') && (_rsCurr.href.length > 0)) {=0A=
_rsCLSendALink(_rsCurr);=0A=
break;=0A=
}=0A=
_rsCurr =3D _rsCurr.parentNode;=0A=
} while (_rsCurr !=3D null && _rsCurr.tagName !=3D 'BODY')=0A=
}=0A=
}=0A=
=0A=
function _rsCLRegisterIt() {=0A=
if(!document.getElementById) {=0A=
return;=0A=
}=0A=
var _rsOld =3D document.body.onclick;=0A=
if(_rsOld) {=0A=
document.body.onclick =3D function (e) {=0A=
_rsCLCatchIt(e);=0A=
_rsOld(e);=0A=
}=0A=
}=0A=
else {=0A=
document.body.onclick =3D _rsCLCatchIt;=0A=
}=0A=
}=0A=
=0A=
// main=0A=
if((_rsSE)&&(random() <=3D _rsSM)) {=0A=
var _rsIM=3D'<\/scr'+'ipt>';=0A=
document.write(_rsIM);=0A=
}=0A=
else {=0A=
rsCi();=0A=
}=0A=
if(_rsCL=3D=3D1) {=0A=
_rsCLRegisterIt();=0A=
}=0A=
------=_NextPart_000_0000_01CA3183.25C0F580--