var IsResize = true;
var ResizeControls = [{h:"regAccount",c:"regBuyer"},{h:"regAccount",c:"regSupplier"}];
var tempId;



			  function ResizeControl(cId)
			  {	
				this.Controls = Tools.Get(cId);
				with(this.Controls.style)
				{
					this.Width = arguments[1] || 300;;
					this.Height = arguments[2] || 300;;
					this.Display = display;
					this.setUp = 1;
					
				}
				this.Resize = function ()
				{
					if(this.Display == "none")
					{						
						this.Controls.style.display = "block";
						timer = window.setTimeout("Display('"+cId+"')",10);
					}
					else
					{
					if(timer)
					clearTimeout(timer);
						timer = window.setTimeout("Hidden('"+cId+"')",10);
					}
				}

			  }
				function Display(id)
				{
					var con = Tools.Get(id).style;
					var cons = Tools.Get(id);
					if(parseInt(cons.scrollHeight) <= parseInt(cons.clientHeight) )
					{	
						cons.style.overflow="visible";
						con.height = "auto";
						
						window.clearTimeout(timer);
						return ;
					}
					con.height = (parseInt(con.height) +10 ) +"px";
					timer = window.setTimeout("Display('"+id+"')",1);
				}

				function Hidden(id)
				{
					var con = Tools.Get(id).style;
					if(parseInt(con.height) <= 10 )
					{
						con.display ="none";
						window.clearTimeout(timer);
						return ;
					}
					con.height = (parseInt(con.height) - 10 ) +"px";
					timer = window.setTimeout("Hidden('"+id+"')",1);
				}


			  function Tools()
			  {

			  }
			  Tools.Get = function (name)
			  {
				return document.getElementById(name);
			  }
			  Tools.Resize = function (count)
			  {		
			       if($get("UC_Register_StepOne1_country").selectedIndex == 0||($get("UC_Register_StepOne1_country").value+"").trim()=="-1")
			       {
			            //window.alert("Please select your Country/Region.");
			            return;
			       }
			    //Tools.Get("regTerms").style.display= "block";
				//Tools.Get(ResizeControls[count].c).style.display = "block";
				//Tools.Get(ResizeControls[count==0?1:0].c).style.display="none";
					
			  }
			  
			  Tools.Default = function ()
			  {
			    $get("regAccount").style.overflow = "visible";
			    $get("regAccount").style.display="block";
			    //$get("regAccount").style.height = $get("regAccount").clientHeight;
			    $get("regAccount").style.height ="auto";
			    Tools.Get("regTerms").style.display= "block";
			  }
			  
			  function RadioCheck(context)
			  {
//			        if($get("UC_Register_StepOne1_country").selectedIndex == 0)
//			        {
//			            context.checked = false;
//			        }
			  }