// JavaScript Document
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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 MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_nbGroup(event, grpName) { //v6.0
  var i,img,nbArr,args=MM_nbGroup.arguments;
  if (event == "init" && args.length > 2) {
    if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
      img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
      if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
      nbArr[nbArr.length] = img;
      for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
        if (!img.MM_up) img.MM_up = img.src;
        img.src = img.MM_dn = args[i+1];
        nbArr[nbArr.length] = img;
    } }

  } else if (event == "over") {
    document.MM_nbOver = nbArr = new Array();
    for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])? args[i+1] : img.MM_up);
      nbArr[nbArr.length] = img;
    }
  } else if (event == "out" ) {
    for (i=0; i < document.MM_nbOver.length; i++) {
      img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
  } else if (event == "down") {
    nbArr = document[grpName];
    if (nbArr)
      for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
    document[grpName] = nbArr = new Array();
    for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
      nbArr[nbArr.length] = img;
  } }
}

function ClearOfferDates(){
	document.all("txtOfferStart").value = "";
	document.all("txtOfferEnd").value = "";
	document.all("txtOfferPrice").value = "";
}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}


function OnOfferYes(){
	document.all("optOfferYes").checked = true;
}

//fill hidcat input field with category checkbox values
function DoCatCheckHidden(chkval){
	if (document.all("hidCat").value == "")
	{
		document.all("hidCat").value = document.all("hidCat").value + chkval;
	}
	else
	{
	document.all("hidCat").value = document.all("hidCat").value + "," + chkval;
	}
}

//validate Dealer Request and Price form
function CheckDealerRequest(chkval){
	if (document.all("ddlProductType").value == "0"){
		alert('Please select a product type!');
		document.all("ddlProductType").focus();
		document.MM_returnValue = false;
	}
	else if (document.all("ddlProduct").value == "0"){
		alert('Please select a product!');
		document.all("ddlProduct").focus();
		document.MM_returnValue = false;
	}
	else if (document.all("cboCountry").value == "0"){
		alert('Please select a country!');
		document.all("cboCountry").focus();
		document.MM_returnValue = false;
	}
	else if (document.all("txtName").value == ""){
		alert('Name cannot be blank!');
		document.all("txtName").focus();
		document.MM_returnValue = false;
	}
	else if (document.all("txtEmail").value == ""){
		alert('Email cannot be blank!');
		document.all("txtEmail").focus();
		document.MM_returnValue = false;
	}
	else if (document.all("txtTel").value == ""){
		alert('Telephone cannot be blank!');
		document.all("txtTel").focus();
		document.MM_returnValue = false;
	}
	else if ((document.all("cboCountry").value =="UK") && (document.all("txtPostcode").value == "")){
		alert('When selected country is United Kingdom then a postcode must be entered!');
		document.all("txtPostcode").focus();
		document.MM_returnValue = false;
	}
	else
	{
	document.MM_returnValue = true;
	}
}

//validate submit query page
function CheckSubmitQuery(){
	if (document.all("Name").value == ""){
		alert('Name cannot be blank!');
		document.all("Name").focus();
		document.MM_returnValue = false;
	}
	else if (document.all("txtTel").value == ""){
		alert('Telephone cannot be blank!');
		document.all("txtTel").focus();
		document.MM_returnValue = false;
	}
	else if (document.all("txtEmail").value == ""){
		alert('Email Address cannot be blank!');
		document.all("txtEmail").focus();
		document.MM_returnValue = false;
	}
	else if (document.all("txtComments").value == ""){
		alert('Comments cannot be blank!');
		document.all("txtComments").focus();
		document.MM_returnValue = false;
	}
	else
	{
	document.MM_returnValue = true;
	}
}

//validate sSpares ubmit query page
function CheckSubmitSpares(){
	if (document.all("Name").value == ""){
		alert('Name cannot be blank!');
		document.all("Name").focus();
		document.MM_returnValue = false;
	}
	else if (document.all("txtEmail").value == ""){
		alert('Email Address cannot be blank!');
		document.all("txtEmail").focus();
		document.MM_returnValue = false;
	}
	else if (document.all("txtTel").value == ""){
		alert('Telephone cannot be blank!');
		document.all("txtTel").focus();
		document.MM_returnValue = false;
	}
	else if (document.all("txtComments").value == ""){
		alert('Enquiry cannot be blank!');
		document.all("txtComments").focus();
		document.MM_returnValue = false;
	}
	else
	{
	document.MM_returnValue = true;
	}
}

