/*Function that changes the URLs
  expects 4 possibilites, 2 sizes and stained or not == "1u","1s","2u", "2s" */

 
 
function CalcUrls2(price,optionid,id) {
   var types =new Array("1u","1s","2u", "2s");
   var curimg = document.getElementById(optionid).src;
   
   matchPos2 = curimg.search("images/box.gif"); 
    if(matchPos2 != -1)  {  
     document.getElementById(optionid).src = "images/checked.gif";
    
     for (it in types) {
        if (types[it]  !=  optionid) {
           //alert("it is" + it);
           document.getElementById(types[it]).src = "images/box.gif"; 
        }
     }
   } else {
      document.getElementById(optionid).src = "images/box.gif";
 
   }
    document.getElementById('next').href="theorderingprocess.php?cubms=" + cubms + "&cost="+ price + "&id=" +id + optionid; 
   //alert ("cur url is " + cururl + " cost repl " + costrepl);  
   
}

