GTECH_FORM_CLASS = new Class({
    initialize : function(options){
    	this.options = Object.extend({
    		jsBaseDir : "js_local/",
    		hintDivId : "GtechHintDiv"
    	},options||{});
    },
    simpleHint : function(hintString,x,y,withAnimation){
    	var hintDiv = $(this.options.hintDivId);
    	if (!hintDiv){
    		hintDiv = new Element('div');    		    		
    	}
    	if (hintDiv){
    		hintDiv.setProperty('id',this.options.hintDivId).setStyles({'display':'inline','position':'absolute','left':x+'px','top':y+'px','height':'100px'})
    		//hintDiv.setHTML("<span class=\"hint\"><span class=\"hint-pointer\">pointer&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>"+hintString+"</span>");
    		hintDiv.setHTML("<table cellpadding=0 cellspacing=0 BORDER=0 ><tr><td valign=top class='hintpoiterbg' >&nbsp;</td><td class='hint' style='border-left:0px;' >"+hintString+"</td></tr></table>");
    		hintDiv.injectInside(document.body)    		
    		if (withAnimation){
    			hintDiv.setStyle("opacity",0);
    			hintDiv.setStyle("margin-left",50);
    			var fx = new Fx.Styles(hintDiv, {duration:200, wait:false});
    			fx.start({'opacity':100,'margin-left': 0});
    		}    		
    		
    	}
    },
    showHint : function(hintString,hintOwnerId){
    	var hintOwner = $(hintOwnerId);    	
    	if (hintOwner){
    		
    		var coor = hintOwner.getCoordinates();
    		this.simpleHint(hintString,coor['left']+coor['width']+10,coor['top'],true);
    	}
    },
    hideHint : function(withAnimation){
    	var hintDiv = $(this.options.hintDivId);
    	if (hintDiv){
    		hintDiv.setStyle("display","none");    		    		
    	}
    },
    test : function(){
    	alert('This is test function !!!');
    },
    popup : function(pageURL,PositionX,PositionY,defaultWidth,defaultHeight){
		if (parseInt(navigator.appVersion.charAt(0))>=4){
		var isNN=(navigator.appName=="Netscape")?1:0;
		var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
		var optNN='resizable=yes,scrollbars=yes,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
		var optIE='resizable=yes,scrollbars=yes,width=150,height=100,left='+PositionX+',top='+PositionY;
		if (isNN){imgWin=window.open(pageURL,'',optNN);}
		if (isIE){imgWin=window.open(pageURL,'',optIE);}    	
    }   	
}); 
// END OF GTECH FORM
GTECH_FORM = new GTECH_FORM_CLASS(); 
