


    //If Someone Browses to art.php with no parameters, do a search
	 if(CurrentLocation.indexOf("art.php") > 0){
		var localURLpos = CurrentLocation.indexOf("art.php");
		var localURL = CurrentLocation.substring(localURLpos);
		if(localURL == "art.php"){
		     //alert(localURL);
			mySearchArt();
		}
	 }
 
    if(document.location.hash){
	  //alert("using Hash");
		//If Site Was BookMarked or Refresh Button Was clicked.
		var HashLocationName = document.location.hash;
		HashLocationName = HashLocationName.replace("#","");
 
			
			if(HashLocationName == "Signup"){
				myShowSignupForm();
			}
			if(HashLocationName == "ForgotPassword"){
				showForgotPasswordForm('txtPageContent');
			}
		   
			if(HashLocationName == "MyGalleries"){
				myShowGalleries();
			}
			if(HashLocationName == "EditMyProfile"){
				showEditArtistProfileForm(0,'txtPageContent');
			}
			if(HashLocationName == "AddWork"){
				showJavaPlowUploadForm('txtPageContent');
			}
			
			//if(HashLocationName == "Search"){
			//	mySearchArt();
			//}
			
			//Oct 12th, 2009 - Andrew Crouse
			//Removed The Back Search as the front search is working properly.
			//Back search is causing the search to happen twice.
			/*
			if(HashLocationName.substring(0,6) == "Search"){
			    alert('Back Search');   
				var colPos = HashLocationName.indexOf(":");
				if(colPos > 0){
					//Use ID from URL (Was Bookmarked)
					var histPage = HashLocationName.substring(colPos + 1);
					mySearchArt(histPage);
				}else{
					//Use History ID
					mySearchArt(1);
				}	
			}
			*/
			
			
			if(HashLocationName == "Schools"){
				showSchoolAddForm('txtPageContent')
			}
			if(HashLocationName == "Continents"){
				showManageLists('continents','txtPageContent',1)
			}
			if(HashLocationName == "Countries"){
				showManageLists('countries','txtPageContent',1)
			}
			if(HashLocationName == "Provinces"){
				showManageLists('provinces_states','txtPageContent',1)
			}
			if(HashLocationName == "Moods"){
				showManageLists('mood','txtPageContent',1)
			}
			if(HashLocationName == "Genres"){
				showManageLists('genre','txtPageContent',1)
			}
			if(HashLocationName == "Materials"){
				showManageLists('material','txtPageContent',1)
			}
			if(HashLocationName == "Medium"){
				showManageLists('medium','txtPageContent',1)
			}
			if(HashLocationName == "MediumTypes"){
				showManageMediumTypesLists('medium','txtPageContent',1);	
			}
			
			
			
			//Page Content
			if(HashLocationName == "Copyright"){
				showPageContent('copyright_policy.php');window.scrollTo(0, 0);
				showBreadCrumb1('Copyright Policy');
			}
			if(HashLocationName == "About"){
				showPageContent('about.php');window.scrollTo(0, 0);
				showBreadCrumb1('About');
			}
			if(HashLocationName == "Etiquette"){
				showPageContent('etiquette.php');window.scrollTo(0, 0);
				showBreadCrumb1('Etiquette');
			}
			if(HashLocationName == "Privacy"){
				showPageContent('privacy_policy.php');window.scrollTo(0, 0);
				showBreadCrumb1('Privacy Policy');
			}
			if(HashLocationName == "Terms"){
				showPageContent('terms_of_service.php');window.scrollTo(0, 0);
				showBreadCrumb1('terms of service');
			}
			
			//Artist Search
			//if(HashLocationName == "ArtistSearch"){
			//	showSearchArtistForm('txtPageContent');
			//}
			
			
			//if(HashLocationName == "DescribeWork"){
			//	showDescribeWork(historyData,1,'txtPageContent')
			//}
			
			if(HashLocationName.substring(0,7) == "ShowArt"){
				
			    var colPos = HashLocationName.indexOf(":");
				if(colPos > 0){
					//Use ID from URL (Was Bookmarked)
					var histArtId = HashLocationName.substring(colPos + 1);
					//Determine if you are already on this Page
					if(document.getElementById("txtShowArtID") != null){
					   if(document.getElementById("txtShowArtID").value != histArtId){
							//alert("BACK URL SEARCH");
							showArt(histArtId,0,'txtPageContent');
						}
					}else{
						//alert("BACK URL SEARCH");
						showArt(histArtId,0,'txtPageContent');
					}
				}else{
				    mySearchArt();
					//Use History ID
					//showArt(historyData,0,'txtPageContent');
				}
				
			}
			
			if(HashLocationName.substring(0,13) == "InboxCritique"){
			    var person_id = $("#txtUserID").value;
			    var colPos = HashLocationName.indexOf(":");
				if(colPos > 0){
					//Use ID from URL (Was Bookmarked)
					var histArtId = HashLocationName.substring(colPos + 1);
					showInboxCritiques(person_id, histArtId,'txtPageContent');
					//alert("use HistColin");
				}else{
					//Use History ID
					showInboxCritiques(person_id,0,'txtPageContent');
					//alert("use hisotryData");
				}
				
			}
			
			//if(HashLocationName == "Wall"){
			//	showArtistProfile(0,0,'txtPageContent');
			//}
			
			if(HashLocationName.substring(0,13) == "ArtistProfile"){
			    var colPos = HashLocationName.indexOf(":");
				if(colPos > 0){
					//Use ID from URL (Was Bookmarked)
					var histArtId = HashLocationName.substring(colPos + 1);
					showArtistProfile(histArtId,0,'txtPageContent');
					//alert("use HistColin");
				}else{
					//Use History ID
					//showArtistProfile(historyData,0,'txtPageContent');
					//alert("use hisotryData");
				}
			}
		
		
	}else{

	}
	//editAdSpace("SHOWAD","RIGHT","txtRightAdSpace");
	
	

