function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function PopUp(sPicURL) { 
window.open(sPicURL, "", "top=0,left=0,resizable=1,HEIGHT=350,WIDTH=350,scrollbars=yes");
}

function isEmail(str) {
  var supported = 0;
  if (window.RegExp) {
    var tempStr = "a";
    var tempReg = new RegExp(tempStr);
    if (tempReg.test(tempStr)) supported = 1;
  }
  if (!supported) 
    return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
    var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
    var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$");
    return (!r1.test(str) && r2.test(str));
}

function checkForm(wName, wWidth, wHeight, wResize) {
	document.optin.OILB_EMAIL.value=trim(document.optin.OILB_EMAIL.value);
 if(isEmail(document.optin.OILB_EMAIL.value) == "") {
   alert("Your e-mail address seems not to be valid.");
   document.optin.OILB_EMAIL.focus();
   return false;
 }
	features = 'top=0,left=0,scrollbars=1,status=0,resizable=' + ((wResize) ? 0 : 0) + ((wWidth) ? ',width=' + wWidth : '') + ((wHeight) ? ',height=' + wHeight : '');
	popWin = window.open('', wName, features);
	if(popWin.focus) { popWin.focus(); }
	return true;
}

function trim(value) {
 startpos=0;
 while((value.charAt(startpos)==" ")&&(startpos<value.length)) {
   startpos++;
 }
 if(startpos==value.length) {
   value="";
 }
 else {
   value=value.substring(startpos,value.length);
   endpos=(value.length)-1;
   while(value.charAt(endpos)==" ") {
     endpos--;
   }
   value=value.substring(0,endpos+1);
 }
 return(value);
}

function makeWin(picpath, ww, wh) {
ww=ww+5;
wh=wh+55;
w1=window.open('','','width='+ww+',height='+wh+',status=no,toolbar=no,menubar=no,location=no');
w1.document.write("<html><head><title>The Product Wizard</title></head>");
w1.document.write("<body bgcolor='#FFFFFF' text='#000000'><p><img src=");
w1.document.write(picpath);
w1.document.write(">");
w1.document.write("<p align=center><font face='Tahoma' size='2'><b><a href='#' onclick=window.close()><font color='#000000'>close window</font></a></b></font> </p></body></html>");
};
