function validateSiteSearch(theform){
	var totalstrerrors="";
	if(theform.q.value=="" || theform.q.value=="search site" || theform.q.value==null){
		totalstrerrors += "Please Enter a Search Term\n";
	}
	if (totalstrerrors == ""){
		//theform.action="/Store/SearchResults";
    	theform.submitForm.disabled = true;
		//theform.submit;
    	return true;
  	}else{
    	alert(totalstrerrors);
    	theform.submitForm.disabled = false;
    	return false;
  	}
}
function popitup(url, width, height) {
	h = screen.height;
	if (h<900) {
		newwindow=window.open(url,'name','scrollbars=1,resizable=1,height=' +  h + ',width=' + width);
	} else {
		newwindow=window.open(url,'name','scrollbars=1,resizable=1,height=' +  height + ',width=' + width);
	}
	if (window.focus) {newwindow.focus()}
	return false;
}
function maximize(maxDiv){
	if(document.getElementById && document.createTextNode){
	  if(document.getElementById(maxDiv)){
		document.getElementById(maxDiv).className='maximized';
	  }
	}
}
function minimize(minDiv){
	if(document.getElementById && document.createTextNode){
	  if(document.getElementById(minDiv)){
		document.getElementById(minDiv).className='minimized';
	  }
	}
}
function changeHTML(HTMLelementID, newHTML){
	if(document.getElementById(HTMLelementID)){
			document.getElementById(HTMLelementID).innerHTML=newHTML;
	}
}

function newVideo(div){
	var v1 = new SWFObject("/flash/videoplayer.swf", "videoplayer", "400", "325", "9", "transparent");
	v1.addParam('allowScriptAccess', 'always');
	v1.addParam('wmode', 'transparent');
	v1.addVariable('fileURL', '/video/'+div+'.flv');
	v1.addVariable('imgURL', '/images/videos/'+div+'_large.jpg');
	v1.addVariable('a', 1);
	v1.useExpressInstall('expressinstall.swf');
	v1.write("videoDiv");
}
