var r={
  'special':/[\W]/g,
  'quotes':/['\''&'\"']/g,
  'notnumbers':/[^\d]/g
}

function valid(o,w){
  o.value = o.value.replace(r[w],'');
}


function addtext() {

if (document.frmtwo.itemname6.value>"")

	var itemname6 = document.frmtwo.itemname6.value += 'mm centre hole';
}




function verifylength()
  
{if (document.frmtwo.itemname2.value=="")

alert("Please select the length");
return false;
}
   
function verifylength2()

{
x=document.frmtwo.itemname2.value
  
if (x>800)

alert("Sorry but we can only go up to 800mm")
return false;
}


function verifywidth()
  
{
if (document.frmtwo.itemname3.value=="")
alert("Please select the width");
return false;
}

function verifywidth2()

{
x=document.frmtwo.itemname3.value
  
if (x>800)

alert("Sorry but we can only go up to 800mm")
return false;
}


function verifycolour()
  
{if (document.frmtwo.itemname4.value=="Select")

alert("Please select the colour");
return false;
   }

function verifyshape()
  
{if (document.frmtwo.itemname5.value=="Select")

alert("Please select the shape");
return false;
   }
   

function GetSelectedItem() {

chosen = ""
len = document.frmtwo.r1.length

for (i = 0; i <len; i++) {
if (document.frmtwo.r1[i].checked) {
chosen = document.frmtwo.r1[i].value
}
}

if (chosen == "") {
alert("No Location Chosen")
}
else {
alert(chosen) 
}
}





function calcacrshape()
{
A = document.frmtwo.quantity.value
B = document.frmtwo.itemname2.value
C = document.frmtwo.itemname3.value
D = 0.10+((B * C)*0.0001)
E = D
F = (10.00/A)
G = E+F
H = G*A
document.frmtwo.price.value = G.toFixed(2)
document.frmtwo.total.value = H.toFixed(2)
}




function circles()
  
{

if (document.frmtwo.itemname5.value=="Circle")

open ( "circles.html#circle" )


}



function squares()
  
{

if (document.frmtwo.itemname5.value=="Square")

open ( "squares.html#square" )


}







function alertshape()
  
{

if (document.frmtwo.itemname5.value=="Oval")

alert("You have selected an Oval shape - Could you please enter the Height of the Oval in the length box and the width of the Oval in the width box");

if (document.frmtwo.itemname5.value=="Rectangle")

alert("You have selected a Rectangle - Could you please enter the Height of the Rectangle in the length box and the width of the Rectangle in the width box");

if (document.frmtwo.itemname5.value=="Triangle")

alert("You have selected a Triangle - Could you please enter the Height of the Triangle in the length box and the width of the Triangle in the width box");

if (document.frmtwo.itemname5.value=="Equilateral triangle")

alert("You have selected an Equilateral Triangle - Could you please enter the Side length you require in the length box and the same size in the width box. Please note an Equilateral triangle is NOT the same height and width but all sides are equal lengths. If you select an Equilateral triangle and enter the same size in both boxes we will make all the sides this length.");

return false;

}



function calccircleprice()
{
A = document.frmtwo.quantity.value
B = document.frmtwo.itemname2.value
D = 0.10+((B * B)*0.0001)
E = D
F = (10.00/A)
G = E+F
H = G*A
document.frmtwo.price.value = G.toFixed(2)
document.frmtwo.total.value = H.toFixed(2)
}



function calcsquareprice()
{
A = document.frmtwo.quantity.value
B = document.frmtwo.itemname2.value
D = 0.10+((B * B)*0.0001)
E = D
F = (10.00/A)
G = E+F
H = G*A
document.frmtwo.price.value = G.toFixed(2)
document.frmtwo.total.value = H.toFixed(2)
}



   

var r={
  'special':/[\W]/g,
  'quotes':/['\''&'\"']/g,
  'notnumbers':/[^\d]/g
}

function valid(o,w){
  o.value = o.value.replace(r[w],'');
}





function verifydiameter()
  
{if (document.frmtwo.itemname2.value=="")

alert("Please select the diameter");
return false;
}





function verifycolour()
  
{if (document.frmtwo.itemname4.value=="Select")

alert("Please select the colour");
return false;
   }






