function Rcertify() 
{
popupWin = window.open('http://www.bbbonline.org/cks.asp?id=10310021342836004', 'Participant','location=yes,scrollbars=yes,width=450,height=300'); 
window.name = 'opener';
} 

function viewCart(command){

var scriptName = "quikstore.cgi";
var linkURL = "http://www.nisimhair.com/cgi-bin/quikstore.cgi";
var task = "?view_cart=yes"
if(command == "checkout"){
     task = "?checkout=yes"
}
linkURL += task;

	var myLocation = unescape(document.location);
	myLocation = myLocation.substring(1).split('/');

     if(myLocation[myLocation.length - 1].substring(0,scriptName.length) == scriptName){

          // GET Requests
		var qsQuery = unescape(document.location.search.replace(/\+/g,' '));
        qsQuery = qsQuery.replace('?','&');
        qsQuery = qsQuery.replace("checkout=yes&",'');
        qsQuery = qsQuery.replace("view_cart=yes&",'');

          if(qsQuery.length > 1){
     		linkURL += qsQuery;
          }
          else{
               for(i = 0; i < document.forms[0].elements.length; i++){
                    var inType = document.forms[0].elements[i].type;
                    if(inType == "hidden"){
                         var fieldName = document.forms[0].elements[i].name;
                         var fieldValue = document.forms[0].elements[i].value;
                         if(fieldName == "view_cart"){
                            continue;
                         }
                         if(fieldName == "checkout"){
                            continue;
                         }
                         if(fieldValue != "shipping.html"){
                              qsQuery += "&" + fieldName + "=" + fieldValue;
                         }
                    }
               }
               linkURL += qsQuery;
          }
     }
     else{
          var PAGE = myLocation[myLocation.length - 1];
          linkURL += "&page=" + PAGE + "&store_type=html";
     }

document.location = linkURL;
}

function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=300,height=310,left =300,top =200');");
} 