/*function load(scriptName)
{
	var scriptElem = document.createElement('script'); 
	scriptElem.setAttribute('language','Javascript'); 
	scriptElem.setAttribute('type','text/javascript'); 
	scriptElem.setAttribute('src',ROOT_DIR+scriptName); 
	document.getElementsByTagName('head')[0].appendChild(scriptElem); 	
}*/

function recalc_iframe_totalPrice(obj) {
	
}


// Set the horizontal and vertical position for the popup
var PositionX = 100;
var PositionY = 100;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)
var defaultWidth  = 500;
var defaultHeight = 500;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows
var AutoClose = true;

if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;

function PopImage(imageURL,imageTitle){
	 window.open(SITE_PATH+'imagePopUp.asp?img='+imageURL+'&imageName='+imageTitle,null,'scrollbars=no,width=10,height=10,left=100,top=100')
}


function apply_ness_form_styles()
{
	var elements = document.getElementsByTagName("*");
	for (var i=0; i<elements.length; i++) {
		input = elements[i];
		if (input.tagName.toLowerCase()=='input' || input.tagName.toLowerCase()=='select' || input.tagName.toLowerCase()=='textarea') {

			if (input.getAttribute('required') == 'true') {
				input.style.backgroundColor = '#F6F6FF';
				var inputParentNode = input.parentNode;
				var img = document.createElement('img');
				img.setAttribute('src',SITE_PATH+'img/hot.gif')
				//inputParentNode.appendChild(document.createTextNode('(*)'))
				inputParentNode.appendChild(img);
			}
		
			try {
				if (input.getAttribute('type').toLowerCase() == 'button' || input.getAttribute('type').toLowerCase() == 'submit') {
					input.style.cursor = 'hand';
				}
			} catch(e) {}
			
			try {
				if (input.getAttribute('type').toLowerCase() == 'radio') {
					input.style.cursor = 'hand';
				}
			} catch(e) {}
			
			try {
				if (input.getAttribute('type').toLowerCase() == 'checkbox') {
					input.style.cursor = 'hand';
				}
			} catch(e) {}
		}
	}
}

function init()
{	
	apply_form_validator();
	apply_ness_form_styles();
}

window.onload = init;