/*
 * @author	Nicholas Almeida, www.nicholasalmeida.com
 * @version	1.0
*/

try{xmlhttp = new XMLHttpRequest();}catch(ee){try{xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");}catch(E){xmlhttp = false;};};};var o = null;function queue(){this.arrqueue = []; this.current = 0; this.add = function(u, i, addParams) {this.arrqueue[ this.arrqueue.length ] = addParams ? [u, i, addParams] : [u, i];if( this.current == this.arrqueue.length - 1) this.callXML();};this.receipt = function(){if( xmlhttp.readyState == 4 ){var i = this.arrqueue[ this.current ][1];if( this.arrqueue[ this.current ].length == 2){document.getElementById(i).innerHTML = xmlhttp.responseText;}else{var r = eval(xmlhttp.responseText);var addP = this.arrqueue[this.current][2];i(r,addP);};this.current++ ;if( this.arrqueue.length > this.current ) setTimeout('myQueue.callXML()',10);};};this.callXML = function(){try{xmlhttp.open('get', this.arrqueue[ this.current ][0]+'&cacheBuster='+Math.random(), true);xmlhttp.onreadystatechange = receipt;xmlhttp.send( null );} catch(er){alert("Invalid domain: " + this.arrqueue[this.current][0]);return false;};};};function receipt(){myQueue.receipt();};myQueue = new queue();function fillCombo_i(o,c){while(c.options.length>0)c.options[c.options.length-1]=null;for(i=0;i<o.length;i++)c.options[c.options.length]=new Option(o[i][0],o[i][1]);};function ajaxRun(u,f,addParams){if(typeof(addParams) == "undefined")addParams = [];myQueue.add(u,f,addParams);};function getSource(e){if( typeof(e)=='undefined' )var e = window.event;var source = e.target ? e.target : e.srcElement;if( source.nodeType == 3 )source = source.parentNode;return source;};