//validate Newsletter submit query page
function CheckSubmitNewsletter(){
	if (document.all("Name").value == ""){
		alert('Name cannot be blank!');
		document.all("Name").focus();
		document.MM_returnValue = false;
	}
	else if (document.all("txtEmail").value == ""){
		alert('Email Address cannot be blank!');
		document.all("txtEmail").focus();
		document.MM_returnValue = false;
	}
	else
	{
	document.MM_returnValue = true;
	}
}

//Clear search box on focus
function ClearSearchBox(){
	if (document.all("txtSearch").value == "Enter Search Query"){
		document.all("txtSearch").value = ""
	}
}

//Project Seven extenstion code for scrolling and snapping layers**********************************************
function P7_Snap() { //v2.63 by PVII
 var x,y,ox,bx,oy,p,tx,a,b,k,d,da,e,el,tw,q0,xx,yy,w1,pa='px',args=P7_Snap.arguments;a=parseInt(a);
 if(document.layers||window.opera){pa='';}for(k=0;k<(args.length);k+=4){
 if((g=MM_findObj(args[k]))!=null){if((el=MM_findObj(args[k+1]))!=null){
 a=parseInt(args[k+2]);b=parseInt(args[k+3]);x=0;y=0;ox=0;oy=0;p="";tx=1;
 da="document.all['"+args[k]+"']";if(document.getElementById){
 d="document.getElementsByName('"+args[k]+"')[0]";if(!eval(d)){
 d="document.getElementById('"+args[k]+"')";if(!eval(d)){d=da;}}
 }else if(document.all){d=da;}if(document.all||document.getElementById){while(tx==1){
 p+=".offsetParent";if(eval(d+p)){x+=parseInt(eval(d+p+".offsetLeft"));y+=parseInt(eval(d+p+".offsetTop"));
 }else{tx=0;}}ox=parseInt(g.offsetLeft);oy=parseInt(g.offsetTop);tw=x+ox+y+oy;
 if(tw==0||(navigator.appVersion.indexOf("MSIE 4")>-1&&navigator.appVersion.indexOf("Mac")>-1)){
  ox=0;oy=0;if(g.style.left){x=parseInt(g.style.left);y=parseInt(g.style.top);}else{
  w1=parseInt(el.style.width);bx=(a<0)?-5-w1:-10;a=(Math.abs(a)<1000)?0:a;b=(Math.abs(b)<1000)?0:b;
  x=document.body.scrollLeft+event.clientX+bx;y=document.body.scrollTop+event.clientY;}}
 }else if(document.layers){x=g.x;y=g.y;q0=document.layers,dd="";for(var s=0;s<q0.length;s++){
  dd='document.'+q0[s].name;if(eval(dd+'.document.'+args[k])){x+=eval(dd+'.left');y+=eval(dd+'.top');
  break;}}}e=(document.layers)?el:el.style;xx=parseInt(x+ox+a),yy=parseInt(y+oy+b);
 if(navigator.appVersion.indexOf("MSIE 5")>-1 && navigator.appVersion.indexOf("Mac")>-1){
  xx+=parseInt(document.body.leftMargin);yy+=parseInt(document.body.topMargin);}
 e.left=xx+pa;e.top=yy+pa;}}}
}

function P7_VScroller(el,dr,ty,oy,spd) { //v1.7 by PVII
 var g,gg,fr,sp,pa='',slw=true,m=false,h,ly;ty=parseInt(ty);
 if((g=MM_findObj(el))!=null){gg=(document.layers)?g:g.style;}else{return;}
 if(dr=="Stop"){if(g.toMove){clearTimeout(g.p7Magic);}g.toMove=false;}
 if((parseInt(navigator.appVersion)>4 || navigator.userAgent.indexOf("MSIE")>-1)&& !window.opera){pa="px";}
 if(navigator.userAgent.indexOf("NT")>-1 || navigator.userAgent.indexOf("Windows 2000")>-1){slw=false;}
 if(spd=="Slow"){sp=(slw)?2:1;fr=(slw)?40:30;}else if(spd=="Medium"){sp=(slw)?4:1;fr=(slw)?40:10;
 }else{sp=(slw)?8:4;fr=(slw)?40:10;}if(spd=="Warp"){sp=5000;}var yy=parseInt(gg.top);if(isNaN(yy)){
 if(g.currentStyle){yy=parseInt(g.currentStyle.top);}else if(document.defaultView&&document.defaultView.getComputedStyle){
 yy=parseInt(document.defaultView.getComputedStyle(g,"").getPropertyValue("top"));}else{yy=0;}}
 if(document.all || document.getElementById){h=parseInt(g.offsetHeight);
 if(!h){h=parseInt(g.style.pixelHeight);}
 }else if(document.layers){h=parseInt(g.clip.height);}ly=ty+parseInt(oy)-h;
 if(dr=="Down"){if(yy>ly){m=true;yy-=sp;if(yy<ly){yy=ly;}}}
 if(dr=="Up"){if(yy<ty){m=true;yy+=sp;if(yy>ty){yy=ty;}}}
 if(dr=="Reset"){gg.top=ty+pa;if(g.toMove){clearTimeout(g.p7Magic);}g.toMove=false;}
 if(m){gg.top=yy+pa;if(g.toMove){clearTimeout(g.p7Magic);}g.toMove=true;
  eval("g.p7Magic=setTimeout(\"P7_VScroller('"+el+"','"+dr+"',"+ty+","+oy+",'"+spd+"')\","+fr+")");
 }else{g.toMove=false;}
}

