function LoadPage(page,divToUse) {

        try {xmlhttp = window.XMLHttpRequest?new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP");}  catch (e) { alert("Error: Could not load the image. Refresh the page, and then try again.");}

        document.getElementById(divToUse).innerHTML = 'Loading Image...';

        scroll(0,0);

        xmlhttp.onreadystatechange = function(){

                if ((xmlhttp.readyState == 4) && (xmlhttp.status == 200)) {

                       document.getElementById(divToUse).innerHTML = xmlhttp.responseText;

                }

        }

        xmlhttp.open("GET", page);

        xmlhttp.send(null);

}



function checkmaxlength(obj){

var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : ""

if (obj.getAttribute && obj.value.length>mlength)

obj.value=obj.value.substring(0,mlength)

}



function popUp(URL) {

	day = new Date();

	id = day.getTime();

	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=500,left = 470,top = 200');");

}



function popUpNewPW(URL) {

day = new Date();

id = day.getTime();

eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=400,height=220,left = 520,top = 350');");

}





function checkAccepted() {

  if (document.registerform['acceptterms'].checked == false) {

   document.registerform['submitregister'].disabled=true

  } else

  document.registerform['submitregister'].disabled=false

}





var uniquepageid=window.location.href.replace("http://"+window.location.hostname, "").replace(/^\//, "")



function v(stra)

{

    return document.all[stra].value;

}



function leavePersonalInfoEdit(goToUrl,errText)

{

	if(v('hiddenrealname')==v('realname') || v('hiddenaddress') == v('address'))

      {		

 	    window.location=goToUrl;

			}

        else

        {

	    var where_to = confirm(errText);

	    if (where_to == true)

	    {

	       window.location=goToUrl;

	    }

	    else

	    {

	 

	    }

	}

}
