

function changeButton(a, b){ 


		if (document.getElementById(a).className=='button_link_'+b+'_over') {
			document.getElementById(a).className='button_link_'+b;
		} else {
			document.getElementById(a).className='button_link_'+b+'_over';
		}
	
}

function changeColor(a){
	b = document.getElementById(a.name).className
	c = b+'_focus'
	document.getElementById(a.name).className=c

}
function changeBack(a){
	b = document.getElementById(a.name).className
	c = b.substring(0, b.length-6)
	document.getElementById(a.name).className=c
}
function showPop(popup_width, popup_height) {

	if (navigator.userAgent.indexOf("MSIE") > 0) {
		thisWidth = document.body.clientWidth
		thisHeight = document.body.clientHeight
		thisBrowser= "ie"
	} else {                                                
		thisWidth = window.innerWidth
		thisHeight = window.innerHeight
		thisBrowser= "not_ie"
	}

	document.getElementById('right_spacer').style.width=(830-popup_width)/2
	document.getElementById('left_spacer').style.width=(830-popup_width)/2
	if ((540-popup_height)/2 > 100) {
		document.getElementById('left_spacer').style.height=(thisHeight-popup_height)/2-100
	} else {
		document.getElementById('left_spacer').style.height=(thisHeight-popup_height)/2
	}

	document.getElementById('bottom_spacer').style.height=(thisHeight-popup_height)/2+100
	document.getElementById('coverFrame').style.width=popup_width+20
	document.getElementById('coverFrame').style.height=popup_height
	document.getElementById('coverLayer').className='showSearch'
}

function showPopNew(popup_width, popup_height) {

	thisWidth = document.body.scrollWidth
	thisHeight = document.body.scrollHeight
	thisBrowser= "ie"



	var ScrollTop = document.body.scrollTop;
	if (ScrollTop == 0) {
		if (window.pageYOffset)
			ScrollTop = window.pageYOffset;
		else
			ScrollTop = (document.body.parentElement) ? document.body.parentElement.scrollTop : 0;
	}
	ScrollTop = ScrollTop-80

	//thisX = getXY(document.getElementById('product_hold_'+categoryID+'_'+productID))

	document.getElementById('coverLayer').style.left=(thisWidth-popup_width)/2+'px'
	document.getElementById('coverLayer').style.top=100+ScrollTop

	document.getElementById('coverFrame').style.width=popup_width+'px'
	document.getElementById('coverFrame').style.height=popup_height+'px'
	document.getElementById('coverLayer').className='showPopup'
	document.getElementById('coverLayer2').style.display='inline'

	document.getElementById('coverLayer2').style.width=thisWidth+'px'
	document.getElementById('coverLayer2').style.height=thisHeight+20+'px'
	
	
	
}
function showPopFull(popup_width, popup_height) {

	if (navigator.userAgent.indexOf("MSIE") > 0) {
		thisWidth = document.body.clientWidth
		thisHeight = document.body.clientHeight
		thisBrowser= "ie"
	} else {                                                
		thisWidth = window.innerWidth
		thisHeight = window.innerHeight
		thisBrowser= "not_ie"
	}

	
	// LEFT SHOULD BE 350
	document.getElementById('left_spacer').style.width=350
	// RIGHT SHOULD BE WIDTH OF SCREEN - 350 - POPWIDTH
	document.getElementById('right_spacer').style.width=(thisWidth-popup_width)-370
	
		
	// LEFT SHOULD BE 215
	document.getElementById('left_spacer').style.height=215
	// RIGHT SHOULD BE HEIGHT OF SCREEN - 215 - POPHEIGHT
	document.getElementById('bottom_spacer').style.height=(thisHeight-popup_height)-113

//	alert(popup_height)

	document.getElementById('coverFrame').style.width=popup_width+20
	document.getElementById('coverFrame').style.height=popup_height
	document.getElementById('coverLayer').className='showSearch'
}