//**************************************************************************************************************

//functions for vertical scroller*******************************************************************************

function scrollerObj(name,initH,initW,heightB,widthB,content,initBg,Bg,speed,initFl){
	this.name=name;
	this.initH=initH;
	this.initW=initW;
	this.heightB=heightB;
	this.widthB=widthB;
	this.content=content;
	this.initBg=initBg;
	this.Bg=Bg;
	this.initFl=initFl;
	this.speed=parseInt(speed);
	this.timer = name + "Timer";
	this.elem;
	this.getElement = getElement;
	this.createLayer=createLayer;
	this.scrollLayer = scrollLayer; 
	this.scrollLoop=scrollLoop;
    this.createLayer();
    this.getElement();
    this.scrollLayer();
}

function scrollLoop(s){
	this.speed = s;
}

function scrollLayer(){
	/*
	if(parseInt(this.elem.style.top)>(this.elem.offsetHeight*(-1))){
		this.elem.style.top = parseInt(this.elem.style.top)-this.speed;
	}
	else {this.elem.style.top = this.initH;}
	*/
	if(parseInt(this.elem.style.top)>(this.elem.offsetHeight*(-1))){
		this.elem.style.top = parseInt(this.elem.style.top)-this.speed;
	}
	else {this.elem.style.top = 500;}
}

function getElement(){
	if(document.getElementById){
		this.elem = document.getElementById(this.name);
	}
	else if (document.all){
		this.elem = document.all[name];
	}
	else if (document.layers){
		this.elem = document.layers[name];
	}
}

function createLayer(){
	if(document.getElementById || document.all){
		document.write('<div id="layer'+this.name+'" style="position:relative;overflow:hidden;float:'+this.initFl+';background-color:#'+this.initBg+';border:1px solid black;width:'+this.initW+'%;height:'+this.initH+'%;" onMouseover="'+this.name+'.scrollLoop(0)" onMouseout="'+this.name+'.scrollLoop('+this.speed+')">');
		document.write('<div id="'+this.name+'" style="position:absolute;top:'+400+'px;left:0px;border:0px solid black;width:'+this.widthB+'px;height:'+this.heightB+'%;background-color:#'+this.Bg+'">');
		document.write(this.content);
		document.write('<\/div><\/div>');}
	else if(document.layers){
		document.write('<ilayer name="'+this.name+'" bgcolor="#'+this.Bg+'" width="'+this.widthB+'" height="'+this.heightB+'">'+this.content+'<\/ilayer>');
		return;
	}
	if(this.scrollLayer){
		this.timer = setInterval(this.name+'.scrollLayer()','30');
	}
}

//**************************************************************************************************************

//Validate Category insert and update
function DoCatCheck(){
	if (document.all("txtName").value == ""){
		alert('Category Name cannot be blank!');
		document.all("txtName").focus();
		document.MM_returnValue = false;
	}
	else
	{
	document.MM_returnValue = true;
	}
}

