		function RossoLink(strURL) {
			objWindow = window.open(strURL,'Rosso','width=1020,height=730,channelmode=no,directories=yes,fullscreen=no,location=yes,menubar=yes,resizable=yes,scrollbars=yes,status=yes,titlebar=yes,toolbar=yes');
			objWindow.focus();
		}

		function RossoPop(strURL) {
			objWindow = window.open(strURL,'Rosso','width=800,height=500,channelmode=no,directories=no,fullscreen=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=yes,titlebar=yes,toolbar=no');
			objWindow.focus();
		}
	
		function RossoPopImage(image) {
			objWindow = window.open("ArticleImage.aspx?img=" + image,'RossoImage','width=800,height=500,channelmode=no,directories=no,fullscreen=no,location=no,menubar=no,resizable=yes,scrollbars=no,status=yes,titlebar=yes,toolbar=no');
			objWindow.focus();		
		}

		function RossoDealers() {
			objWindow = window.open("http://www.ferrariusa.com/Dealers/Locator.asp", "FerrariUSA", "width=780,height=515,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no");
			objWindow.focus();
		}

		function nsp(addr, dom, sub) {
	    if (dom==null) {
	    	dom="intelliga.com"
	    }
	    newloc = "mailto:"+addr.replace(/ /gi,'.')+"@"+dom;
	    if (sub!=null) {
	    	newloc += '?Subject='+sub;
	    }
	    document.location = newloc;
		}

		function verifyCompatibleBrowser() {
			this.ver=navigator.appVersion
			this.agent=navigator.userAgent
			this.dom=document.getElementById?1:0
			this.opera5=this.agent.indexOf("Opera 5")>-1
			this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
			this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
			this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
			this.ie=this.ie4||this.ie5||this.ie6
			this.mac=this.agent.indexOf("Mac")>-1
			this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
			this.ns4=(document.layers && !this.dom)?1:0;
			this.bw=(this.ie6||this.ie5||this.ie4||this.ns4||this.ns6||this.opera5)
			return this
		}

		bw = new verifyCompatibleBrowser();
		var NS=(document.layers);
		
		function ConstructObject(obj,nest) {
			nest=(!nest) ? '':'document.'+nest+'.'
			this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0;
			this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0;
			this.wref= bw.ns4?this.el.document:this.el;
			this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight
			this.scrollWidth=bw.ns4?this.css.document.width:this.el.offsetWidth
			this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight
			this.clipWidth=bw.ns4?this.css.clip.width:this.el.offsetWidth
			this.evnt=bw.dom? document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+"document.layers." +obj):0;	
			this.ref=bw.dom||bw.ie4?document:this.css.document;
			this.x=parseInt(this.css.left)||this.css.pixelLeft||this.evnt.offsetLeft||0;
			this.y=parseInt(this.css.top)||this.css.pixelTop||this.evnt.offsetTop||0
			this.w=this.evnt.offsetWidth||this.css.clip.width||this.ref.width||this.css.pixelWidth||0; 
			this.h=this.evnt.offsetHeight||this.css.clip.height||this.ref.height||this.css.pixelHeight||0
			this.c=0 //Clip values
			if((bw.dom || bw.ie4) && this.css.clip) {
				this.c=this.css.clip; this.c=this.c.slice(5,this.c.length-1); 
				this.c=this.c.split(' ');
				for(var i=0;i<4;i++){this.c[i]=parseInt(this.c[i])}
			}
			this.ct=this.css.clip.top||this.c[0]||0; 
			this.cr=this.css.clip.right||this.c[1]||this.w||0
			this.cb=this.css.clip.bottom||this.c[2]||this.h||0; 
			this.cl=this.css.clip.left||this.c[3]||0
			this.obj = obj + "Object"
			eval(this.obj + "=this")
			return this
		}

		String.prototype.LTrim=new Function("return this.replace(/^\\s+/,'')");
		String.prototype.RTrim=new Function("return this.replace(/\\s+$/,'')");
		String.prototype.Trim= new Function("return this.replace(/^\\s+|\\s+$/g,'')");
		
		function isDate(textField) { 
			var myDate = new String(textField.value); 
			var delimiterFirstInstance; 
			var delimiterSecondInstance; 
			var delimiterType; 
			var monthPart; 
			var dayPart; 
			var yearPart; 

			//accepts delimiting characters of either "/" or "-" 
			delimiterFirstInstance = myDate.indexOf("/"); 

			if (delimiterFirstInstance == -1) { 
				//check for the other allowed delimiter 
				delimiterFirstInstance = myDate.indexOf("-"); 
				//if it is still not found, return false 
				if (delimiterFirstInstance == -1) { 
					return false; 
				} 
				delimiterType = "-"; 
			} else { 
				delimiterType = "/"; 
			} 

			delimiterSecondInstance = myDate.indexOf(delimiterType, (delimiterFirstInstance + 1)); 
			if (delimiterSecondInstance == -1) { return false; } 

			monthPart = myDate.substring(0, delimiterFirstInstance); 
			if(validateMonth(monthPart) == false) { return false; } 
			yearPart = myDate.substring((delimiterSecondInstance + 1), (myDate.length)); 
			if(validateYear(yearPart) == false) { return false; } 

			dayPart = myDate.substring((delimiterFirstInstance + 1), (delimiterSecondInstance)); 
			if(validateDay(monthPart, dayPart, yearPart) == false) { 
				return false; 
			} else { 
				return true; 
			} 
		} 
		function validateDay(m, d, y) { 
			if((isNaN(d)) || d == "") { return false; } 

			var mo = parseInt(m, 10); 
			var da = parseInt(d, 10); 
			var ye = parseInt(y, 10); 

			if (da < 1) { return false; } 

			if ((mo == 4) || (mo == 6) || (mo == 9) || (mo == 11)) { 
			//it is a 30 day month 
			if (da > 30) { 
				return false; 
			} 
			} else if(mo == 2) { 
			// it is february (either 28 or 29 depending on leap year) 
			if (isLeapYear(ye) == true) { 
				if (da > 29) { 
				//leap years have 29 days in february 
				return false; 
				} 
			} else { 
				if (da > 28) { 
				//non leap years have 28 days in february 
				return false; 
				} 
			} 
			} else { 
			// it is a 31 day month 
			if (da > 31) { 
				return false; 
			} 
			} 
			//if we made it through all of the above without falling out, 
			//it must be a valid day for the given month and year 
			return true; 
		} 
		function validateMonth(mnth) { 
			if((isNaN(mnth)) || mnth == "") { 
			return false; 
			} 
			var intMonth = parseInt(mnth, 10); 
			if((intMonth < 1) || (intMonth > 12)) { 
			return false; //month must be between 1 and 12 (inclusive) 
			} else { 
			return true; 
			} 
		} 
		function validateYear(yr) { 
			if((isNaN(yr)) || yr == "") { 
			return false; 
			} 
			var intYear = parseInt(yr, 10); 
			if((intYear < 1970) || (intYear > 9999)) { 
			return false; //year must be between 1970 and 9999 (inclusive) 
			} else { 
			return true; 
			} 
		} 
		function isLeapYear(yr) { 
			if (((yr % 4 == 0) && (yr % 100 != 0)) || (yr % 400 == 0)) { 
						return true; 
			} else { 
				return false; 
			} 
		}		

