<!--
function isNumber(String) { 
	var Letters = "1234567890"; //you can add new numbers or other characters
	var i;
	var c;
	if(String.charAt( 0 )=='-')
	return false;
	if( String.charAt( String.length - 1 ) == '-' )
	return false;
	for( i = 0; i < String.length; i ++ ) { 
		c = String.charAt( i );
		if (Letters.indexOf( c ) < 0)
		return false;
	}
	return true;
}

function check(theForm) {
	var flag=0;
	for(var i=0; i<theForm.size.length; i++) {  
		if(theForm.size[i].checked) {
			flag=1;
			break;
		}
	}
	if(!flag) {
		alert("Select a size please...");
		return false;
	}
	if	(!isNumber(theForm.qty.value) || theForm.qty.value == "" || theForm.qty.value == 0) {
		alert("The order number is illegal...");
		theForm.qty.focus();
		theForm.qty.select();
		return false;
	}
	return true;
}

function check_qty(theForm) {
	if	(!isNumber(theForm.qty.value) || theForm.qty.value == "" || theForm.qty.value == 0) {
		alert("The order number is illegal...");
		theForm.qty.focus();
		theForm.qty.select();
		return false;
	}
	return true;
}

function check_search(theForm) {
	if (theForm.keywords.value == "" || theForm.keywords.value == "please input the keywords") {
		alert("Please input the keywords...");
		theForm.keywords.focus();
		return false;
	}
	return true;
}

function check2(theUpdateForm) {
	if	(!isNumber(theUpdateForm.update_qty.value) || theUpdateForm.update_qty.value == "" || theUpdateForm.update_qty.value == 0) {
		alert("The order number you updated is illegal...");
		theUpdateForm.update_qty.focus();
		theUpdateForm.update_qty.select();
		return false;
	}
	return true;
}

function checkKeywords(keyWords,n) {
	if (n == 0 && keyWords.value == "please input the keywords"){keyWords.value="";}
	if (n == 1){
		if(keyWords.value == "please input the keywords"){keyWords.value="";}
	}
	if (n == 2 && keyWords.value == ""){keyWords.value = "please input the keywords";}
}

scores = new Array(20);
var numTotal=0;
NS4 = (document.layers) ? 1 : 0;
IE4 = (document.all) ? 1 : 0;
ver4 = (NS4 || IE4) ? 1 : 0;
if (ver4) { 
	with (document) {  
		write("<STYLE TYPE='text/css'>");        
		if (NS4) {            
			write(".parent {position:absolute; visibility:visible}");
			write(".child {position:absolute; visibility:visible}");
			write(".regular {position:absolute; visibility:visible}");       
		} else { 
			write(".child {display:none}");
		}        
	write("</STYLE>");
	}
}

function getIndex(el) {
	ind = null;
	for (i=0; i<document.layers.length; i++) {
		whichEl = document.layers[i];
		if (whichEl.id == el) {
			ind = i;
			break;
		}
	}
	return ind;
}

function arrange() {    
	nextY = document.layers[firstInd].pageY +document.layers[firstInd].document.height; 
	for (i=firstInd+1; i<document.layers.length; i++) {
		whichEl = document.layers[i];
		if (whichEl.visibility != "hide") {  
			whichEl.pageY = nextY;
			nextY += whichEl.document.height;
		}    
	}
}

function initIt() { 
	if (!ver4) return;
	if (NS4) {
		for (i=0; i<document.layers.length; i++) {
			whichEl = document.layers[i];
			if (whichEl.id.indexOf("Child") != -1) {
				whichEl.visibility = "hide";
			}
		}        
		arrange();
	} else {
		divColl = document.all.tags("DIV");
		for (i=0; i<divColl.length; i++) {
			whichEl = divColl(i);
			if (whichEl.className == "child") {
				whichEl.style.display = "none";
			}
		}
	}
}

function expandIt(el) {	
	if (!ver4) return;
	if (IE4) {
		whichEl1 = eval(el + "Child");
		for (i=1;i<=numTotal;i++) {
			whichEl = eval(scores[i] + "Child");
			if(whichEl!=whichEl1) {
				whichEl.style.display = "none";
			}
		}
		whichEl1 = eval(el + "Child");
		if (whichEl1.style.display == "none") {
			whichEl1.style.display = "block";
		} else {
			whichEl1.style.display = "none";
		}
	} else {
		whichEl = eval("document." + el + "Child");
		for (i=1;i<=numTotal;i++) {
			whichEl = eval("document." + scores[i] + "Child");	
			if(whichEl!=whichEl1) {	
				whichEl.visibility = "hide";
			}
		}
		if (whichEl.visibility == "hide") {
			whichEl.visibility = "show";
		} else {
			whichEl.visibility = "hide";
		}
		arrange();
	}
}
onload = initIt;
//-->

