function showTabHint (hint_code) {
	
	objHintContainer = document.getElementById("hint_area");
	
	if (hint_code == 'member_benefits') {
		objHintContainer.innerHTML = "&nbsp;Learn about valuable benefits available to SGIA members";
	}
	else if (hint_code == 'garment') {
		objHintContainer.innerHTML = "&nbsp;T-shirts, caps, heat transfers, leather and more";
	}
	else if (hint_code == 'graphic_imagers') {
		objHintContainer.innerHTML = "&nbsp;Vehicle wraps, POP, signs, fabric, decals, posters and more";
	}
	else if (hint_code == 'suppliers') {
		objHintContainer.innerHTML = "&nbsp;Resources for the industry supplies and/or equipment manufacturers";
	}
	else if (hint_code == 'events') {
		objHintContainer.innerHTML = "&nbsp;Our trade shows, classes, workshops, meeting and other important events";
	}
	else if (hint_code == 'vts') {
		objHintContainer.innerHTML = "&nbsp;Visit and research hundreds of companies exhibiting at our virtual trade show";
	}
	else if (hint_code == 'industrial_use') {
		objHintContainer.innerHTML = "&nbsp;Specialty imaging in the manufacturing world";
	}	
	else if (hint_code == 'search') {
		objHintContainer.innerHTML = "&nbsp;Use the SGIA Information Network Search to get the answers you need.";
	}		
	return true;
}

function hideTabHint () {
	objHintContainer = document.getElementById("hint_area");
	objHintContainer.innerHTML = "&nbsp;";
	return true;
}

function openvrmWindow(url, name) {
	// optional params:  width, height, returnWhat - must be constant string: 'returnWinObj'
	var a;
	a=openvrmWindow.arguments; 
	if (a.length > 2 ) {
		winWidth = a[2];
		winHeight = a[3];
	}
	else {
		winWidth = 550;
		winHeight = 450;
	}
	
	popupWin = window.open(url, name,"menubar=no,toolbar=no,location=no,status=yes,resizable,dependent,scrollbars,width="+winWidth+",height="+winHeight+",left=250,top=50");
	if (window.focus) { 
 		popupWin.focus();
	}
	
	for (argIdx=0; argIdx < a.length; argIdx++ ) {
		if ( a[argIdx] == 'returnWinObj' ) {
			return popupWin;
		}
	}
	
}

function ValEmail (obj, msg) {
    var str = obj.value;
    if ( str != "" ) {
		if ( !str.match(/^\w+([\.\-]\w+)*@\w+([\.\-]\w+)*\.\w+$/)) {
			if ( msg == "" ) {
                alert('Please check your email address to make sure it is correct!');
            }
            else {
                alert(msg);
            }
			obj.focus();  //
			return false;
		}
		else {
			return true;
		}
	}
	else {	
		if ( msg == "" ) {
			alert('Please enter the Email Address!');
        }
        else {
        	alert(msg);
	    }
		obj.focus();
		return false;
	}
}

function validateCC(objForm) {

	// Check Credit Card data
	CCtypeChecked = false;
	for (i=0; i < objForm.cctype.length; i++)
   	{
		if (objForm.cctype[i].checked) {
			CCtypeChecked = true;
			break;
		}
	}
	if (! CCtypeChecked) {
		alert('Please choose a Credit Card type.');
		objForm.cctype[0].focus();
   		return false;	
	}
	
	if ( objForm.ccnum.value.length == 0) {
		alert('Credit Card number is required.');
		objForm.ccnum.focus();
   		return false;
	}
	if ( objForm.ccname.value.length == 0) {
		alert('Name on the Credir Card is required.');
		objForm.ccname.focus();
   		return false;
	}
	if ( objForm.ccexp.value.length == 0) {
		alert('Credit Card Expiration Date is required.');
		objForm.ccexp.focus();
   		return false;
	}
	else {
		var str = objForm.ccexp.value;
	
		if ( str.match(/^\d\d\/\d\d$/)) {
		}
        else {
			objForm.ccexp.focus();
            alert("Please enter your credit card expiration date\nin the following format: mm/yy");
			return false;

        }
	}
	
	return true;
}

/* -----------------------------------------------
   Floating layer - v.1
   (c) 2006 www.haan.net
   contact: jeroen@haan.net
   You may use this script but please leave the credits on top intact.
   Please inform us of any improvements made.
   When usefull we will add your credits.
  ------------------------------------------------ */


function setVisible(strObj)
{
	obj = document.getElementById(strObj);
	
	// window.onscroll = setTimeout("placeIt('"+strObj+"')",500);
	
	obj.style.visibility = (obj.style.visibility == 'visible') ? 'hidden' : 'visible';
	if (obj.style.visibility == 'visible') {
		placeIt(strObj);
	}
}
function placeIt(strObj)
{
	x = 20;
	y = 70;

	obj = document.getElementById(strObj);
	if (document.documentElement)
	{
		theLeft = document.documentElement.scrollLeft;
		theTop = document.documentElement.scrollTop;
	}
	else if (document.body)
	{
		theLeft = document.body.scrollLeft;
		theTop = document.body.scrollTop;
	}
	theLeft += x;
	theTop += y;
	obj.style.left = theLeft + 'px' ;
	obj.style.top = theTop + 'px' ;
	setTimeout("placeIt('"+strObj+"')",500);
}



