/*
Author: Josip Delic
*/
dojo.provide("haufedojohelp.data.HaufeUtils");
//console.debug("providing haufedojohelp.data.HaufeUtils(see HaufeUtils.js)");

dojo.declare("haufedojohelp.data.HaufeUtils", null, {
    widenDomain: function(domainStr){
        // the purpose of this is to set the most liberal domain policy
        // available
        var cd = domainStr||document.domain;
        if(cd.indexOf(".")==-1){ return; } // probably file:/// or localhost
        var dps = cd.split(".");
        if(dps.length<=2){ return; } // probably file:/// or an RFC 1918 address
        dps = dps.slice(dps.length-2);
        document.domain = dps.join(".");
    }
});
//console.debug("haufedojohelp.data.HaufeUtils EOF");
