function checkForm(){
	if(document.all['nameField'].value==""){
		alert("\"Name\" field should be filled!");
		return false;
	}
	if(document.all['emailField'].value==""){
		alert("\"E-mail\" field should be filled!");
		return false;
	}
	if(document.all['textField'].value==""){
		alert("\"Your question, comment or suggestion\" field should be filled!");
		return false;
	}
	if(document.all['subjectField'].value==""){
		alert("\"Subject\" field should be filled!");
		return false;
	}

	return true;
}

function onFamilySelectASP(){
	var sel=document.all.family_select;
	var value=sel.options[sel.selectedIndex].value;
	if(value==0)
		return;
	
	var t_url="product_family.asp?familyid=";
	document.URL=t_url+value;
}

function onFamilySelectHTML(){
	var sel=document.all.family_select;
	var value=sel.options[sel.selectedIndex].value;
	if(value==0)
		return;
	
	var t_url="product_family_"+value+".html";
	document.URL=t_url;
}

function chechSearchForm(){
	if(document.all['form_productName'].value=="" && document.all['form_productCAS'].value==""){
		alert("\"productName\" or \"productCAS\" fields should not be both Empty!");
		return false;
	}

	return true;
}

function chechQuickSearchForm(){
	if(document.all['quickform_productName'].value==""){
		alert("\"productName\" fields should not be both Empty!");
		return false;
	}

	return true;
}

function quickformTextOnFocus(){
	document.all['quickform_productName'].value="";
}

function quickformTextOnBlur(){
	if(document.all['quickform_productName'].value=="")
		document.all['quickform_productName'].value="Search Our Products";
}

function flashEnded(){
    document.getElementById("top-flash-div").style.display = "none";
    $("#top-image-div").fadeIn(3000);
}

function showMore(shortdiv, fulldiv){
	document.getElementById(shortdiv).style.display="none";
	document.getElementById(fulldiv).style.display="block";
	}

function closeShowMore(shortdiv, fulldiv){
	document.getElementById(fulldiv).style.display="none";
	document.getElementById(shortdiv).style.display="block";
	}

var minWidth = 1000;
var lastRun = null;

function resizeWindow(){
	/*
	var now = new Date().getTime();
	if(lastRun != null && (now-lastRun) < 1000){
		return;
	}else{
		lastRun = now;
		}
	
	var _width = parseInt(document.body.clientWidth);
	if(_width < minWidth){
		document.getElementById("main-table").style.width = minWidth + "px";
	}else{
		document.getElementById("main-table").style.width = "100%";
		}*/
	}

window.onresize=function(){
	//resizeWindow();
	}

window.onload=function(){
	//resizeWindow();
	}