function check_update_form()
{
var the_img_name= document.getElementById('the_img_name').value;
if(((the_img_name.indexOf("Example")==-1)) ||(the_img_name.length<11))
	{
		alert("You need to enter valid Example number");
		return false;
	}
}

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_620_450(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=620,height=450').focus()
}

function OpenWin_1100_740(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=1100,height=740').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')
}


function changeCountry(box) {
          x1 = box.value
          var selObj = document.getElementById('country');
          var selIndex = selObj.selectedIndex;
          var selValue = selObj.options[selIndex].text
          document.getElementById('countryName').value = selValue

      }

function changeType(box) {

  x1 = box.value
  var selObj = document.getElementById('theType');
  var selIndex = selObj.selectedIndex;
  var selValue = selObj.options[selIndex].text
  document.getElementById('messageType').value = selValue

}

  function check() {

      var strName = document.feedback.name.value;
      if (strName == "") {
          alert("Please enter your name");
          return false;
      }
      var str = document.feedback.email.value;
      if (str == "") {
          alert("Please enter your Email");
          return false;
      }
      var result = false;
      var theStr = new String(str);
      var index = theStr.indexOf("@");
      if (index > 0) {
          var pindex = theStr.indexOf(".", index);
          if (!((pindex > index + 1) && (theStr.length > pindex + 1))) {
              alert("Email is invalid");
              return false;
          }
      }
      else {
          alert("Email is invalid");
          return false;
      }
      var message1 = document.feedback.message.value;
      if (message1 == "") {
          alert("Please enter a message");
          return false;
      }

  }

function show_see_more(num) {
        document.getElementById("row" + num).style.display = 'block';
        document.getElementById("ahref" + num).style.display = 'none';
        document.getElementById('ahref_less' + num).style.display = 'block';
}
    
function show_see_less(num) {
        document.getElementById('row' + num).style.display = 'none';
        document.getElementById('ahref' + num).style.display = 'block';
        document.getElementById('ahref_less' + num).style.display = 'none';
}

function openArticle(article_ID) {
    if (article_ID == 1) {
        document.location.href = "#name1";
    }

    if (article_ID == 4) {
        document.location.href = "#name4";
    }

    if (article_ID == 5) {
        document.location.href = "#name5";
    }

    if (article_ID == 8) {
        document.location.href = "#name8";
    }
    if (article_ID == 9) {
        document.location.href = "#name9";
    }

    if (article_ID == 10) {
        document.location.href = "#name10";
    }
    if (article_ID == 11) {
        document.location.href = "#name11";
    }

    if (article_ID == 12) {
        document.location.href = "#name12";
    }
    show_see_more(article_ID);
}

