function checkAll(elm,name){
	for (var i = 0; i < elm.form.elements.length; i++){
		if (elm.form.elements[i].name.indexOf(name) == 0)
			elm.form.elements[i].checked = elm.checked;
	}
}

function MM_openBrWindow(theURL,winName,features) { // ver.2.0
  window.open(theURL,winName,features);
}

function openPatternWin(ptnID,zoom,w,h){
	var winName = "PatternView";
	var theURL = "imgPattern.php?ptnID=" + ptnID + "&x=" + zoom;
	var features = "width=" + w + ",height=" + h + ",scrollbars=no,resizable=yes";
	MM_openBrWindow(theURL,winName,features);
}
function OpenImgDetail(i1,zoom){
  if (window.screen.width < 1024) {
   window.open('imgPattern.php?ptnID='+ i1 + '&x='+zoom ,'','scrollbars=yes,height=600,width=600,resizable=yes');
   }
  else{ 
     window.open('imgPattern.php?ptnID='+ i1 + '&x='+zoom ,'','scrollbars=yes,height=600,width=600,resizable=yes');
  }   
 }
function submitFormNews(){ 
	document.formNews.submit();
}

function submitFormSearch(){ 
	document.formSearch.submit();
}

function SuBProfile(){
	var f = document.formRequest;
	f.action = "checkout.php";
	f.submit();
}
