var GlobalActive = null;
function ResizeFormIframe(formHeight)
{
	if(formHeight){
	document.getElementById("FormIframe").style.height=formHeight;
	}
}
function mOver(obj){
	var hilight, oLink;
	if (obj == null){
		return;
	}
	if (obj.tagName != "TD"){
		return;
	}
	obj.style.textDecoration="underline"; 
}
function mOut(obj){
	var hilight, oLink;
	if (obj == null){
		return;
	}
	if (obj.tagName != "TD"){
		return;
	}
	obj.style.textDecoration=""; 
}
function LoadPage( Link ){ 
	if (Link != ""){
		location.href = Link;
	}
}
function popwin(url, args, features)
{
var dwin;
dwin = showModelessDialog(url, args, features);
}
function LegalInformation()
{
var dlog;
//dlog = showModelessDialog("infopages/Legal+Information","", "dialogWidth:750px; dialogHeight:600px");
dlog = window.open("infopages/Legal+Information","","statusbar=no,resizable=yes,width=750,height=600"); 
}
function UploaderFlashDemo()
{
var dlog;
//dlog = showModelessDialog("http://www.docova.tv/videos/dlitools/Uploader/Uploader.html","", "dialogWidth:825px; dialogHeight:610px");
dlog = window.open("http://www.docova.tv/videos/dlitools/Uploader/Uploader.html","","statusbar=no,resizable=yes,width=825,height=610"); 
}
function thingFactoryFlashDemo()
{
var dlog;
//dlog = showModelessDialog("http://www.dlitools.com/webtools/Overviews/thingFactory/thingFactory.html","", "dialogWidth:815px; dialogHeight:650px");
dlog = window.open("http://www.dlitools.com/webtools/Overviews/thingFactory/thingFactory.html","","statusbar=no,resizable=yes,width=815,height=650"); 
}
function showFlashDemo(url)
{
var dlog;
//dlog = showModelessDialog(url,'', 'dialogWidth:810px; dialogHeight:665px');
dlog = window.open(url,"","statusbar=no,resizable=yes,width=810,height=665"); 
}
function LoadContentEvent(url)
{
var doc = document.all
doc.LoadContent.src = url
}
function highlight_item(e, state)
{
source_element = event.srcElement;
if (source_element.className=="menuitems")
	source_element.style.borderStyle = state
if (source_element.parentElement.className=="menuitems")
	source_element.parentElement.style.borderStyle = state
}
function CreateFeedback()
{
var dlog
//dlog = showModelessDialog("Feedback?OpenForm","", "dialogWidth:600px; dialogHeight:375px")
window.open("Feedback?OpenForm", "Feedback", "height=375, width=750")
}
function ShowPolicyDoc()
{
var dlog
//dlog = showModelessDialog("infopages/Ordering+Information+and+Policies","", "dialogWidth:700px; dialogHeight:500px")
dlog = window.open("infopages/Ordering+Infomation+and+Policies","","statusbar=no,resizable=yes,width=700,height=500"); 
}
function ShowPrivacyDoc()
{
var dlog
//dlog = showModelessDialog("infopages/privacy+statement","", "dialogWidth:600px; dialogHeight:250px")
dlog = window.open("infopages/privacy+statement","","statusbar=no,resizable=yes,width=600,height=250"); 
}
function ShowRefundDoc()
{
var dlog
//dlog = showModelessDialog("infopages/Refund+Policy","", "dialogWidth:600px; dialogHeight:500px")
dlog = window.open("infopages/Refund+Policy","","statusbar=no,resizable=yes,width=600,height=500"); 
}
function format(expr, decplaces)
{
var str = "" + Math.round (eval(expr) * Math.pow(10, decplaces))
while (str.length <= decplaces){
   str = "0" + str
}
var decpoint = str.length - decplaces
return str.substring(0, decpoint) + "." + str.substring(decpoint, str.length)
}
function to_currency(expr)
{
return "US$" + format(expr, 2)
}
function openwin(winURL, winName, winoptions){
window.open(winURL, winName, winoptions)
}
function hasCookieSupport()
{
var cookieEnabled=(navigator.cookieEnabled)? true : false;
//if not IE4+ nor NS6+
if (typeof navigator.cookieEnabled=="undefined" && !cookieEnabled)
	{ 
		document.cookie="testcookie";
		cookieEnabled=(document.cookie=="testcookie")? true : false;
		document.cookie="" //erase dummy value;
	}
	return cookieEnabled;
}
function CreateChatWindow()
{
window.open('/generalc.nsf/indexTools?openpage', 'chatterbox', 'height=400,width=220,menubar=no,top=150,left=300,resizable=no,screenY=150,screenX=300')
 }  
function CreatePopupWindow(url, dbRelative, width, height)
{
var targetUrl = (dbRelative)? "/dlitools/dlitoolshome.nsf" + "/" + url : url;
window.open(targetUrl, 'preview', 'height=' + height + ',width=' + width + ',menubar=no,top=150,left=300,resizable=no')
 }  
//============= Developments subscription functions =============
function validateDevelopmentsSubscription(dForm)
{
	if(dForm.EmailAddress.value==""){
	alert("Please enter your email address");
	return false;
	}
}
function clearInfoText(field, infoText)
{
	if(field.value==infoText){
	field.value="";
	}
}
