/*  *		Description:	 *		Javascript interface used from the Web pages (API) * *		Author: Mauro C. (Exor International) *		Date: Aug/2009 * *		Sample: *		- st003_Init('http://www.sitek.it/mauro/testCatalogo.nsf') *		- st003_LoadLicenseByOwner('myCallBack') * 		- st003_RegisterLicense('myCallback', '12345678901')  *		-  st003_OpenLotusDB()  * * *//* *		Function: st003_Init(dbFileName, [FORCERELOAD]) *		---------------------------------------------------------------------------------------------------------------------------------------- */var st003 = {	"prodFile":"null",		// http://www.sitek.it/mauro/testCatalogo.nsf	"forceReload":"false"}function st003_Init(prodFile, forceReload) {	st003.prodFile = prodFile;	if (typeof(forceReload) != "undefined")		st003.forceReload = forceReload;}function st003_szRand(separatore) {		// This is a random number to append at the end of the url to avoid caching	if (st003.forceReload=="FORCERELOAD") {		var random = new Date().getTime() ;		return separatore + random;	} else		return "";}/* *		Function: st003_LoadLicenseByOwner('myCallBack') *		Load json file *		---------------------------------------------------------------------------------------------------------------------------------------- */ function st003_LoadLicenseByOwner(callback) {//	var url = st003.prodFile + "/licenseByOwner?OpenAgent&Callback=" + callback + "&Owner=" + licenseOwner + st003_szRand('&');	var url = st003.prodFile + "/licenseByOwner?OpenAgent&Callback=" + callback + st003_szRand('&');	var script = document.createElement('script');	script.setAttribute('src', url);	document.body.appendChild(script);}/* *		Function: st003_RegisterLicense('myCallBack', 'serialNumber') *		Load json file *		---------------------------------------------------------------------------------------------------------------------------------------- */ function st003_RegisterLicense(callback, serial) {	var url = st003.prodFile + "/licenseRegistration?OpenAgent&Callback=" + callback + "&SN=" + serial	var script = document.createElement('script');	script.setAttribute('src', url);	document.body.appendChild(script);}/* *		Function: st003_OpenLotusDB() *		Load json file *		---------------------------------------------------------------------------------------------------------------------------------------- */ function st003_OpenLotusDB() {	var url = st003.prodFile 	url = url.replace('http://', "notes://");	window.top.location = url ;}/*																																	NOT-USED *		Function: st002_ajaxpage *		Asynchronous loading a page using Yahoo library * *		Include files: *		<script type="text/javascript" src="http://yui.yahooapis.com/2.6.0/build/utilities/utilities.js"></script> * *		Reference: *		http://developer.yahoo.com/yui/connection/ *		---------------------------------------------------------------------------------------------------------------------------------------- */function st002_ajaxpage (url, container, callback) {			var ajaxResponse = {		success:function(o) {			document.getElementById(container).innerHTML = o.responseText ;			if (typeof(callback) != "undefined")				eval(callback);		},		failure:function(o) {			alert("Ajax Loading Error");		},		cache:false	};		var transaction = YAHOO.util.Connect.asyncRequest('GET', url, ajaxResponse);}