function showPopFull(popup_width, popup_height) {

	if (navigator.userAgent.indexOf("MSIE") > 0) {
		thisWidth = document.body.clientWidth
		thisHeight = document.body.clientHeight
		thisBrowser= "ie"
	} else {                                                
		thisWidth = window.innerWidth
		thisHeight = window.innerHeight
		thisBrowser= "not_ie"
	}

	
	// LEFT SHOULD BE 350
	document.getElementById('left_spacer').style.width=350
	// RIGHT SHOULD BE WIDTH OF SCREEN - 350 - POPWIDTH
	document.getElementById('right_spacer').style.width=(thisWidth-popup_width)-370
	
		
	// LEFT SHOULD BE 215
	document.getElementById('left_spacer').style.height=215
	// RIGHT SHOULD BE HEIGHT OF SCREEN - 215 - POPHEIGHT
	document.getElementById('bottom_spacer').style.height=(thisHeight-popup_height)-113

//	alert(popup_height)

	document.getElementById('coverFrame').style.width=popup_width+20
	document.getElementById('coverFrame').style.height=popup_height
	document.getElementById('coverLayer').className='showSearch'
}


function showPopReciept(popup_width, popup_height) {

	if (navigator.userAgent.indexOf("MSIE") > 0) {
		thisWidth = document.body.clientWidth
		thisHeight = document.body.clientHeight
		thisBrowser= "ie"
	} else {                                                
		thisWidth = window.innerWidth
		thisHeight = window.innerHeight
		thisBrowser= "not_ie"
	}


	
	// LEFT SHOULD BE 350
	document.getElementById('left_spacer').style.width=160
	// RIGHT SHOULD BE WIDTH OF SCREEN - 350 - POPWIDTH
	document.getElementById('right_spacer').style.width=(thisWidth-popup_width)-180
	
		
	// LEFT SHOULD BE 215
	document.getElementById('left_spacer').style.height=100
	// RIGHT SHOULD BE HEIGHT OF SCREEN - 215 - POPHEIGHT
	document.getElementById('bottom_spacer').style.height=(thisHeight-popup_height)-100

//	alert(popup_height)

	document.getElementById('coverFrame').style.width=popup_width+20
	document.getElementById('coverFrame').style.height=popup_height
	document.getElementById('coverLayer').className='showSearch'
}

function getwindowsize() {
	if (navigator.userAgent.indexOf("MSIE") > 0) {
		thisWidth = document.body.clientWidth
		thisHeight = document.body.clientHeight
		thisBrowser= "ie"
		thisHeight = eval(thisHeight-164)
	} else if (navigator.userAgent.indexOf("Saf") > 0) {   
		thisWidth = window.innerWidth
		thisHeight = window.innerHeight
		thisBrowser= "saf"
		thisHeight = eval(thisHeight-160)
	} else {      
		thisWidth = window.innerWidth
		thisHeight = window.innerHeight
		thisBrowser= "not_ie"
		thisHeight = eval(thisHeight-164)
	}
	
	thisH = eval(thisHeight-77-87)
//	alert(navigator.userAgent)
	//alert(thisBrowser)
	document.getElementById('growMe').style.height=thisHeight
	document.getElementById('footer_td').style.visibility='visible'
	document.getElementById('footer_td').style.display='inline'


}

/* REMOVES ALL CHARS THAT ARE NOT NUMBERS */
function onlyNum(whatField) {
	whatName = whatField.name
	a = eval('document.edit_form.'+whatName+'.value')
	holdString = ''
	for (i = 0; i < a.length; i++)  {
		thisChar = a.substring(i, i+1) 
		if ((thisChar != '0')  && (thisChar != '.')  && (thisChar != '1') && (thisChar != '2') && (thisChar != '3') && (thisChar != '4') && (thisChar != '5') && (thisChar != '6') && (thisChar != '7') && (thisChar != '8') && (thisChar != '9')) {
			eval('document.edit_form.'+whatName+'.value=\''+holdString+'\'')
		} else {
			holdString = holdString + thisChar
		}
	}
	eval('document.edit_form.'+whatName+'.value=\''+holdString+'\'')
}
function search_page() {
	a = document.search_form.SearchField.value
	if (a != '') {
		document.search_form.submit()
	}

}
/*

netscape = "";
ver = navigator.appVersion; len = ver.length;
for(iln = 0; iln < len; iln++) if (ver.charAt(iln) == "(") break;
netscape = (ver.charAt(iln+1).toUpperCase() != "C");



	if (navigator.userAgent.indexOf("MSIE") > 0) {
		thisWidth = document.body.clientWidth
		thisHeight = document.body.clientHeight
		thisBrowser= "ie"
	} else {                                                
		thisWidth = window.innerWidth
		thisHeight = window.innerHeight
		thisBrowser= "not_ie"
	}
//	alert(thisBrowser)
*/