//Validate Contact Details
function DoContCheck(){
	if (document.all("txtName").value == ""){
		alert('Company Name cannot be blank!');
		document.all("txtName").focus();
		document.MM_returnValue = false;
	}
	else if (document.all("txtAddr").value == "")
	{
		alert('Address cannot be blank!');
		document.all("txtAddr").focus();
		document.MM_returnValue = false;
	}
	else if (document.all("txtTown").value == "")
	{
		alert('Town cannot be blank!');
		document.all("txtTown").focus();
		document.MM_returnValue = false;	
	}
	else if (document.all("txtCounty").value == "")
	{
		alert('County cannot be blank!');
		document.all("txtCounty").focus();
		document.MM_returnValue = false;	
	}
	else if (document.all("txtCountry").value == "")
	{
		alert('Country cannot be blank!');
		document.all("txtCountry").focus();
		document.MM_returnValue = false;	
	}
	else if (document.all("txtPostCode").value == "")
	{
		alert('Post Code cannot be blank!');
		document.all("txtPostCode").focus();
		document.MM_returnValue = false;	
	}
	else if (document.all("txtTel").value == "")
	{
		alert('Telephone Number cannot be blank!');
		document.all("txtTel").focus();
		document.MM_returnValue = false;	
	}
	else if (document.all("txtEmail").value == "")
	{
		alert('Email Address cannot be blank!');
		document.all("txtEmail").focus();
		document.MM_returnValue = false;	
	}
	else
	{
	document.MM_returnValue = true;
	}
}

//Validate Link Insert/Update form
function DoLinkCheck(){
	var txtUrlsubstr = document.all("txtURL").value.substr(0,7);
	if (document.all("txtTitle").value == ""){
		alert('Link Text cannot be blank!');
		document.all("txtTitle").focus();
		document.MM_returnValue = false;
	}
	else if ((document.all("txtURL").value == "") || (document.all("txtURL").value == "http://") || (txtUrlsubstr != "http://")){
		alert('Link URL must contain a valid URL!');
		document.all("txtURL").value = "http://";
		document.all("txtURL").focus();
		document.MM_returnValue = false;
	}
	else
	{
	document.MM_returnValue = true;
	}
}

//Validate page update
function DoPageCheck(){
	if (document.all("txtSect").value == ""){
		alert('Section Title cannot be blank!');
		document.all("txtSect").focus();
		document.MM_returnValue = false;
	}
	else if (document.all("txtTextTop").value == ""){
		alert('Top Text cannot be blank!');
		document.all("txtTextTop").focus();
		document.MM_returnValue = false;
	}
	else if (document.all("txtTextBottom").value == ""){
		alert('Bottom Text cannot be blank!');
		document.all("txtTextBottom").focus();
		document.MM_returnValue = false;
	}
	else
	{
	document.MM_returnValue = true;
	}
}

//Validate Staff insert/update page
function DoStaffCheck(){
	if (document.all("txtName").value == ""){
		alert('Employee Name cannot be blank!');
		document.all("txtName").focus();
		document.MM_returnValue = false;
	}
	else if (document.all("txtJobTitle").value == ""){
		alert('Job Title cannot be blank!');
		document.all("txtJobTitle").focus();
		document.MM_returnValue = false;
	}
	else if (document.all("txtEmail").value == ""){
		alert('Email Address cannot be blank!');
		document.all("txtEmail").focus();
		document.MM_returnValue = false;
	}
	else
	{
	document.MM_returnValue = true;
	}
}

//Validate product page
function DoProdCheck(){
	if (document.all("txtTitle").value == ""){
		alert('Name cannot be blank!');
		document.all("txtTitle").focus();
		document.MM_returnValue = false;
	}
	else if (document.all("txtDesc").value == ""){
		alert('Description cannot be blank!');
		document.all("txtDesc").focus();
		document.MM_returnValue = false;
	}
	else if (document.all("cboCategory").value == "0"){
		alert('Please select a category!');
		document.all("cboCategory").focus();
		document.MM_returnValue = false;
	}
	else
	{
	document.MM_returnValue = true;
	}
}

//Validate Product Registration page
function DoProductRegistrationCheck(){
	if (document.all("ddlProductType").value == "0"){
		alert('Please select a product type!');
		document.all("ddlProductType").focus();
		document.MM_returnValue = false;
	}
	else if (document.all("ddlProduct").value == "0"){
		alert('Please select a model!');
		document.all("ddlProduct").focus();
		document.MM_returnValue = false;
	}
	else if (document.all("txtSerialNo").value == ""){
		alert('Serial Number cannot be blank!');
		document.all("txtSerialNo").focus();
		document.MM_returnValue = false;
	}
	else if (document.all("txtPurchaseDate").value == ""){
		alert('Purchase Date cannot be blank!');
		document.all("txtPurchaseDate").focus();
		document.MM_returnValue = false;
	}
	else if (document.all("txtName").value == ""){
		alert('Name cannot be blank!');
		document.all("txtName").focus();
		document.MM_returnValue = false;
	}
	else if (document.all("txtEmail").value == ""){
		alert('Email cannot be blank!');
		document.all("txtEmail").focus();
		document.MM_returnValue = false;
	}
	else
	{
	document.MM_returnValue = true;
	}
}

