var temp = new String(this.location);

if ((temp.indexOf('//architecture.com.au') == -1) &&
    (temp.indexOf('www.architecture.com.au') == -1) &&
    (temp.indexOf('int.architecture.com.au') == -1) &&
	(temp.indexOf('content.environmentdesignguide.com.au') == -1)) {

	var offset = 0;
	
	if (temp.lastIndexOf("http://") > -1) {
		offset = 7;
	} else if (temp.lastIndexOf("https://") > -1) {
		offset = 8;
	}
	
	var end = temp.indexOf("/", offset);
	
	if (end == -1) {
		end = temp.length();
	}
	
	finalend = temp.length
	
	startstr = temp.substring(0, offset);
	endstr = temp.substring(end, finalend);
	
	finalurl = startstr + "www.architecture.com.au" + endstr;
	
	document.location = finalurl;
}

