	
//----------------------------------------------------------------------
	
	function submitFindUser(strSelectedForm){

		var strFormName = "simple_search_form";
		var elementName1 = "chosenForm";

		if(document.all){
			
			document.forms[strFormName].elements[elementName1].value =	strSelectedForm;
			document.forms[strFormName].submit();
		}else{
			document.simple_search_form.chosenForm.value = strSelectedForm; 
			document.simple_search_form.submit();
		}

	}

//---------------------------------------------------------------------------------------------

function loadChat(){

	var strFileName = "http://www.chat-one.com/miniChat/miniChatRH.asp?UID=1711&AC=WBPBMU";
	var strTitle    = "camDates_Chat";
	var intWidth    = "452";
	var intHeight   = "210";
	var strScroll   = "no";

	popWindow(strFileName,strTitle,intWidth,intHeight,strScroll);

}

//---------------------------------------------------------------------------------------------

function loadCamdatesQAndA(qandaRoot){

	var strFileName = qandaRoot+"/intro2.php";
	var strTitle    = "camDatesQandA";
	var intWidth    = "800";
	var intHeight   = "600";
	var strScroll   = "no";

	popWindow(strFileName,strTitle,intWidth,intHeight,strScroll);
}

//---------------------------------------------------------------------------------------------

function refreshMenu(serverRoot,selectedMenuItem){
		
	FrameName="naviFrame";
	parent.frames[FrameName].location.href= serverRoot+"/menu/menu.php?selectedMenuItem="+selectedMenuItem+"&selectedMemberMenuItem="+selectedMenuItem;
}

//---------------------------------------------------------------------------------------------

function loadHomePage(serverRoot){

	FrameName="contentFrame";
	parent.frames[FrameName].location.href= serverRoot+"/intro.php";
}

//---------------------------------------------------------------------------------------------

function loadCamDatesHome(serverRoot){
	//alert("I*****");
	top.location.href=serverRoot+"/index.php";
}

//---------------------------------------------------------------------------------------------

function loadIntroFromPopup(serverRoot){

	FrameName="mainFrame";
	top.opener.location.href= serverRoot+"/intro.php";
	top.close();
}
//---------------------------------------------------------------------------------------------

function loadLoginPage(serverRoot){

	FrameName="mainFrame";
	top.frames[FrameName].location.href= serverRoot+"/content_loader.php?targetPage=intro.php";
}

//---------------------------------------------------------------------------------------------

function unregisteredUserInfo(serverRoot){
	
	//FrameName="mainFrame";
	//top.frames[FrameName].location.href= serverRoot+"/home.php?unregisteredUser=1";
	//alert("You need to log on to the system inorder to initiate this action.\n login or get registered and then come back.");
	document.location.href= serverRoot+"/unregistereduser.php";

}

//---------------------------------------------------------------------------------------------

function unregisteredUserInfo2(serverRoot){
	
	opener.location.href= serverRoot+"/unregistereduser.php";
	self.close();
}

//---------------------------------------------------------------------------------------------

function reloadForumFrame(fileName){	opener.location.href=fileName;	}

//---------------------------------------------------------------------------------------------

function closeWindow(){	top.close();	}

//---------------------------------------------------------------------------------------------

function popNewRomanceTipDialog(serverRoot){

	strFileName = serverRoot + "/romance_tips/new_romance_tip.php";
	strTitle    = "camDates_Romance_Tips";
	intWidth    = "540";
	intHeight   = "430";
	strScroll   = "no";

	popWindow(strFileName,strTitle,intWidth,intHeight,strScroll);

}

//---------------------------------------------------------------------------------------------

function popNewJokeDialog(serverRoot){

	strFileName = serverRoot + "/jokes/new_joke.php";
	strTitle    = "camDates_Post_A_Joke";
	intWidth    = "540";
	intHeight   = "340";
	strScroll   = "no";

	popWindow(strFileName,strTitle,intWidth,intHeight,strScroll);
}


//---------------------------------------------------------------------------------------------


function popNewMemberMessageDialog(serverRoot,receiverID, receiverName){

	strFileName = serverRoot + "/user_profiles/new_member_message.php?receiverID="+receiverID+"&receiverName="+receiverName;
	strTitle    = "camDates_New_Message";
	intWidth    = "650";
	intHeight   = "350";
	strScroll   = "yes";

	popWindow(strFileName,strTitle,intWidth,intHeight,strScroll);
}


//---------------------------------------------------------------------------------------------

function popUserProfile(serverRoot,userID){

	strFileName = serverRoot + "/user_profiles/member_profile.php?userID="+userID;
	strTitle    = "camDates_Member_Profile";
	intWidth    = "650";
	intHeight   = "800";
	strScroll   = "yes";

	popWindow(strFileName,strTitle,intWidth,intHeight,strScroll);
}


//---------------------------------------------------------------------------------------------

function popNewForumDialog(serverRoot){

	strFileName = serverRoot + "/forums/new_forum.php";
	strTitle    = "camDates_NewForum";
	intWidth    = "650";
	intHeight   = "350";
	strScroll   = "yes";

	popWindow(strFileName,strTitle,intWidth,intHeight,strScroll);
}

//---------------------------------------------------------------------------------------------

function popNewForumMessage(serverRoot,forumID, forumCategory){

	strFileName = serverRoot + "/forums/new_message.php?forumID="+forumID+"&forumCategory="+forumCategory;
	strTitle    = "camDates_NewForumMessage";
	intWidth    = "700";
	intHeight   = "400";
	strScroll   = "yes";

	popWindow(strFileName,strTitle,intWidth,intHeight,strScroll);
}

//---------------------------------------------------------------------------------------------

