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_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_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_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->


// bookmark

var pageName = "Free Graphics,Hypergurl"; 
function addToFavorites() { 
	if (window.external) { window.external.AddFavorite(urlAddress,pageName) } 
	else { alert("Sorry! Your browser doesn't support this function."); } 
	} // -->

// script by <a href="javascript:addToFavorites()"><font color="#0000FF" face="Arial">Bookmark Page !</font></a>


//Pop up Script//
function openScript(url,width, height) {
        var Win = window.open(url,'app','width=' + width + ',height=' + height + ', resizable=no,menubars,scrollbars=yes, status=no,left=10,top=10');
}

function openScriptAll4(url,windowName, width, height, option) {
        var Win = window.open(url,windowName,'width=' + width + ',height=' + height + ',' + option + '');
}

function openScriptAll(url,windowName,option) {
        var Win = window.open(url,windowName, + ',' + option + '');
}

function loadNewWindow(targeturl) {
	openWindow(targeturl, "tswin", "", "");
	window.close();
}

function refreshParentWindow(targeturl) {
	if (window.opener) {
		window.opener.location.href=targeturl;
	}
	window.close();
}

function doNothing() {
	window.close();
}

function openWindow(url, name, properties, openerName) {
	
	winReference = window.open(url, name, properties);
	setTimeout('if (winReference && !winReference.closed) winReference.focus()', 200);	
	if (openerName) self.name = openerName;
	return winReference;
}
//PopUp Script Ends//

//font size//

var min=8;
var max=18;
function increaseFontSize() {
var p = document.getElementsByTagName('p');
for(i=0;i<p.length;i++) {
if(p[i].style.fontSize) {
var s = parseInt(p[i].style.fontSize.replace("px",""));
} else {
var s = 12;
}
if(s!=max) {
s += 1;
}
p[i].style.fontSize = s+"px"
}
}
function decreaseFontSize() {
var p = document.getElementsByTagName('p');
for(i=0;i<p.length;i++) {
if(p[i].style.fontSize) {
var s = parseInt(p[i].style.fontSize.replace("px",""));
} else {
var s = 12;
}
if(s!=min) {
s -= 1;
}
p[i].style.fontSize = s+"px"
}
}

//font size//

//Bookmark//
function createBookmark()
{
if (navigator.appName=="Netscape")
{
document.write (
'To bookmark this site, click '
+'<b>Bookmarks | Add bookmark</b> '
+'or press <b>Ctrl+D</b>.'
)
}
else if (parseInt(navigator.appVersion)>3) {
if (window.external)
{
window.external.AddFavorite(location.href, document.title);
}
}
}

function emailThisPage()
{
name=document.URL;
window.location="mailto:?Subject=ICICI Bank NRI &Body=Dear Friend,%0D%0A%0D%0A I would like you to have a look at the following URL:-%0D%0A%0D%0A "+name+"%0D%0A%0D%0AThis URL is a part of ICICI Bank NRI website (www.icicibank.com/nri) and contains information that might be useful for you.%0D%0A%0D%0AHope you find it useful.%0D%0A%0D%0AWarm regards";
}

function trimSpace(x)
{
var emptySpace = / /g;
var trimAfter = x.replace(emptySpace,"");
return(trimAfter);
}


function validateEmail(emailStr)
{
var emailPat=/^(.+)@(.+)$/
var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
var validChars="\[^\\s" + specialChars + "\]"
var quotedUser="(\"[^\"]*\")"
var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
var atom=validChars + '+'
var word="(" + atom + "|" + quotedUser + ")"
var userPat=new RegExp("^" + word + "(\\." + word + ")*$")
var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$")
var matchArray=emailStr.match(emailPat)
if (matchArray==null)
{
alert("Your Email address seems incorrect (check @ and .'s)")
return false
}
var user=matchArray[1]
var domain=matchArray[2]
if (user.match(userPat)==null)
{
alert("Please enter a valid Email address.")
return false
}
var IPArray=domain.match(ipDomainPat)
if (IPArray!=null)
{
for (var i=1;i<=4;i++)
{
if (IPArray[i]>255)
{
alert("Please enter a valid Email address. Your destination IP address is invalid!")
return false
}
}
return true
}
var domainArray=domain.match(domainPat)
if (domainArray==null)
{
alert("Please enter a valid username. Your domain name doesn't seem to be valid.")
return false
}
var atomPat=new RegExp(atom,"g")
var domArr=domain.match(atomPat)
var len=domArr.length
if (domArr[domArr.length-1].length<2 || domArr[domArr.length-1].length>3)
{
alert("Your Email address must end with a three-letter domain, or two letter country.")
return false
}
if (len<2)
{
var errStr="This address is missing a hostname!"
alert(errStr)
return false
}
return true;
}
//Bookmark//

//print//


