function pay(id) 
{ 
window.open("/merchant/checkout.asp?cpbm="+id,"","height=450,width=730,left=50,top=0,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");
}

function fucCheckNUM(NUM)
{
var i,j,strTemp;
strTemp="0123456789";
if ( NUM.length== 0)
return 0
for (i=0;i<NUM.length;i++)
{
j=strTemp.indexOf(NUM.charAt(i));	
if (j==-1)
{
return 0;
}
}
return 1;
}

function form1_onsubmit()
{
//newprice="Q_" & rs("Product_Id")
if ((fucCheckNUM(document.FORM1.newprice.value)==0) )
{	alert ("Member price inludes illegal characters!");
document.FORM1.newprice.focus();
return false;
}
}

function FrontPage_Form1_Validator(theForm)
{
  var checkOK = "0123456789-";
 // var checkStr = theForm.<%="Q_" & rs("Product_Id")%>.value;
  var allValid = true;
  var decPoints = 0;
  var allNum = "";
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
    allNum += ch;
  }
  if (!allValid)
  {
    alert("The number only!");
   // theForm.<%="Q_" & rs("Product_Id")%>.focus();
    return (false);
  }
  return (true);
}


function openwin(page,size)
{
window.open(page,"newuser","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,"+ size);
}

function winopen(url)
{
window.open(url,"","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=yes,width=700,height=600,top=100,left=100");
}

function MM_openBrWindow(theURL,winName,features) 
{
window.open(theURL,winName,features);
}



// Must launched on the body onload event handler for IE
// Use document.documentElement if you are in Compat mode
function resizeIframe() 
{
i = parent.document.getElementById(window.name)
iHeight = document.body.scrollHeight
i.style.height = iHeight + 5 + "px"
}

//to stop see source code by click right button
if (window.Event) 
{
document.captureEvents(Event.MOUSEUP); 
}

function nocontextmenu() 
	{
	event.cancelBubble = true
	event.returnValue = false;
	alert('You are welcome to visit our Website!');
	return false;
}

function norightclick(e) 
{
	if (window.Event) 
	{
	if (e.which == 2 || e.which == 3)
	alert('You are welcome to visit our Website!');
	return false;
	}
	else
	if (event.button == 2 || event.button == 3)
	{
	alert('You are welcome to visit our Website!');
	event.cancelBubble = true
	event.returnValue = false;
	return false;
	}
}
document.oncontextmenu = nocontextmenu; // for IE5+
//document.onmousedown = norightclick; // for all others

function openscriphtml()
{
if (navigator.appName!="Microsoft Internet Explorer")
   alert(" This does not work with Netscape browser!")
else
   {newwin=window.open('htmledit/editor.html','','width=544,height=294');
    newwin.focus();
   }
}

