var xmlHttp = "";
var browser =	this.name = navigator.appName; //Browser Information 
var	oldTop = 0;
var newLeft   = 0;
var newHeight = "";

function getBrowserHeightWidth(){

						clientWidth  = document.body.clientWidth ;			
						clientHeight = document.body.clientHeight;			
						clientWidth  = clientWidth / 2;
						newLeft      = clientWidth -150;
						newHeight    = eval(clientHeight - 420);	
		}
function showLoadingTblProcess(){

								
								wTbl = document.getElementById("txt");
								wTbl.style.display = 'block';
								wTbl.style.left    = newLeft + "px" ;
								wTbl.style.top     = newHeight + "px";	
	}
function hideLoadingTblProcess(){

								
								wTbl = document.getElementById("txt");
								wTbl.style.display = 'none';
		}

function getTableName(idName){

			TBL = "";
			if(browser=="Netscape")
							  { 
								mainTable = document.getElementsByTagName("table");
								for(i=0 ; i < mainTable.length ; i++){
										if(mainTable[i].id == idName){ TBL = mainTable[i];}
									}
					}else{if(document.getElementById(idName))TBL = document.getElementById(idName);}
			return TBL;
	}


function showTable(tblId){
	
			tbl = getTableName(tblId);
			mainTable = document.getElementsByTagName("table");
			for(i=0 ; i < mainTable.length ; i++){
					if(mainTable[i].id != ""){ mainTable[i].style.display = 'none';}
				}
			field  = document.getElementsByTagName("fieldset");
			for(i=0 ; i < field.length ; i++){
					if(field[i].id != ""){ field[i].style.display = 'none';}
				}
		tbl.style.display = 'block';				
	}
	divId = "";
	timeOut = "";
	artIdV = "";
	i=2;
function showArt(artId){
		artIdV = getTableName(artId);
		artIdV.style.display = 'block';
		id = document.getElementById("txt");
		getBrowserHeightWidth();	  								
		id.style.display = 'block';
		newHeight = newHeight + 150;
		if(document.body.scrollTop > newHeight )document.body.scrollTop = newHeight;;

		
		newLeft = newLeft - 200;
		id.style.left    = newLeft + "px" ;
		id.style.top     = newHeight + "px";	
		showSlide();
	}
	function showSlide(){
		
		id = document.getElementById("txt");
		id.style.width = i+"px";
		if(i < 600){timeOut = setTimeout("showSlide()",1);i = i + 10;}
		else{clearTimeout(timeOut);i=20; timeOut = ""; showSlide2();}
		}
	function showSlide2(){
		
		id = document.getElementById("txt");
		id.style.height = i+"px";
		if(i < 500){timeOut = setTimeout("showSlide2()",1);i = i + 10;}
		else{clearTimeout(timeOut);i=2; }
		}	
	function closeTbl(){
		
		artIdV.style.display = 'none';
		artIdV = "";
		id = document.getElementById("txt");	  								
		id.style.display = 'none';
		id.style.width = "2px";
		id.style.height = "10px";
		
		}
		
		
		function checkTextField(textObj)
		{ 
				if(textObj.value == ""){textObj.focus();return false;}
				else if(textObj.value == " "){textObj.focus();return false;}
				else if(textObj.value.length ==0){textObj.focus();return false;}
				return true;
		}
function checkemail(x)
	{
			if(x.value == ""){x.focus();return false;}
			if(x.value.indexOf("@") == -1){x.focus();return false;}
			if(x.value.indexOf(".") == -1){x.focus(); return false;}
			if(x.value.indexOf("@") == 0) {x.focus();return false;}
			if(x.value.indexOf(".") == 0){x.focus(); return false;}
			return true;
	}

function  CHKFILE(file)
	{
		 imgRe = /^.+\.(jpg|jpeg|gif|png)$/i;
		 if(file.search(imgRe) == -1)return false;
		 else return true;
	}

function CHKNUM(x)
		{

		var code ;
		if(!e) var e = window.event;
		if(e.keyCode) code= e.keyCode;
		else if(e.which) code = e.which;
		var character =  String.fromCharCode(code);
		if( (code >= 48 && code <= 57) || (code == 46) || (code == 45) )return true;
		else return false;
		}
function chkIfPhoneNumber(x)
		{

		var code ;
		if(!e) var e = window.event;
		if(e.keyCode) code= e.keyCode;
		else if(e.which) code = e.which;
		var character =  String.fromCharCode(code);		
		if( (code >= 48 && code <= 57) || (code == 46) || (code == 45) || (code == 40) || (code == 41) || (code == 43))return true;
		else return false;
		}

	
		
