function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}
if (parent.frames[1])
 parent.location.href = self.location.href;

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

var oldCellColor = "#000";
function focusRow(row) {
	var cells = row.cells;
	if (!cells) return;
	oldCellColor = cells[0].style.backgroundColor;
	for (var i=0;i<cells.length;i++) {
		cells[i].style.backgroundColor='whitesmoke';
	}
}
function blurRow(row) {
	var cells = row.cells;
	if (!cells) return;
	for (var i=0;i<cells.length;i++) {
		cells[i].style.backgroundColor=oldCellColor;
	}
}

function Coupon() {
CouponWindow=window.open('http://www.carfax.com/cfm/coupon.cfm?name=','samplewin', 'width=450, height=360, toolbar=yes, scrollbars=yes') 
}

function verifyForm(){
   var errors      = 0;
   var errorMsg    = "Please correct the following errors:\n";

	 if (document.contact.realname.value == ""){
	      errorMsg = errorMsg + "- Name has not been entered.\n";
	      errors++;
	  	}
	   if (document.contact.email.value == ""){
	      errorMsg = errorMsg + "- Email Address has not been entered.\n";
	      errors++;
	  	}
	 if (document.contact.phone.value == ""){
	       errorMsg = errorMsg + "- Phone Number has not been entered.\n";
	       errors++;
	     }
	   if (errors > 0){
	      alert(errorMsg);
				return false;
	   }else{
		  	return true;
    	}
	}
function nomarginPOP(imagesrc, winwidth, winheight){
	LeftPosition = (screen.width) ? (screen.width-winwidth)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-winheight)/2 : 0;
	var look='width='+winwidth+',height='+winheight+',top='+TopPosition+',left='+LeftPosition+','
	popwin=window.open("","",look)
	popwin.document.open()
	popwin.document.write('<html><head><title>Swift Used Cars</title></head><body bgcolor=white scroll=no topmargin=0 leftmargin=0 rightmargin=0 bottomargin=0 marginheight=0 marginwidth=0><div style="position: absolute; top:0px;left:0px"><a href="javascript:window.close()"><img src="'+imagesrc+'" width="'+winwidth+'" height="'+winheight+'" border="0"></a></div></body></html>')
	popwin.document.close()
}
