function inValidCharSet(str,charset)
{
  var result = true;
  // Note: doesn't use regular expressions to avoid early Mac browser bugs  
  for (var i=0;i<str.length;i++)
    if (charset.indexOf(str.substr(i,1))<0)
    {
      result = false;
      break;
    }
  return result;
}

function validPositiveNum(value)
{
	if (!inValidCharSet(value,"0123456789") || parseInt(value)==0 )
       return false;
    return true; 
}

function validBiggerThen(value,min_value)
{
	if (!inValidCharSet(value,"0123456789") || parseInt(value) < min_value )
       return false;
    return true; 
}
function OpenWin_340_380(image_name)
{
	result_window = window.open(image_name,'_result_window','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=340,height=380').focus()
}
function OpenBigImage(image_name,width,height){
	//image_name = 'image.asp?image='+image_name
	result_window = window.open(image_name,'_result_window','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,screenX=20,left=200,screenY=200,top=20,width='+width+',height='+height)
	result_window.resizeTo(width,height)
}

function OpenWin_540_510(image_name)
{
	result_window = window.open(image_name,'_result_window','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=540,height=510').focus()
}
function openwin(par) {
popupWin=window.open('viewimg.asp?images/products/'+par,'remote3','width=200,height=150,top=100,left=100,scrollbars=yes,resizeble=yes')
}

