	var newWin;
	var initSz = startSz = 12; 
	var tags = new Array('a', 'tr', 'td');
	var whitespace = " \t\n\r";

	document.oncontextmenu=new Function("return false;");
	function isEmpty(s) {
		return ((s == null) || (s.length == 0))
	}
	function isWhitespace(s) {
		if(isEmpty(s)) return true;
	  
		for (var i = 0; i < s.length; i++)
		{
			var c = s.charAt(i);
			if (whitespace.indexOf(c) == -1) return false;
		}
	  return true;
	}
	function validateEmail(userEmailId) {
	    var objRegExp=/^((\"[^\"\f\n\r\t\v\b]+\")|([\w\!\#\$\%\&\'\*\+\-\~\/\^\`\|\{\}]+(\.[\w\!\#\$\%\&\'\*\+\-\~\/\^\`\|\{\}]+)*))@((\[(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))\])|(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))|((([A-Za-z0-9\-])+\.)+[A-Za-z\-]+))$/;
	    
	    return objRegExp.test(userEmailId);
	}	
	function openWinScroll(url, height, width) {
		if (newWin) {
			newWin.close();
		}	 
		newWin = createWin(url, height, width, 'yes');
	}
	function openWin(url, height, width) {
		if (newWin) {
			newWin.close();
		}	 
		newWin = createWin(url, height, width, 'no');
	}	
	function popUpWin(symbol, name, flag, height, width) {
		if (newWin) {
			newWin.close();
		}
		newWin = createWin('chart.asp?code=' + symbol + '&flag=' + flag + '&name=' + escape(name), height, width, 'no');
	}
	function createWin(url, height, width, scroll) {
		var newWin = null;
		
		newWin = window.open(url, "", "toolbar=no, titlebar=no, location=no, directories=no, status=no, menubar=no, scrollbars=" + scroll + ", resizable=no, copyhistory=no, width=" + width + ", height=" + height + ", alwaysLowered=yes, screenX=10, screenY=10, top=110, left=220"); 

		return newWin;				 	
	}
	function preload(path) {
		var myimages = new Array();	
		myimages[0] = new Image();
		myimages[0].src = path + '/images/plus.gif';
		myimages[1] = new Image();
		myimages[1].src = path + '/images/minus.gif';
	}
	function toggle(obj, path) {
		var objDiv = document.getElementById(obj);
		var objImg = document.getElementById('img_' + obj);
		
		if(objDiv.style.display != "none" ) {
			objDiv.style.display = 'none';
			
			if(objImg != null) {
				objImg.src = path + '/images/plus.gif';
			}
		}
		else {
			objDiv.style.display = 'block';
			
			if(objImg != null) {
				objImg.src = path + '/images/minus.gif';
			}
		}
	}
	function collapseCat(path) {
		var objDivs = document.getElementsByTagName('DIV');
		
		for (i = 0; i < objDivs.length; i++) {
			var objId = objDivs[i].getAttribute('id');
						
			if(objId.substr(0, objId.lastIndexOf('_')) == 'cat_body') {
				var objImg = document.getElementById('img_' + objId);
				
				objDivs[i].style.display = 'none';
				objImg.src = path + '/images/plus.gif';
			}
		}		
	}
	function expandCat(path) {
		var objDivs = document.getElementsByTagName('DIV');
		
		for (i = 0; i < objDivs.length; i++) {
			var objId = objDivs[i].getAttribute('id');
						
			if(objId.substr(0, objId.lastIndexOf('_')) == 'cat_body') {
				var objImg = document.getElementById('img_' + objId);
				
				objDivs[i].style.display = 'block';
				objImg.src = path + '/images/minus.gif';
			}
		}		
	}
	function collapseNews() {
		var objDivs = document.getElementsByTagName('DIV');
		
		for (i = 0; i < objDivs.length; i++) {
			var objId = objDivs[i].getAttribute('id');

			if(objId.lastIndexOf('news') == 0) {
				objDivs[i].style.display = 'none';
			}
		}		
	}
	function bookmarksite(title, url) {
		if (window.sidebar) { // firefox
			window.sidebar.addPanel(title, url, "");
		} else if(window.opera && window.print) { // opera
			var elem = document.createElement('a');
			
			elem.setAttribute('href', url);
			elem.setAttribute('title', title);
			elem.setAttribute('rel', 'sidebar');
			elem.click();
		}  else if(document.all) { // ie
			window.external.AddFavorite(url, title);
		}
	}
	function setSizeById(id, chg) {
		if (!document.getElementById) return;
		
		var sz = startSz;
		var elem;
		
		if (chg == 0) sz = initSz;
			
		sz += chg;
		if ( sz < (initSz - 2)) sz = (initSz - 2);
		if ( sz > (initSz + 2)) sz = (initSz + 2);
		startSz = sz;
		
		if (!(elem = document.getElementById(id))) elem = document.getElementsByTagName(id)[0];
	
		elem.style.fontSize = sz;
		for (var i = 0; i < tags.length; i++) {
			var aTags = elem.getElementsByTagName(tags[i]);
			for (var j = 0; j < aTags.length; j++) {
				aTags[j].style.fontSize = sz;
			}
		}
	}		
	function makearray(n) {
		this.length = n;
		
		for (var i = 1; i <= n; i++) {
			this[i] = null;
		}
		return this;
	}	
	function IsIn(value, search) {
		if(search.indexOf(value) != -1) {
	  		return 1;
 		} else {
			return 0;
   		}
	}
	function LeadZero(value) {
		if ( value < 10) 
	  		document.write('0');
	}
	function dateDisplay(formatString, twoplace) {
		var operators = 'dDmMyY%';
		var value = '';
		
		var today = new Date();
		
		// get the numbers 
		weekday = today.getDay();
		month = today.getMonth();
		year=today.getYear();
		
		if(year > 1900) year -= 1900; // correct for year
		date = today.getDate();
		
		var days = new makearray(7);
		days[0] = 'Sunday';
		days[1] = 'Monday';
		days[2] = 'Tuesday';
		days[3] = 'Wednesday';
		days[4] = 'Thursday';
		days[5] = 'Friday';
		days[6] = 'Saturday';
		
		var months = new makearray(12);
		months[0] = 'January';
		months[1] = 'February';
		months[2] = 'March';
		months[3] = 'April';
		months[4] = 'May';
		months[5] = 'June';
		months[6] = 'July';
		months[7] = 'August';
		months[8] = 'September';
		months[9] = 'October';
		months[10] = 'November';
		months[11] = 'December';
		var pos = 0;
		
		while (pos < formatString.length) {
			if( formatString.substring(pos, pos+1) != '%')  {
				document.write(formatString.substring(pos, pos+1));
				pos++;
				
				continue;
			} else {
				if (!IsIn(formatString.substring(pos, pos+1), operators))	{
					document.write(formatString.substring(pos, pos+1));
					pos++;
					
					continue;
				} else {
					if (formatString.substring(pos, pos+1) == '%') {
						pos++; // look ahead
						if (formatString.substring(pos, pos+1) == '%') {
							document.write('%');
							pos++;
							
							continue;
						} else {
							if (formatString.substring(pos, pos+1) == 'd') {
								if(twoplace) LeadZero(date);
								document.write(date);
								pos++;
								
								continue;
							} else {
								if (formatString.substring(pos, pos+1) == 'A') {
									document.write(days[weekday]);
									pos++;
									
									continue;
								} else {
									if (formatString.substring(pos, pos+1) == 'a') {
										document.write(days[weekday].substring(0, 3));
										pos++;
										
										continue;
									} else {
										if (formatString.substring(pos, pos+1) == 'm') {
											if(twoplace) LeadZero(month+1);
											document.write(month+1);
											pos++;
											
											continue;
										} else {
											if (formatString.substring(pos, pos+1) == 'B') {
												document.write(months[month]);
												pos++;
												
												continue;
											} else {
												if (formatString.substring(pos, pos+1) == 'b') {
													document.write(months[month].substring(0, 3));
													pos++;
													
													continue;
												} else {
													if (formatString.substring(pos, pos+1) == 'y') {
														if(year < 100) {
															document.write(year);
														} else { 
															year -= 100;
															LeadZero(year);
		                     								document.write(year);
														}
														pos++;
														
														continue;
													} else {
														if (formatString.substring(pos, pos+1) == 'Y') {
															document.write(1900 + year);
															pos++;
															
															continue;
														} 
		       											pos++; // ignore the char 
	} 	} 	} 	} 	} 	} 	} 	} 	} 	} 	} 	} 	}	