function checkVariation(frm){
  frm = document.frmEnquire;
  if(frm.v.value == "undefined"){
    return true;
  }else{
    if(frm.v.value == "null"){
      alert("Please select a variation to enquire about.");
      return false;
    }else{
      return true;
    }
  }
}


function openBrWindow(url,winName,features) {
  window.open(url,winName,features);
}

function MM_findObj(n, d) { // v4.01  
  var p,i,x;  if(!d) d=document;  
  if((p=n.indexOf("?"))>0&&parent.frames.length) {  
      d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}  
    if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++)  
  x=d.forms[i][n];  
    for(i=0;!x&&d.layers&&i<d.layers.length;i++)  
  x=MM_findObj(n,d.layers[i].document);  
    if(!x && d.getElementById) x=d.getElementById(n); return x;  
}

function quickJump(frm){
  //alert(frm.destination.value);
  var r = new String(frm.destination.value);
  var a = new Array();
  var u = new String();
  a = r.split("|");
  if(a[0] == "c"){ // Jump to category
    u = "/category/" + a[1] + "/";
  }else if(a[0] == "t"){
    u = "/category/" + a[1] + "/type/" + a[2];
  }else{
    return false;
  }
  document.location.href = u;
}

function setFrmVal(pcode){
  frm = document.frmEnquire;
  frm.c.value = pcode;
}