//Validate File insert/update pages
function DoFileCheck(){
	if (document.all("txtTitle").value == ""){
		alert('File Title cannot be blank!');
		document.all("txtTitle").focus();
		document.MM_returnValue = false;
	}
	else if (document.all("cboFileType").value == "0"){
		alert('Please select a category!');
		document.all("cboFileType").focus();
		document.MM_returnValue = false;
	}
	else
	{
	document.MM_returnValue = true;
	}
}

//Validate PDF insert/update pages
function DoPDFCheck(){
	if (document.all("txtTitle").value == ""){
		alert('PDF Title cannot be blank!');
		document.all("txtTitle").focus();
		document.MM_returnValue = false;
	}
	else if (document.all("cboSupplier").value == "0"){
		alert('Please select a supplier!');
		document.all("cboSupplier").focus();
		document.MM_returnValue = false;
	}
	else
	{
	document.MM_returnValue = true;
	}
}

//Validate News Insert page
function DoNewsCheck(){
	if (document.all("txtTitle").value == ""){
		alert('News Title cannot be blank!');
		document.all("txtTitle").focus();
		document.MM_returnValue = false;
	}
	else if (document.all("txtText").value == ""){
		alert('News Text cannot be blank!');
		document.all("txtText").focus();
		document.MM_returnValue = false;
	}
	else
	{
	document.MM_returnValue = true;
	}
}

//Validate Events
function DoEventCheck(){
	if (document.all("txtName").value == ""){
		alert('Event Name cannot be blank!');
		document.all("txtName").focus();
		document.MM_returnValue = false;
	}
	else if (document.all("txtLocation").value == ""){
		alert('Event Location cannot be blank!');
		document.all("txtLocation").focus();
		document.MM_returnValue = false;
	}
	else if (document.all("cboArea").value == "0"){
		alert('Event Country cannot be blank!');
		document.all("cboArea").focus();
		document.MM_returnValue = false;
	}
	else if (document.all("txtEventStart").value == ""){
		alert('Event Start Date cannot be blank!');
		document.all("txtEventStart").focus();
		document.MM_returnValue = false;
	}
	else if (document.all("txtEventEnd").value == ""){
		alert('Event End Date cannot be blank!');
		document.all("txtEventEnd").focus();
		document.MM_returnValue = false;
	}
	else
	{
	document.MM_returnValue = true;
	}
}

//Validate Category Display page
function DoOptChk(CatOptID,OptVal,OptCnt){
	var hidcat = parseInt(document.all("hidCatCnt").value);
	if (OptVal == 1){
		if (hidcat > 9){
			alert('Maximum number of categories reached.');
			document.all[CatOptID].checked = false;
			document.all['N' + OptCnt].checked = true;
		}
		else
		{
			document.all("hidCatCnt").value = hidcat + 1;
		}
	}
	else
	{
		if (hidcat == 1){
			alert('Minimum number of categories reached.');
			document.all['N' + OptCnt].checked = false;
			document.all['Y' + OptCnt].checked = true;
		}
		else
		{
			document.all("hidCatCnt").value = hidcat - 1;
		}
	}
}

//Validate job vacancy page
function DoJobCheck(){
	if (document.all("txtRefNo").value == ""){
		alert('Reference No. cannot be blank!');
		document.all("txtRefNo").focus();
		document.MM_returnValue = false;
	}
	else if (document.all("txtTitle").value == ""){
		alert('Title cannot be blank!');
		document.all("txtTitle").focus();
		document.MM_returnValue = false;
	}
	else if (document.all("txtEssential").value == ""){
		alert('Essential cannot be blank!');
		document.all("txtEssential").focus();
		document.MM_returnValue = false;
	}
	else if (document.all("txtDesirable").value == ""){
		alert('Desirable cannot be blank!');
		document.all("txtDesirable").focus();
		document.MM_returnValue = false;
	}
	else if (document.all("txtJobSpec").value == ""){
		alert('Job Spec cannot be blank!');
		document.all("txtJobSpec").focus();
		document.MM_returnValue = false;
	}
	else if (document.all("txtFurther").value == ""){
		alert('Further Info cannot be blank!');
		document.all("txtFurther").focus();
		document.MM_returnValue = false;
	}
	else if (document.all("txtClosingDate").value == ""){
		alert('Closing Date cannot be blank!');
		document.all("txtClosingDate").focus();
		document.MM_returnValue = false;
	}
	else
	{
	document.MM_returnValue = true;
	}
}