indg=0;
function __anim() {
	


	clearTimeout(int_id);	
	// we animate on cur_x, and then we set it to the object itself
	cur_x += (target_x - cur_x) * 0.3;	
	if (Math.abs(target_x - cur_x) < 5) {
		cur_x = target_x;		
	}	
	cur_x = Math.floor(cur_x); // divs don't have decimal positions, so we need the integer part only		
	var obj = D("container");
	obj.style.left = cur_x + "px";	
	if (cur_x != target_x) {
		// we're still not quite there yet, so repeat the animation call.
		int_id = setTimeout(__anim, speed);
	} else {		
	
	}	
}
	


function D(n) { return document.getElementById(n); }

try {
	if (menudef) {}
} catch(ex) {
	menudef = 0;
}

	function show_block(id){
				var obj=document.getElementById(id);
				obj.style.display="block";
		}
		
	function show_table(id){
				var obj=document.getElementById(id);
				obj.style.display="table";
		}		
		
	function hideme(id){
	var obj=document.getElementById(id);
	obj.style.display="none";
}	


function eatenter(e,objf){
var mcode=e.keyCode? e.keyCode : e.charCode;

if(mcode==13){
	objf.submit();
}
}


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_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_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 cngbg(obj1,nc1){
	var objv1=document.getElementById(obj1);	
	if(objv1){
		objv1.nc1=objv1.className;
		objv1.className=nc1;		
	}

}

function show_related(obj,len){
	
	//alert(obj+" "+len);
	
	var str1="";
	if(obj){
	
		for(var i=0;i<len;i++){
			str1="inst_";
			str1+=i;
			cngbg(str1,'inst_off');			
		}
		//alert(str1);
		var str1="inst_";
		str1+=obj.value;
		//alert(str1);
		cngbg(str1,'inst_on');
	}
	
	
	}


function open_close(obj1,nc1,nc2){
	
	var objv1=document.getElementById(obj1);

	if(objv1.className==nc1){
		cngbg(obj1,nc2);
	}	
	else{
			if(objv1.className==nc2){
				cngbg(obj1,nc1);
			}
		}
}
function open_close2(obj1,nc1,nc2){
	
	var objv1=document.getElementById(obj1);

	if(objv1.className==nc1){
		cngbg(obj1,nc2);
	}	
	else{
			if(objv1.className==nc2){
				cngbg(obj1,nc1);
			}
		}
}




function openit(uri){

	window.location.href=uri;
}

function check_form(objfomr){

	var gtb=true;
	with(objfomr){
		
		if(fname.value==""){
			alert('please enter your first name');
			gtb=false;
			return;
			}
		if(lname.value==""){
			alert('please enter your last name');
			gtb=false;
			return;
			}
		if(phone.value==""){
			alert('please enter your phone number');
			gtb=false;
			return;
			}			
		
		if(email.value==""){
			alert('please enter your email address');
			gtb=false;
			return;
		}	
		if(!checkEmail(email)){
			alert("Please enter a valid e-mail !!");
			gtb=false;
			return;
		}		
		if(adr.value==""){
			alert('please enter your address');
			gtb=false;
			return;
		}	
		/*if(message.value==""){
			alert('please enter your concerns');
			gtb=false;
			return;
		}*/	
		
		if(gtb==true){
		submit();
		}
		}
	
}

function checkEmail(fld){
  if(!fld.value.length||fld.disabled) return true; // blank fields are the domain of requireValue 
	  var emailfmt= /^\w+([.-]\w+)*@\w+([.-]\w+)*\.\w{2,8}$/;
	  if(!emailfmt.test(fld.value)) {
	  	 return false;
     }
	 return true;
}


function check_form2(objfomr){

	var gtb=true;
	with(objfomr){
		
		if(fname.value==""){
			alert('please enter your first name');
			gtb=false;
			return;
			}
		if(lname.value==""){
			alert('please enter your last name');
			gtb=false;
			return;
			}
		if(phone.value==""){
			alert('please enter your phone number');
			gtb=false;
			return;
			}			
		
		if(email.value==""){
			alert('please enter your email address');
			gtb=false;
			return;
		}	
		if(!checkEmail(email)){
			alert("Please enter a valid e-mail !!");
			gtb=false;
			return;
		}		
		/*if(position.value==""){
			alert('please enter job position');
			gtb=false;
			return;
		}	*/
		if(message.value==""){
			alert('please enter your concerns');
			gtb=false;
			return;
		}	
		
		if(strresume.value==""){
			alert('please add your resume');
			gtb=false;
			return;
		}			
		
		if(gtb==true){
		submit();
		}
		}
	
}

function empty_feed(onj,onj2){

	if(onj.value=="username"){
		onj.value="";
	}	


	if(onj2.value==""){
		
		//onj2.value="password";
	}

	
}

function empty_feed2(onj,onj2){

	if(onj.value=="password"){
		onj.value="";
	}	


	if(onj2.value==""){
		//onj2.value="username";
	}
}



var XXX=0;
var YYY=0;







function obj_positioning(layername){
		

		
		var pp = $('#'+layername);
		var offs = pp.offset();


		
		 YYY = offs.top;
		 XXX =offs.left;	
		 
		 var hscroll = (document.all ? document.scrollLeft : window.pageXOffset);
		var vscroll = (document.all ? document.scrollTop : window.pageYOffset);

		 XXX =XXX-hscroll-100;	
		 YYY =YYY-vscroll-56;
		 	 
		 
     //alert("x="+XXX+" y="+YYY);

      var cssObj = {'top' : YYY+'px','left' :  XXX+'px'};
		
		
    $("#TB_window").css(cssObj);
	 

	}

	function getAbsX(elt) { return (elt.x) ? elt.x : getAbsPos(elt,"Left"); }
	function getAbsY(elt) { return (elt.y) ? elt.y : getAbsPos(elt,"Top"); }
	
	function getAbsPos(elt,which) {
	iPos = 0;
	while (elt != null) {
	iPos += elt["offset" + which];
	elt = elt.offsetParent;
	}
	return iPos;
	}

function lets_go(hre){
	window.location.href=hre;
	
	}
	
	

function lets_open(hre){
	window.open(hre);
	
	}	
	
	
