	function findObj(theObj, theDoc){
	
		var p, i, foundObj;
		
		if(!theDoc) theDoc = document;
		
		if( (p = theObj.indexOf("?")) > 0 && parent.frames.length){
		    theDoc = parent.frames[theObj.substring(p+1)].document;
		    theObj = theObj.substring(0,p);
		  }
		
		if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
		
		for (i=0; !foundObj && i < theDoc.forms.length; i++) 
		    foundObj = theDoc.forms[i][theObj];
		
		for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) 
		    foundObj = findObj(theObj,theDoc.layers[i].document);
		
		if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);
		
		return foundObj;
	
	}
	
	function formsubmit(val,f){
		var form_val = val;
		//var f = val;
		//alert(val);
		if(f.search_str.value=='Enter search words'){
			f.search_str.value='';
		}
		findObj('form_val').submit();
		
	}

	
	function password_match(txtpass1,txtpass2,frm,er){
			
		var password1 = findObj(txtpass1).value;
		var password2 = findObj(txtpass2).value;
		
		if(password1 != password2){
			findObj(er).style.display='block';
			return flase;
		}
		
		
	}

/*	
	function ff(){
		alert('ss');
		var findObj('answer');
		var result = Regex.Replace(val, @"[^\w]", "");
	}
	
*/



//------------------------------
			var  visibleFlag=false;
	    	var count=0;
	    	var i=0;
	    	var element="";
	    	var strDiv="";
	    	var globlaWidth=0;
	    
	    	
			
			function dispalyImage(elm,path,width){	
			globlaWidth=width;			
				var str='';
				if(width>0){
					str=" style='width:"+width+"px;'";
				}
				element=elm				
				if(!visibleFlag){					
					document.getElementById(elm).style.display='block';
					
					var str="<img src='"+path+"' "+str+" onmouseover='dispalyImage('"+elm+"','"+path+"')' onmouseout='removeImage('"+elm+"')'  onmousemove='moveImage(event,'"+elm+"')' />";
					document.getElementById(elm).innerHTML=str;
						
						//alert(str);
						
					document.getElementById(elm).style.MozOpacity=1;
					 document.getElementById(elm).style.opacity=1;			
					display();		
												
					visibleFlag=true;
				}				
			}
			
			function display(){			
					count=i/100;
					document.getElementById(element).style.MozOpacity=count;
				 	document.getElementById(element).style.opacity=count;				
				 	
				 	if(count<1){				
				 		setTimeout('display()',2);
				 		i++;
				 	}
				
			}
			
			function removeImage(elm){			
				if(visibleFlag){
					document.getElementById(elm).style.display='none';
					i=0;
					visibleFlag=false;
				}	
			}
			var right=0;
			function moveImage(e,elm,id){
				//alert(id);
				if((id==null) || (id==""))
				{
					var x=e.clientX;
					var y=e.clientY;				
					document.getElementById(elm).style.left=x+5+"px";	 
					document.getElementById(elm).style.top=y+5+"px";
					right=globlaWidth+x+40;
					
					//document.getElementById("test").innerHTML=right+" | "+window.innerWidth;
					if(window.innerWidth<right){
						document.getElementById(elm).style.left=x-globlaWidth-10+"px";	
					}	
					//alert("no image id");
				}else{
					//alert(id);
					e = e || window.event;
					var cursor = {x:0, y:0};
					if (e.pageX || e.pageY) {
						cursor.x = e.pageX;
						cursor.y = e.pageY;
					} 
					//alert(cursor.y);
					else {
						var de = document.documentElement;
						var b = document.body;
						cursor.x = e.clientX + 
							(de.scrollLeft || b.scrollLeft) - (de.clientLeft || 0);
						cursor.y = e.clientY + 
							(de.scrollTop || b.scrollTop) - (de.clientTop || 0);
					}
					//alert(cursor.y);
					
					
					
					var newid=id*200;
					var x=e.clientX;
					var y=e.clientY;
					//alert(globlaWidth);
					document.getElementById(elm).style.left=250+"px";	 
					document.getElementById(elm).style.top=cursor.y-200+"px";
					right=globlaWidth+x+40;
					
					//document.getElementById("test").innerHTML=right+" | "+window.innerWidth;
					if(window.innerWidth<right){
						document.getElementById(elm).style.left=x-globlaWidth-10+"px";	
					}	
				}
				
							
				
			}
			function moveImageNew(e,elm,id){
				alert(id);
				var x=e.clientX;
				var y=e.clientY;				
				document.getElementById(elm).style.left=x+5+"px";	 
				document.getElementById(elm).style.top=y+5+"px";
				right=globlaWidth+x+40;
				
				//document.getElementById("test").innerHTML=right+" | "+window.innerWidth;
				if(window.innerWidth<right){
					document.getElementById(elm).style.left=x-globlaWidth-10+"px";	
				}	
							
				
			}
			/***********************************************
* Floating Top Bar script- © Dynamic Drive (www.dynamicdrive.com)
* Sliding routine by Roy Whittle (http://www.javascript-fx.com/)
* This notice must stay intact for legal use.
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

var persistclose=0 //set to 0 or 1. 1 means once the bar is manually closed, it will remain closed for browser session
var startX = 30 //set x offset of bar in pixels
var startY = 5 //set y offset of bar in pixels
var verticalpos="fromtop" //enter "fromtop" or "frombottom"

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

function closebar(){
	//alert("udaya");
if (persistclose)
document.cookie="remainclosed=1"
document.getElementById("topbar").style.visibility="hidden"
}

function staticbar(){
	barheight=document.getElementById("topbar").offsetHeight
	var ns = (navigator.appName.indexOf("Netscape") != -1) || window.opera;
	var d = document;
	function ml(id){
		var el=d.getElementById(id);
		if (!persistclose || persistclose && get_cookie("remainclosed")=="")
		el.style.visibility="visible"
		if(d.layers)el.style=el;
		el.sP=function(x,y){this.style.left=x+"px";this.style.top=y+"px";};
		el.x = startX;
		if (verticalpos=="fromtop")
		el.y = startY;
		else{
		el.y = ns ? pageYOffset + innerHeight : iecompattest().scrollTop + iecompattest().clientHeight;
		el.y -= startY;
		}
		return el;
	}
	window.stayTopLeft=function(){
		if (verticalpos=="fromtop"){
		var pY = ns ? pageYOffset : iecompattest().scrollTop;
		ftlObj.y += (pY + startY - ftlObj.y)/8;
		}
		else{
		var pY = ns ? pageYOffset + innerHeight - barheight: iecompattest().scrollTop + iecompattest().clientHeight - barheight;
		ftlObj.y += (pY - startY - ftlObj.y)/8;
		}
		ftlObj.sP(ftlObj.x, ftlObj.y);
		setTimeout("stayTopLeft()", 10);
	}
	ftlObj = ml("topbar");
	stayTopLeft();
}

if (window.addEventListener)
window.addEventListener("load", staticbar, false)
else if (window.attachEvent)
window.attachEvent("onload", staticbar)
else if (document.getElementById)
window.onload=staticbar
	    