/**
* LAST MOD: APR 04 2009
* ---------------------
*/
//GLOBAL FUNCTIONS
function preloadImg() {
    if(document.images) {
        dd_img1=new Image(163,20);
        dd_img1.src="images/icon_findafreelancernow_over.jpg";
    }
}
function tos(s) {
    var ww=screen.width;
    var hh=screen.height;
    var isWW=(ww/2)-175;
    var isHH=(hh/2)-175;
    window.open(s,'',config='width=400,height=450,scrollbars=yes,statusbar=no,left='+isWW+',top='+isHH+',resizable=0');
}

function quickSearch() {
    var d=document.getElementById('searchBox').value;
    var newD="freelance_results.php?qsearch="+d+"&search_category=search";
    return newD;
}
function enterKey(e,url) {
    if(!e) {
        var e=window.event;
    }
    var d=document.getElementById('searchBox').value;
    d=url+"freelance_results.php?qsearch="+d+"&search_category=search";
    if(e.which==13) {
        return window.location.replace(d);
    }else if(e.keyCode==13) {
        return window.location.replace(d);
    }
}
/*---------------RIGHT COLUMN MEMBER ADDS--------------*/
function msClick(l,f,m) {
    var goURL="freelancer_portfolio.php?listingID="+l+"&memberID="+m+"&featured=&org=side banner&str=index";
    window.location.replace(goURL);
}
function hand(t) {
    try{
        return t.style.cursor="pointer";
    }catch(er) {
        //
    }
}
/*---------------END OF RIGHT COLUMN MEMBER ADDS-------*/
/*===CREATES AN XML HEADER OBJECT=======*/
var xmlTimer=null;
function xmlObject(t,c) {// t = an optional timer call (if specified, do setTimeout); c=custom function or action
    //if object already exists and is being used, kill it
    try{
        rq.abort();
    }catch(er) {
        //do nothing
    }
    //now we create (re-create) the ojbect
    rq=null;
    if(window.XMLHttpRequest) {
        rq=new XMLHttpRequest();
    }else if(window.ActiveXObject) {
        try {
            rq=new ActiveXObject("Msxml2.XMLHTTP");
        }catch (er) {
            try {
                rq=new ActiveXObject("Microsoft.XMLHTTP");
            }catch (er) {
                rq="If you are using Internet Explorer, please enable your ActiveX or update your Internet Explorer to a version that supports it.";
            }
        }
    }else{
        rq="Your browser does not support the XMLHttpRequest or ActiveX. To utilize this option, please use a browser with one of the supports.";
    }
    //LET'S ALSO START A TIMER
    if(typeof(t)=="number") {
        xmlTimer=window.setTimeout((
            function(){
                try{
                    rq.abort();
                }catch(er){
                }
                //if set, let's evaluate second argument
                if(typeof(c)!=null && typeof(c)!=undefined && typeof(c)!="") {
                    eval(c);
                }
            }
        ),t);
    }
    return rq;
}


