function gup( name ) {
	name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
	var regexS = "[\\?&]"+name+"=([^&#]*)";
	var regex = new RegExp( regexS );
	var results = regex.exec( window.location.href );
	if( results == null )
		return "";
	else
		return results[1];
}

// Add the newsletter div (this is where everything will be displayed)
document.write('<div id="thomsonreutersdoc" style="background:#fff;"></div>');

// Find out what URL we're on (remove any parameters on the end):
var temp = window.location.href.split("?");
var url = temp[0]; // you may still need to peel of port number and such.


// Get newsletter ID
var urlstring = '';
var docid = gup( "docid" )
if (docid != '') {
	urlstring = "?docid="+docid+"&";
} else {
	urlstring ="?"
}

// Load the ASPJavaScript file and pass in the URL and newsletter parameters:
var aspjavascript=document.createElement('script')
aspjavascript.setAttribute("type","text/javascript")
aspjavascript.setAttribute("src", "http://www.findlaw.com.au/edocs/aspjavascript.asp"+urlstring+"url="+url+"&categoryid=2&typeid=2")
document.getElementsByTagName("head")[0].appendChild(aspjavascript)

