﻿var otherFunction = false; //если  установлен в true, тогда профиль не показываеться автоматически

function GetProfile(obj)
{
	//changes the border as the user click in the card
	if(document.getElementsByTagName)
	{//loop through and turn off any that are on
  var divItem = document.getElementsByTagName('DIV');
		for(var i=0; i<divItem.length; i++)
		{
		 var oldClassName = 	new String(divItem[i].className);
			divItem[i].className = oldClassName.replace('Over','');
		}
	}	
	var currentClass = new String(obj.className);
	obj.className = currentClass + 'Over'; //add the over to the cur class and replace	
	
	if(otherFunction != true)
	{	//if the otherFunction (indicates not to open profile) is false, open profile
		var femaleAccount = obj.id;	
		var navMainLocal = new String(parent.centerframe.location);
		navMainLocal = navMainLocal.toLowerCase();	
		if (!(navMainLocal.indexOf('profile.php') > -1 && navMainLocal.indexOf(femaleAccount) > -1))
		{	
			parent.centerframe.location = './profile.php?toid=' + femaleAccount;
		}	
	}
	else
	{
		otherFunction = false;
	}			
}

function home()
{
parent.frames[2].location = "./include/home.php";
prev_left()
}

function login()
{
parent.frames[2].location = "./authorization/login.php";
prev_left()
}

function joinnow()
{
parent.frames[2].location = "./include/home.php";
//location = "./adminpanel/";
prev_left()
}

function search()
{
parent.frames[2].location = "./include/search.php";
prev_left()
}

function services()
{
parent.frames[2].location = "./include/services.php";
parent.frames[1].location = "./menu_services.php"; 
}

function giftshop()
{
parent.frames[2].location = "./giftshop/giftshop.php";
prev_left()
}

function traveling()
{
parent.frames[2].location = "./include/traveling.php";
parent.frames[1].location = "./menu_traveling.php"; 
}

function userhelp()
{
parent.frames[2].location = "./include/userhelp.php";
parent.frames[1].location = "./menu_userhelp.php"; 
}

function aboutus()
{
parent.frames[2].location = "./include/contact_us.php";
prev_left()
}

function testimonials()
{
parent.frames[2].location = "./include/testimonials.php";
prev_left()
}

//----------prev left
function prev_left()
{
parent.frames[1].location = "./left_menu_frame.php";
}
//-----------Romantic tours---------------------------
function romantictours()
{
//parent.frames[2].location = "./include/romantic_services/romantictours.php";
//parent.frames[1].location = "./menu_romantictours.php"; 
parent.frames[2].location = "./include/traveling.php";
parent.frames[1].location = "./menu_traveling.php"; 
}
function romantictours_menu()
{
parent.frames[2].location = "./include/romantic_services/romantictours.php";
}
function romantictour_private()
{
parent.frames[2].location = "./include/romantic_services/romantictour_private.php";
}

function romantictour_romance()
{
parent.frames[2].location = "./include/romantic_services/romantictour_romance.php";
}

function romantictour_romance_plus()
{
parent.frames[2].location = "./include/romantic_services/romantictour_romance_plus.php";
}

function romantictour_vip()
{
parent.frames[2].location = "./include/romantic_services/romantictour_vip.php";
}

function createyour_own_tour()
{
parent.frames[2].location = "./include/romantic_services/createyour_own_tour.php";
}

function romantic_services()
{
parent.frames[2].location = "./include/romantic_services/romantic_services.php";
}