// ---
/*
	GLT is developed by Robert Nyman, http://www.robertnyman.com
	For more information and copyright information, please see http://www.robertnyman.com/glt
*/
var GLT = {
	// Customization parameters
	titleClassName : "glt-elm",	
	/*topImagePath : "../../images/rounded-top.gif",
	bottomImagePath : "../../images/rounded-bottom.gif",*/
	suppressAltTooltipsInIE : true,
	timeBeforeShow : 5,
	titleOffsetX : 10,
	titleOffsetY : -30,
	fadeInTitle : true,
	fadeOutTitle : true,
	fadeStartLevel : 20,
	originalFadeLevel : 1,
	fadeIncrement : 0.1,
	timePerFadeStep : 50,
	
	// GLT parameters
	titleElm : null,
	titleTextElm : null,
	titleTopImage : null,
	titleBottomImage : null,
	elementsWithTitles : null,
	currentElm : null,
	currentTitle : "",
	currentFadeLevel : 0,
	fadeTimer : null,
	
	init : function (){
		if(document.getElementById){
			this.elementsWithTitles = getElementsByAttribute(document, "*", "title");
			if(this.elementsWithTitles.length > 0){
				this.titleElm = document.createElement("div");
				this.titleElm.className = this.titleClassName;
				if(this.topImagePath){
					this.titleTopImage = document.createElement("img");
					this.titleTopImage.setAttribute("src", this.topImagePath);
					this.titleElm.appendChild(this.titleTopImage);
				}				
				this.titleTextElm = document.createElement("p");
				this.titleElm.appendChild(this.titleTextElm);
				if(this.bottomImagePath){
					this.titleBottomImage = document.createElement("img");
					this.titleBottomImage.setAttribute("src", this.bottomImagePath);
					this.titleElm.appendChild(this.titleBottomImage);
				}
				document.body.appendChild(this.titleElm);
				this.useMSFilter = typeof this.titleElm.style.filter != "undefined";
				this.applyEvents();
			}			
		}
	},
	
	applyEvents : function (){
		var oElm;
		var strClassName;
		for(var i=0; i<this.elementsWithTitles.length; i++){
			oElm = this.elementsWithTitles[i];
			if(this.suppressAltTooltipsInIE){
				oElm.setAttribute("alt", "");
			}
			oElm.onmouseover = GLT.mouseOverElm;
			oElm.onmouseout = GLT.mouseOutElm;
		}
	},
	
	mouseOverElm : function (oEvent){
		var oEvent = (typeof oEvent != "undefined")? oEvent : event;
		if(typeof GLT != "undefined"){
			GLT.startTimer(this, oEvent);
			oEvent.cancelBubble = true;
			oEvent.returnValue = false;
			if(oEvent.stopPropagation){
				oEvent.stopPropagation();
			}
		}
	},
	
	mouseOutElm : function (oEvent){
		var oEvent = (typeof oEvent != "undefined")? oEvent : event;
		if(typeof GLT != "undefined"){
			GLT.hideTitle(this, oEvent);
		}
	},
	
	startTimer : function (oElm, oEvent){
		if(!this.currentElm || this.currentElm != oElm || this.fadeTimer > 0){
			if(this.fadeTimer){
				clearTimeout(this.fadeTimer);
			}	
			if(this.currentElm){
				this.hideTitle(null, false, true);
			}
			this.currentElm = oElm;
			this.currentTitle = this.currentElm.getAttribute("title");
			this.currentElm.setAttribute("title", "");
			this.currentX = oEvent.clientX;
			this.currentY = oEvent.clientY;
			this.fadeTimer = setTimeout("GLT.showTitle()", GLT.timeBeforeShow);
		}
    },
	
	stopTimer : function (oElm){
		clearTimeout(GLT.fadeTimer);
    },
	
	showTitle : function (){
		this.setTitlePos();
		this.titleTextElm.innerHTML = this.currentTitle;
		this.titleElm.style.visibility = "visible";
		if(this.fadeInTitle){
			this.currentFadeLevel = this.fadeStartLevel;
			this.fadeIn();
		}
	},
	
	hideTitle : function (oElm, oEvent, forceHide){		
		if(this.currentElm && (oElm || forceHide)){
			var bIsChildOfCurrentElm = false;
			if(typeof oEvent != "undefined" && typeof oEvent == "object"){
				var oEventTarget = (typeof oEvent.relatedTarget != "undefined")? oEvent.relatedTarget : oEvent.toElement;
				if(oEventTarget){
					while(!bIsChildOfCurrentElm && oEventTarget && oEventTarget.nodeName && oEventTarget.nodeName.search(/body/i) == -1){
						if(oEventTarget == oElm){
							bIsChildOfCurrentElm = true;
							break;
						}
						oEventTarget = oEventTarget.parentNode;
					}
				}
			}
			if(!bIsChildOfCurrentElm){
				this.stopTimer();
				if(this.fadeOutTitle && (typeof forceHide == "undefined" || !forceHide)){
					this.fadeOut();
				}
				else{
					clearTimeout(this.fadeTimer);
					this.currentElm.setAttribute("title", this.currentTitle);
					this.currentElm = null;
					this.titleElm.style.visibility = "hidden";
				}
			}
		}
	},
	
	setTitlePos : function (){	
		var arrScroll = this.getWinSizeAndScroll();
		var intTitleElmWidthAndPos = this.titleElm.offsetWidth + this.currentX + this.titleOffsetX;
		var intDiff = intTitleElmWidthAndPos - arrScroll[0];
		var intX = (intDiff > 0)? (this.currentX - intDiff) : (this.currentX + this.titleOffsetX);
		this.titleElm.style.left = intX + arrScroll[2] + "px";
		this.titleElm.style.top = this.currentY + arrScroll[3] + this.titleOffsetY + "px";
	},
	
	fadeIn : function (fadeOut){
		this.currentFadeLevel = this.currentFadeLevel + this.fadeIncrement;
		if(this.currentFadeLevel < this.originalFadeLevel){
			this.fadeTimer = setTimeout("GLT.fadeIn()", GLT.timePerFadeStep);
		}
		else{
			this.currentFadeLevel = this.originalFadeLevel;
			clearTimeout(this.fadeTimer);
		}
		this.setFade();
	},
	
	fadeOut : function (){
		this.currentFadeLevel = this.currentFadeLevel - this.fadeIncrement;
		if(this.currentFadeLevel > this.fadeStartLevel){
			this.fadeTimer = setTimeout("GLT.fadeOut()", GLT.timePerFadeStep);
		}
		else{
			this.currentFadeLevel = this.originalFadeLevel;
			this.hideTitle(null, false, true);
		}
		this.setFade();
	},
	
	setFade : function (){
		// This line is b/c of a floating point bug in JavaScript
		this.currentFadeLevel = Math.round(this.currentFadeLevel * 10) / 10;
		if(this.titleElm){
			if(this.useMSFilter){
				this.titleElm.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity=" + (this.currentFadeLevel * 100) + ")";
			}
			else{
				this.titleElm.style.opacity = this.currentFadeLevel;
			}
		}
	},
	
	getWinSizeAndScroll : function (){
		var intWidth = document.body.offsetWidth;
		var intHeight = (typeof window.innerHeight != "undefined")? window.innerHeight : (document.documentElement && document.documentElement.clientHeight > 0)? document.documentElement.clientHeight : document.body.clientHeight;		
		var intXScroll = (typeof window.pageXOffset != "undefined")? window.pageXOffset : document.body.scrollLeft;		
		var intYScroll = (typeof window.window.pageYOffset != "undefined")? window.window.pageYOffset : (document.documentElement && document.documentElement.scrollTop > 0)? document.documentElement.scrollTop : document.body.scrollTop;
		return [intWidth, intHeight, intXScroll, intYScroll];
	},
	
	closeSession : function (oEvent){		
		this.removeEvent(window, "load", function(){GLT.init();}, false);
		GLT = null;
		delete GLT;
	},
	
	addEvent : function (oObject, strEvent, oFunction, bCapture){
		if(oObject){
			if(oObject.addEventListener){
				oObject.addEventListener(strEvent, oFunction, bCapture);
			}
			else if(window.attachEvent){
				oObject.attachEvent(("on" + strEvent), oFunction)
			}
		}
	},

	removeEvent : function (oObject, strEvent, oFunction, bCapture){
		if(oObject){
			if(oObject.removeEventListener){
				oObject.removeEventListener(strEvent, oFunction, false);
			}
			else if(window.detachEvent){
				oObject.detachEvent(("on" + strEvent), oFunction)
			}
		}
	}
};
// ---
GLT.addEvent(window, "load", function(){GLT.init();}, false);
// ---
// Utility functions
// ---
function getElementsByAttribute(oElm, strTagName, strAttributeName, strAttributeValue){
	var arrElements = (strTagName == "*" && oElm.all)? oElm.all : oElm.getElementsByTagName(strTagName);
	var arrReturnElements = new Array();
	var oAttributeValue = (typeof strAttributeValue != "undefined")? new RegExp("(^|\\s)" + strAttributeValue + "(\\s|$)") : null;
	var oCurrent;
	var oAttribute;
	for(var i=0; i<arrElements.length; i++){
		oCurrent = arrElements[i];
		oAttribute = oCurrent.getAttribute && oCurrent.getAttribute(strAttributeName);
		if(typeof oAttribute == "string" && oAttribute.length > 0){
			if(typeof strAttributeValue == "undefined" || (oAttributeValue && oAttributeValue.test(oAttribute))){
				arrReturnElements.push(oCurrent);
			}
		}
	}
	return arrReturnElements;
}
// ---
if(typeof Array.prototype.push != "function"){
	Array.prototype.push = ArrayPush;
	function ArrayPush(value){
		this[this.length] = value;
	}
}
// ---
