//***************************************************************************************
//*	Copyright © 2005-2010, Digital Innovations, Inc.	All Rights Reserved.			*
//*																						*
//*	FILE:		scripts.js																*
//*	AUTHOR(S):	Philip L. Butler														*
//*																						*
//***************************************************************************************

function popup_window(url)
{
	popupwin = window.open(url,"PopUp","height=350,width=465,scrollbars=yes,resizable=yes");
	popupwin.focus();
}
 
// We are going to catch the CR key so that we can use it, Hooray!
function dii_form_keypress(item,e,thefrm)		// used for all but MSIE
{
	if (navigator.appName.indexOf("Microsoft") != -1)
		return true;
	if(e.type=="keypress")
	{
		if(e.keyCode==13)
		{
			eval('document.'+thefrm+'.submit();');
			return false;
		}
	}
    return true;
}

function dii_form_keydown(item,e,thefrm)		// used for MSIE
{
	if (navigator.appName.indexOf("Microsoft") == -1)
		return true;
	if(e.type=="keydown")
	{
		if(e.keyCode==13)
		{
			eval('document.'+thefrm+'.submit();');
			return false;
		}
	}
    return true;
}

function dii_java_enabled()
{
//	if (navigator.appName == 'Microsoft Internet Explorer' && navigator.appVersionindexOf('MSIE 3'))
//		return false;
//	else
    	return navigator.javaEnabled();
}

function show_status(str)
{
	window.status = str
	return true
}

function clear_status()
{
	window.status = ''
	return true
}


//*************************************
//  roll_in, roll_out
//*************************************
var old_roll_color = "ffffff";

function dii_roll_out_color(item_id)
{
	item_id.style.background = old_roll_color;
	item_id.style.backgroundColor = old_roll_color;
}

function dii_roll_in_color(item_id, incolor)
{
	if (item_id.style.background)
	{
		old_roll_color = item_id.style.background; 
		item_id.style.background = incolor; 
	}
	else
	{
		old_roll_color = item_id.style.backgroundColor;
		item_id.style.backgroundColor = incolor;
	}
}




// Dropshadow... (moved to $gui->body_start() )
//$(document).ready(function(){
//  $("img.dropshadow")
//    .wrap("<div class='dropshadow_wrap1'><div class='dropshadow_wrap2'><div class='dropshadow_wrap3'></div></div></div>");
//});
