(function() {

    baseURL = 'http://www.adclip.com/';
    //baseURL = 'http://localhost:2352/';
    scriptURL = baseURL + 'scripts/clips/adclip.clips.highlightBox.aspx?';


    function obj2query(obj, forPHP, parentObject) {
        if (typeof obj != 'object') return '';

        if (arguments.length == 1)
            forPHP = /\.php$/.test(document.location.href);

        var rv = '';
        for (var prop in obj) if (obj.hasOwnProperty(prop)) {

            var qname = parentObject
         ? parentObject + '.' + prop : prop;

            // Expand Arrays
            if (obj[prop] instanceof Array)
                for (var i = 0; i < obj[prop].length; i++)
                if (typeof obj[prop][i] == 'object')
                rv += '&' + obj2query(obj[prop][i], forPHP, qname);
            else
                rv += '&' + encodeURIComponent(qname) + (forPHP ? '[]' : '')
					+ '=' + encodeURIComponent(obj[prop][i]);

            // Expand Dates
            else if (obj[prop] instanceof Date)
                rv += '&' + encodeURIComponent(qname) + '=' + obj[prop].getTime();

            // Expand Objects
            else if (obj[prop] instanceof Object)
            // If they're String() or Number() etc
                if (obj.toString && obj.toString !== Object.prototype.toString)
                rv += '&' + encodeURIComponent(qname) + '=' + encodeURIComponent(obj[prop].toString());
            // Otherwise, we want the raw properties
            else
                rv += '&' + obj2query(obj[prop], forPHP, qname);

            // Output non-object
            else
                rv += '&' + encodeURIComponent(qname) + '=' + encodeURIComponent(obj[prop]);

        }
        return rv.replace(/^&/, '');
    }






    document.write('<iframe name="adclip_ads_frame" width="' + adclipConf.width + '" height="' + adclipConf.height + '" frameborder="0" src="' + scriptURL + obj2query(adclipConf) + '" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no"></iframe>');


    //alert(scriptURL + obj2query(adclipConf));

})()