//lbUtils.js
//Author:  Graham McCarthy Jan 10th 2008
//Desc:   This program calls the individual scripts on the Ryerson Library website as a batch run, 
//		   Offers easier editting than is currently allowed on our server and Keeps the logic in re-usable components.

<!---- Social Scripts ---->
function loadSocialHeaders() {
	document.write("<script type='text/javascript' src='http://www.ryerson.ca/library/javascript/sms.js'></script>"); 
	document.write("<script type='text/javascript' src='http://www.ryerson.ca/library/javascript/socialScripts.js'></script>");
	document.write("<script type='text/javascript' src='http://www.ryerson.ca/library/javascript/gbs.js'></script>"); 
	
	
	/// if on testing server
	URL = window.location.href;
	if(URL.indexOf('.ryerson.ca:2082/') > 0)
	{
		
	}
}

function runSocialScripts() {
	createSMSLink();
    createFacebook();
	
	
	
	/// if on testing server
	URL = window.location.href;
	if(URL.indexOf('.ryerson.ca:2082/') > 0)
	{
		
	}
}




<!--- Catalogue Manipulation ---->
function loadCatHeaders() {
	document.write("<script type='text/javascript' src='http://www.ryerson.ca/library/javascript/cat_rephrase.js'></script>"); 
		
	/// if on testing server
	URL = window.location.href;
	if(URL.indexOf('.ryerson.ca:2082/') > 0)
	{
		/*document.write("<script type='text/javascript' src='http://www.ryerson.ca/library/javascript/EZtoWAN.js'></script>"); */
	}
}

function runCatScripts() {
    rewriteEntryData(); 
	rewriteTRClassItem('bibItemsEntry','APPROVAL','Request This Item', 		
					   	'http://www.ranger.ryerson.ca/library/forms/approval_books/index.cfm');
	rewriteProcessingBooks('http://www.ranger.ryerson.ca/library/forms/approval_books/index.cfm');
	rewriteInProcessing('bibItemsEntry', 'In processing', 'In processing', 
						'http://www.ryerson.ca/library/info/definitions/index.html#in_process');
	
	try {
		// code to produce callback value from URL
		URL = window.location.href;
		window.document.login.url_callback.value = URL;
	} catch(err) {
		// unhandled errors to fail silently
	}
	
	/// if on testing server
	if(URL.indexOf('.ryerson.ca:2082/') > 0 || URL.indexOf('.ryerson.ca:444/') > 0)
	{
	
		//EZtoWAN();
	}
}
