			
			function blackout(keep){
				var winWidth = $j(document).width();
				var winHeight = $j(document).height();
				if($j('#blackout').length == 0) {
					$j(document.body).append('<div id="blackout"></div>');
					$j('#blackout').css('height',winHeight+'px');
					$j('#blackout').css('width',winWidth+'px');
					$j('#blackout').css('position','absolute');
					$j('#blackout').css('display','block');				
					$j('#blackout').css('background-color','#000000');
					$j('#blackout').css('opacity','0.7');
					$j('#blackout').css('-moz-opacity','0.7');
					$j('#blackout').css('khtmlopacity','0.7');
					$j('#blackout').css('filter','alpha(opacity=70)');
				} else {
					if(keep == true) {
						return true;
					} else if(keep == 'hide') {
						$j('#blackout').hide();
					} else if(keep == 'show') {
						$j('#blackout').show();
					} else if(typeof keep == 'undefined' || typeof keep == 'null') {
						$j('#blackout').toggle();
					}
				}			
				
			}
			
			function htmlPopup(name,content,iw,ih,header) {
				if(typeof name == 'undefined' ||
				   typeof name == 'null') {
					name = 'htmlPop';
				}
				var aw = $j(window).width();
				var ah = $j(window).height();
				var st = $j(document).scrollTop();
				var sl = $j(document).scrollLeft();
				
				//check fox px
				
				if(iw.toString().indexOf('px') != -1) {
					var w = iw.toString().substr(0,iw.toString().indexOf('px'));
				} else {
					var w = aw * iw;
				}
				if(iw.toString().indexOf('px') != -1) {
					var h = ih.toString().substr(0,ih.toString().indexOf('px'));
				} else {
					var h = ah * ih;
				}
				
				var ch = h;
				var headh = 0;
				var theHtml = '';
				if($j('#'+name).length == 0) {
					$j(document.body).append('<div id="'+name+'" class="popup-html"><div class="popup-content"></div></div>');				
				}
				
				/* include header */
				if(typeof header != 'undefined' &&
				   typeof header != 'null') {
					
					if($j('#'+name+' .popup-header').length == 0) {
						if(header.substring(0,1) == '#') {
							$j('#'+name).prepend('<div class="popup-header">'+$j(header).html()+'</div>');
						} else {
							$j('#'+name).prepend('<div class="popup-header">'+header+'</div>');
						}
					}
					
					//new content height
					headh = $j('#'+name+' .popup-header').height();
					if(typeof headh == 'undefined' || typeof headh == 'null') {
						headh = 0;
					}
					
					ch = (h-headh);
					h = parseFloat(h) + parseFloat(headh);
				}
	
				var t = ((ah - h)/2)+st;
				var l = ((aw - w)/2)+sl;

				
				$j('#'+name).css('background-color','#ffffff');
				$j('#'+name).css('width',w+'px');
				$j('#'+name).css('height',h+'px');	
				$j('#'+name).css('position','absolute');
				$j('#'+name).css('zIndex',999);
				$j('#'+name).css('top',t+'px');
				$j('#'+name).css('left',l+'px');				
				$j('#'+name).show();
				
				if(content.substring(0,1) == '#') {
					theHtml = $j(content).html();
				} else {
					theHtml = content;
				}
				$j('#'+name+' .popup-content').css('width',w+'px');
				$j('#'+name+' .popup-content').css('height',ch+'px');
				$j('#'+name+' .popup-content').css('overflow','auto');
				$j('#'+name+' .popup-content').html(theHtml);
			}
			
			function windowsLoaderAdd(func) {
				windowsLoader[windowsLoader.length] = func;
			}
			function windowsLoadFunc() {
				for(i=0;i<windowsLoader.length;i++) {
					eval(windowsLoader[i]);
				}
			}
			function loadFunc() { window.onload = windowsLoadFunc;}
			windowsLoader = new Array();
			
			function setState(w) {
				if(w.value != 'US') {
					$('state').value = '99';
					$('state').disabled = true;
					$('state_outside').disabled = false;
				} else {
					$('state').value = '0';
					$('state').disabled = false;
					$('state_outside').disabled = true;
				}
					
			}
			
			
			function popUp(theURL, Name, popW, popH, scroll) { 
					var winleft = (screen.width - popW) / 2;
					var winUp = (screen.height - popH) / 2;
					winProp = 'width='+popW+',height='+popH+',left='+winleft+',top='+winUp+',scrollbars='+scroll+',resizable'
					Win = window.open(theURL, Name, winProp)
					if (parseInt(navigator.appVersion) >= 4) { Win.window.focus(); }
			}
			
			function verify_country(country,stateID) {
				
				var state = document.getElementById(stateID);
				if(state) {
					if(country.options[country.selectedIndex].text == "US") {
						state.disabled = false;
					} else {
						state.disabled = true;
					}
				}
				
			}
			
			function accept() {
				if(document.forms[0].agree.checked) {
					return true;
				} else {
					alert('You must accept our Terms and Conditions');
					return false;
			
				}
			}
			
			function mOvr(src,clrOver) {
				if (!src.contains(event.fromElement)) {
				  src.style.cursor = 'default';
				  src.bgColor = clrOver;
				}
			  }
			  
			function mOut(src,clrIn) {
				if (!src.contains(event.toElement)) {
				  src.style.cursor = 'default';
				  src.bgColor = clrIn;
				}
			  }
			function mClk(src) {
				document.location.href=src;
				/*if(event.srcElement.tagName=='TR'){
				   src.children.tags('A')[2].click();
				}*/
			  }
			
			function doCheckout(form) {
				if(!accept()) {
					return false;
				} 
				form.submit.disabled=true;
			}
			
			//check all
			function checkAll(field,type,theclass) {
				
				if(!type) {
					type = 'checkbox';
				}
							
				if(field.checked) {					
					if(typeof theclass != 'undefined') {
						if($j(':'+type).hasClass(theclass)) {						
							$j('.'+theclass).attr('checked',true);
						} else {
							return false;
						}
					} else {	
						$j(':'+type).attr('checked',true);						
					}
				} else {
					if(typeof theclass != 'undefined') {
						if($j(':'+type).hasClass(theclass)) {						
							$j('.'+theclass).attr('checked',false);
						} else {
							return false;
						}
					} else {	
						$j(':'+type).attr('checked',false);
					}
				}
				
				$j(':'+type).select();
			}

			function Delete(m) {
				if(!window.confirm(m)) { 
					return false;
				}
				return true;
			}
