
var j$ = jQuery.noConflict();

function ShowHideLogin(){
		
		switch(j$('#homeloginform').css('display')){
			case 'none':
				//change it to up arrow highlight it and show it
				j$('#loginlink').html('Login &#9650;');
				j$('#login').addClass('clickedon');
				j$('#homeloginform').toggle();
				j$('#loginlink').blur();
				j$('#homeloginform #username').focus();
				j$('html').click(function() {
					ShowHideLogin();
				});
				j$('#homeloginform').click(function(event){
					event.stopPropagation();
				});
				j$('#loginlink').click(function(event){
					event.stopPropagation();
				});
				//alert('show');
				break;
			case 'block':
			//change it to down arrow remove highlight and hide it
				j$('#loginlink').html('Login &#9660;');
				j$('#login').removeClass('clickedon');
				j$('#homeloginform').toggle();
				j$('#loginlink').blur();
				j$('html').unbind('click');
				j$('#homeloginform').unbind('click');
				j$('#loginlink').unbind('click');
				break;
			
		}
		
		

	}
	

	
function toggleMenu(){
		switch(j$('#loggedinmenudiv').css('display')){
			case 'none':
				//change it to up arrow highlight it and show it

				j$('#loggedinmenu').html('Welcome '+myName+' &#9650;');
				j$('#login').addClass('clickedon');
				j$('#loggedinmenudiv').toggle();
				j$('#loggedinmenu').blur();
				j$('#loggedinmenudiv #username').focus();
				j$('html').click(function() {
					toggleMenu();
				});
				j$('#loggedinmenudiv').click(function(event){
					event.stopPropagation();
				});
				j$('#loggedinmenu').click(function(event){
					event.stopPropagation();
				});
				break;
			case 'block':
			//change it to down arrow remove highlight and hide it
				j$('#loggedinmenu').html('Welcome '+myName+' &#9660;');
				j$('#login').removeClass('clickedon');
				j$('#loggedinmenudiv').toggle();
				j$('#loggedinmenu').blur();
				j$('html').unbind('click');
				j$('#loggedinmenudiv').unbind('click');
				j$('#loggedinmenu').unbind('click');
				break;
			w
		}
}


    	
        
    	rootLoc = window.location.protocol+'//'+window.location.host+'/';
        oldlocation = window.location.href;
		newlocation = oldlocation.replace(rootLoc,'http://www.isa.org/');
		document.write('<div id="homeloginform" style="display:none;">');
		document.write('<div style="margin:10px;">');
		document.write('<h1>Welcome, ISA Members!</h2>');
		document.write('<form name="Login" action="https://www.isa.org/Template.cfm?Section=General_Information&template=/security/Login.cfm&RequestTimeout=1000" method="post">');

			document.write('<input type="Hidden" name="Redirect" value="'+newlocation+'">');
			document.write('<input type="Hidden" name="RedirectFrom" value="">');
			document.write('<label>Email Address or Member/Customer number</label>');
			document.write('<input type="text" id="username" name="EmailAddress" maxlength=50 value=""><br>');
			document.write('<label>Password: </label>');
			document.write('<input type="password" id="password" name="Password" maxlength=50>  <br>');
			document.write('<div style="clear:both; overflow:auto;">');
			document.write('<div style="float:left;margin-top:4px; margin-bottom:20px;width:30px;"><input type="checkbox" name="KeepLogin" value=1></div>');
			document.write('<div style="float:left; width:200px; margin-top:5px; font-size:12px;font-weight:normal;color:black; line-height:1.2em;">Save this password on my computer for automatic sign in.</div>');
			document.write('</div>');
			document.write('<div style="clear:both;float:none;"></div>');
			document.write('<div><input type="submit" class="loginSubmit" id="submit" value="Sign In">&nbsp;&nbsp;&nbsp;<a href="/Template.cfm?Section=General_Information&template=/security/NoPassword.cfm">Forgot your password?</a></div>');
		 document.write('</form>');
		 document.write('<a href="/join"><h1>New to ISA?</h1></a><br>');
		 document.write('<h2>Members, get your DISCOUNTS on:</h2>');
		document.write('<ul>');
			document.write('<li><a href="http://www.isa.org/Content/NavigationMenu/Products_and_Services/Education_and_Training1/Education_and_Training1.htm">Training</a></li>');
			document.write('<li><a href="http://www.isa.org/Template.cfm?Section=Books3&Template=/books/books.html">Books</a></li>');
			document.write('<li><a href="http://www.isa.org/Template.cfm?Section=ISA_Logo_Merchandise2&Template=/customsource/isa/StoreIntro/MemberGear.cfm">Products</a></li>');
			document.write('<li><a href="http://www.isa.org/Template.cfm?Section=Conferences_and_Exhibitions1&Template=/taggedpage/conferencesbydate.cfm&icid=61">Conferences</a></li>');
		document.write('</ul>');
	document.write('</div>');
	document.write('</div>');
	