function popCamDatesForum(serverRoot){

	strFileName = serverRoot + "/forums/forum_list.php";
	strTitle    = "camDates_Forums";
	intWidth    = "800";
	intHeight   = "600";
	strScroll   = "yes";

	popWindow(strFileName,strTitle,intWidth,intHeight,strScroll);
}

//---------------------------------------------------------------------------------------------

function refreshBackendMenu(selectedMenuItem, serverRoot){

	FrameName="menuFrame";
	//alert(top.frames[FrameName]);
	//alert(parent.frames["menuFrame"]);
	parent.frames[FrameName].location.href= serverRoot+"/menu/menu.php?selectedMenuItem="+selectedMenuItem;

}

//---------------------------------------------------------------------------------------------

function refreshBackendLogoFrame(serverRoot){
	
	FrameName="logoFrame";
	top.frames[FrameName].location.href=serverRoot+"/logo.php";
	//alert("Refreshing the Logo Frame");
}

//---------------------------------------------------------------------------------------------

function loadBackendLoginPage(){ top.document.location.href="../index.php";}

//---------------------------------------------------------------------------------------------


function submitWithoutEvaluation(strFormName, elementName, elementValue){

	document.forms[strFormName].elements[elementName].value =elementValue;
	document.forms[strFormName].submit();
}

//---------------------------------------------------------------------------------------------

function popUserCommentForm(serverRoot){

	strFileName = serverRoot + "/site_utilities/p_user_comment.php";
	strTitle    = "camDates_UserComments";
	intWidth    = "540";
	intHeight   = "340";
	strScroll   = "no";

	popWindow(strFileName,strTitle,intWidth,intHeight,strScroll);
}

//---------------------------------------------------------------------------------------------

function changePic(name,newpic){

	if (document.images) //mouseover supported
		document.images[name].src = newpic;
}

//---------------------------------------------------------------------------------------------


function popWindow(strFileName,strTitle,intWidth,intHeight,strScroll) {

	//var intHeight;
	//var intWidth;
	
	windowObject = window.open(strFileName,strTitle,"width=" + intWidth + ",height=" + intHeight + ",toolbar=no,menubar=no,resizable=no,scrollbars=" + strScroll);
	windowObject.focus();

	//intHeight = (screen.height / 4);
	//intWidth  = (screen.width / 4);
	windowObject.moveTo(0,0);
	
}

//---------------------------------------------------------------------------------------------

function LoadTwoFrames(URL1,F1,URL2,F2){
	
	parent.frames[F1].location.href = URL1;
	parent.frames[F2].location.href = URL2;
}

//---------------------------------------------------------------------------------------------


function countCharacters(formName, elementName, maxCharCount){

	var elementContent = document.forms[formName].elements[elementName].value;
	var length = elementContent.length;

	if(length > maxCharCount){
		document.forms[formName].elements[elementName].value = elementContent.substr(0,maxCharCount);
		alert("You cannot enter more than "+ maxCharCount + " words\nWhy don't you try summarizing ?");
	}

}

//---------------------------------------------------------------------------------------------

function addToCrushList(serverRoot, userID, crushID){

	strFileName = serverRoot + "/user_profiles/add_to_crushlist.php?userID="+userID+"&crushID="+crushID;
	strTitle    = "camDates_Add_To_Crush_List";
	intWidth    = "1";
	intHeight   = "1";
	strScroll   = "no";

	popWindow(strFileName,strTitle,intWidth,intHeight,strScroll);

}

//---------------------------------------------------------------------------------------------

function askMeForMyPicture(serverRoot, userID, requesterID){
	
	
	strFileName = serverRoot + "/user_profiles/request_picture.php?userID="+userID+"&requesterID="+requesterID;
	strTitle    = "camDates_Ask_Me_For_My_Picture";
	intWidth    = "1";
	intHeight   = "1";
	strScroll   = "no";

	popWindow(strFileName,strTitle,intWidth,intHeight,strScroll);

}

//---------------------------------------------------------------------------------------------

function popTellAFriendDialog(serverRoot){

	strFileName = serverRoot + "/site_utilities/tell_a_friend.php";
	strTitle    = "camDates_Tell_A_Friend";
	intWidth    = "540";
	intHeight   = "340";
	strScroll   = "no";

	popWindow(strFileName,strTitle,intWidth,intHeight,strScroll);

}

//---------------------------------------------------------------------------------------------


function popASiteUtility(serverRoot, targetPage){

	strFileName = serverRoot + "/site_utilities/utilities_content_loader.php?targetPage="+targetPage;
	strTitle    = "camDates_Terms_Of_Use";
	intWidth    = "600";
	intHeight   = "500";
	strScroll   = "yes";

	popWindow(strFileName,strTitle,intWidth,intHeight,strScroll);

}

//---------------------------------------------------------------------------------------------

function loadVDayPoemMovie(serverRoot){

	strFileName = serverRoot + "/vday/flash/index.php";
	strTitle    = "ValentinesDayPoem";
	intWidth    = "788";
	intHeight   = "450";
	strScroll   = "no";
	
	popWindow(strFileName,strTitle,intWidth,intHeight,strScroll);

}

//---------------------------------------------------------------------------------------------

function loadQandA(serverRoot, go_to, question, data){
	
	strFileName = serverRoot + "/qanda/intro2.php?go_to=" + go_to + "&question=" + question + "&data=" + data;
	strTitle    = "camDatesQandA";
	intWidth    = "800";
	intHeight   = "600";
	strScroll   = "no";
		
	popWindow(strFileName,strTitle,intWidth,intHeight,strScroll);
}

//---------------------------------------------------------------------------------------------

function comingSoon(){

	alert("This feature of camDates is still under constructioon.");
}	

//---------------------------------------------------------------------------------------------
