////////////////////////////////////////////////////////////////////////////
//
//  utils.js
//
//	Utility functions
//
/////////////////////////////////////////////////////////////////////////////
var context = window.external.getContext();
/*
var isoNamespace = "http://www.isotools.com/namespaces/isotools";
var inlineNamespace = "http://www.isotools.com/namespaces/inline";
var xslNamespace = "http://www.w3.org/1999/XSL/Transform";
var htmlNamespace = "http://www.isotools.com/namespaces/HTML";
var cssNamespace = "http://www.isotools.com/namespaces/css";

function makeBoolean(str)
{
	if (str == "true") return true;
	if (str == "yes") return true;
	if (str == "1") return true;
	return false;
}

function urlToPath(url)
{
	var path = url;
	var re = /^file:\/\/\//;
	path = path.replace(re, "");
	re = /\//g;
	path = path.replace(re, "\\");
	return path;
}

function dumpHex(num)
{
	num = 0 + num;
	var res = "";
	while(num != 0) {
		var c = num % 16;
		num = (num-c) / 16;
		if (c < 10) res = String.fromCharCode(48 + c) + res;
		else res = String.fromCharCode(97 + c - 10) + res;
	}
	if (res.length < 8) res = ("00000000").substr(0, 8 - res.length) + res;
	return res;
}




function getLeftPosition(origin)
{
	var x = 0;
	while(origin != null) {
		if(typeof(origin.style.left) == "number") return x + origin.style.left;
		if(origin.offsetLeft != null) x += origin.offsetLeft;
		origin = origin.offsetParent;
	}
	return x;
}

function getTopPosition(origin)
{
	var x = 0;
	while(origin != null && origin.offsetTop != null) {
		if(typeof(origin.style.top) == "number") return x + origin.style.top;
		if(origin.offsetTop != null) x += origin.offsetTop;
		origin = origin.offsetParent;
	}
	return x;
}

var jStringRegExp = /([\\'"])/g;
function JString(str)
{
	return '"' + str.replace(jStringRegExp, "\\$1") + '"';
}

*/