var com;if(!com){com={}}if(!com.thenextspark){com.thenextspark={}}com.thenextspark.TOOLS_BASE_URL="http://tools.sparkproperty.com.au/2.2c/";com.thenextspark.AUTH_BASE_URL="https://secure.sparkproperty.com.au/security/";com.thenextspark.include=function(A){if(!A||typeof A!=="string"){throw new Error("com.thenextspark.include: packageNameOrUrl must be a string")}var B="";if(A.indexOf("http://")==0){B=A}else{B=this._packageNameToUrl(A)}if(!com.thenextspark._includes){com.thenextspark._includes={};com.thenextspark._includes[window.location.href]=true}if(!com.thenextspark._includes[B]){com.thenextspark._includes[B]=true;document.writeln("<script src='"+B+"' type='text/javascript'><\/script>")}};com.thenextspark._packageNameToUrl=function(A){if(!A||typeof A!=="string"||A==""){throw new Error("com.thenextspark._packageNameToUrl: No packageName supplied, or packageName is not a string.")}var C="com.thenextspark";var D="http://tools.sparkproperty.com.au/2.2c/";var B="";if(A[A.length-1]=="."){throw new Error("com.thenextspark._packageNameToUrl: Invalid packageName '"+A+"'. packageName can't end in a dot ('.').")}A=A.replace(RegExp("^"+C.replace(".","\\.")+"."),"");switch(true){case A.indexOf("lib.")==0:case A.indexOf("widgets.")==0:B=D;B+=A.split(".").join("/")+".js";break;default:throw new Error("com.thenextspark._packageNameToUrl: Invalid packageName '"+A+"'.")}return B};