//var abs_url_site = "http://a2zescorts.co.uk/t/" ;
var abs_url_site = "http://a2zescorts.co.uk/" ;

// Temporary variables to hold mouse x-y pos.s
var tempX = 0 ;
var tempY = 0 ;
	
// Detect if the browser is IE or not.
// If it is not IE, we assume that the browser is NS.
var IE = document.all ? true : false ;

window.onload = initMousePos;
window.onscroll = positioning_elements ;

function initMousePos() {
	document.onmousemove = getMouseXY ;	
}

function getMouseXY(e) {
	////////////////////////////////////////////
	// Aflam  pozitia mouseului
	
	if (IE) { // grab the x-y pos.s if browser is IE
   		tempX = event.clientX + document.body.scrollLeft ;
   		tempY = event.clientY + document.body.scrollTop ;
	} else {  // grab the x-y pos.s if browser is NS
   		tempX = e.pageX ;
   		tempY = e.pageY ;
	} 
	// catch possible negative values in NS4
	if (tempX < 0) {
		tempX = 0 ;
	}
	if (tempY < 0) {
		tempY = 0 ;
	}
}

function positioning_elements() {
	//	marimea coverului
	var WindowInnerWidth = getWindowInnerWidth() ;
	var WindowInnerHeight = getWindowInnerHeight() ;
	
	var ScrollX = getScrollX() ;
	var ScrollY = getScrollY() ;	
	
	var PosY = findPosY($('img_pos_rel_cover')) ;
	
	if (WindowInnerHeight + ScrollY > PosY) 
		$('div_cover').style.height = WindowInnerHeight + ScrollY + "px" ;
	else
		$('div_cover').style.height = PosY + "px" ;
	
	$('div_cover').style.width = WindowInnerWidth + ScrollX + "px" ;
	
	for (var i = 1; i <= totals_submenus; i++) {
		
		var X_td = parseInt(findPosX($('td_' + i))) ;
		var Y_a = parseInt(findPosY($('td_' + i))) ;
		
		var X_img_right_finished_window = parseInt(findPosX($('img_right_finished_window'))) ;
		
		//alert (X_img_right_finished_window) ;
		
		var curr_div_submenu_Width = div_submenus_widths['div_submenu_' + i] ;
		if (X_img_right_finished_window < X_td + curr_div_submenu_Width) {
			X_td = X_td - ( curr_div_submenu_Width - (X_img_right_finished_window - X_td) ) ;
		}
		
		$('div_submenu_' + i).style.left = X_td + "px" ;
		$('div_submenu_' + i).style.top = Y_a + 30 + "px" ;		
	}	

	var divs_container = document.getElementsByTagName('div') ;
	
	for (var no = 0; no < divs_container.length; no++) {
		if (divs_container[no].className == "div_container" || divs_container[no].className == "div_container_review" ) {
			var current_id = divs_container[no].id ;
			
			var curr_div_container_window_width = divs_containers_widths[current_id] ;
			var curr_div_container_window_height = divs_containers_heights[current_id] ;
		
			$(current_id).style.top = (WindowInnerHeight - curr_div_container_window_height) / 2 + ScrollY + "px" ;
			$(current_id).style.left = (WindowInnerWidth - curr_div_container_window_width) / 2 + ScrollX + "px" ;
		} else if (divs_container[no].className == "div_container_module" ) {
			var current_id = divs_container[no].id ;
			
			if (divs_containers_widths[current_id] == 0)
				divs_containers_widths[current_id] = getWidth(current_id, true, true) ;
			if (divs_containers_heights[current_id] == 0)
				divs_containers_heights[current_id] = getHeight(current_id, true, true) ;			
		}
	}	
}

function positioning_modules() {
	var Y_td_main_content_container = parseInt(findPosY($('td_main_content_container'))) ;
	var X_td_main_content_container = parseInt(findPosX($('td_main_content_container'))) ;
	
	td_main_content_container_height = 0 ;
	
	if (current_modules_configurations == "index") {
		var height_column_1 = divs_containers_heights["div_module_main_menu"] + modules_vert_dist + divs_containers_heights["div_module_london_uk_escorts"] ;
		var height_column_2 = divs_containers_heights["div_module_top10_ind_escorts"] ;
		var height_column_3 = divs_containers_heights["div_module_top10_ag_escorts"] ;
		var height_column_4 = divs_containers_heights["div_module_map"] ;
		
		var max_height_column = Math.max(Math.max(height_column_1, height_column_2), Math.max(height_column_3, height_column_4)) ;
		td_main_content_container_height += max_height_column ;
		td_main_content_container_height += 3 * modules_vert_dist ;
		td_main_content_container_height += divs_containers_heights["div_module_premiere_agencies"] ;
		td_main_content_container_height += divs_containers_heights["div_module_footer_copyright"] ;
		
		var curr_top = Y_td_main_content_container + modules_vert_dist ;
		var curr_left = X_td_main_content_container + modules_hor_dist ;
		$('div_module_main_menu').style.top = curr_top + "px" ;
		$('div_module_main_menu').style.left = curr_left + "px" ;
		
		curr_left += modules_hor_dist + width_modules ;
		$('div_module_top10_ind_escorts').style.top = curr_top + "px" ;
		$('div_module_top10_ind_escorts').style.left = curr_left + "px" ;
		
		curr_left += modules_hor_dist + width_modules ;
		$('div_module_top10_ag_escorts').style.top = curr_top + "px" ;
		$('div_module_top10_ag_escorts').style.left = curr_left + "px" ;
		
		curr_left += modules_hor_dist + width_modules ;
		$('div_module_map').style.top = curr_top + "px" ;
		$('div_module_map').style.left = curr_left + "px" ;
		
		curr_top += divs_containers_heights["div_module_main_menu"] ;
		curr_top += modules_vert_dist ;
		curr_left = X_td_main_content_container + modules_hor_dist ;
		$('div_module_london_uk_escorts').style.top = curr_top + "px" ;
		$('div_module_london_uk_escorts').style.left = curr_left + "px" ;
		
		curr_top = Y_td_main_content_container + modules_vert_dist + max_height_column ;
		curr_top += modules_vert_dist ;
		$('div_module_premiere_agencies').style.top = curr_top + "px" ;
		$('div_module_premiere_agencies').style.left = curr_left + "px" ;
		
		curr_top += divs_containers_heights["div_module_premiere_agencies"] ;
		curr_top += modules_vert_dist ;
		$('div_module_footer_copyright').style.top = curr_top + "px" ;
		$('div_module_footer_copyright').style.left = curr_left + "px" ;
		
		$('div_module_main_menu').show() ;	
		$('div_module_london_uk_escorts').show() ;	
		$('div_module_top10_ind_escorts').show() ;	
		$('div_module_top10_ag_escorts').show() ;	
		$('div_module_map').show() ;	
		$('div_module_premiere_agencies').show() ;	
		$('div_module_footer_copyright').show() ;		
		
	} else if (current_modules_configurations == "escort_employment") {
		var height_column_1 = divs_containers_heights["div_module_main_menu"] + modules_vert_dist + divs_containers_heights["div_module_london_uk_escorts"] ;
		var height_column_2 = divs_containers_heights["div_module_escort_employment"] ;
		
		var max_height_column = Math.max(height_column_1, height_column_2) ;
		td_main_content_container_height += max_height_column ;
		td_main_content_container_height += 3 * modules_vert_dist ;
		td_main_content_container_height += divs_containers_heights["div_module_premiere_agencies"] ;
		td_main_content_container_height += divs_containers_heights["div_module_footer_copyright"] ;
		
		var curr_top = Y_td_main_content_container + modules_vert_dist ;
		var curr_left = X_td_main_content_container + modules_hor_dist ;
		$('div_module_main_menu').style.top = curr_top + "px" ;
		$('div_module_main_menu').style.left = curr_left + "px" ;
		
		curr_left += width_modules + modules_hor_dist ;
		$('div_module_escort_employment').style.top = curr_top + "px" ;
		$('div_module_escort_employment').style.left = curr_left + "px" ;
		
		curr_top += divs_containers_heights["div_module_main_menu"] ;
		curr_top += modules_vert_dist ;
		curr_left = X_td_main_content_container + modules_hor_dist ;
		$('div_module_london_uk_escorts').style.top = curr_top + "px" ;
		$('div_module_london_uk_escorts').style.left = curr_left + "px" ;
		
		curr_top = Y_td_main_content_container + modules_vert_dist + max_height_column ;
		curr_top += modules_vert_dist ;
		$('div_module_premiere_agencies').style.top = curr_top + "px" ;
		$('div_module_premiere_agencies').style.left = curr_left + "px" ;
		
		curr_top += divs_containers_heights["div_module_premiere_agencies"] ;
		curr_top += modules_vert_dist ;
		$('div_module_footer_copyright').style.top = curr_top + "px" ;
		$('div_module_footer_copyright').style.left = curr_left + "px" ;
		
		$('div_module_main_menu').show() ;	
		$('div_module_london_uk_escorts').show() ;	
		$('div_module_escort_employment').show() ;	
		$('div_module_premiere_agencies').show() ;	
		$('div_module_footer_copyright').show() ;
	} else if (current_modules_configurations == "independent_escorts") {
		//alert ("independent_escorts") ;
		var height_column_1 = divs_containers_heights["div_module_top10_ind_escorts"] + modules_vert_dist + divs_containers_heights["div_module_map"] ;
		var height_column_2 = divs_containers_heights["div_module_ind_escorts"] ;
		
		var max_height_column = Math.max(height_column_1, height_column_2) ;
		
		td_main_content_container_height += max_height_column ;
		td_main_content_container_height += 3 * modules_vert_dist ;
		td_main_content_container_height += divs_containers_heights["div_module_premiere_agencies"] ;
		td_main_content_container_height += divs_containers_heights["div_module_footer_copyright"] ;
		
		var curr_top = Y_td_main_content_container + modules_vert_dist ;
		var curr_left = X_td_main_content_container + modules_hor_dist ;
		$('div_module_top10_ind_escorts').style.top = curr_top + "px" ;
		$('div_module_top10_ind_escorts').style.left = curr_left + "px" ;
		
		curr_left += width_modules + modules_hor_dist ;
		$('div_module_ind_escorts').style.top = curr_top + "px" ;
		$('div_module_ind_escorts').style.left = curr_left + "px" ;
		
		curr_top += divs_containers_heights["div_module_top10_ind_escorts"] ;
		curr_top += modules_vert_dist ;
		curr_left = X_td_main_content_container + modules_hor_dist ;
		$('div_module_map').style.top = curr_top + "px" ;
		$('div_module_map').style.left = curr_left + "px" ;
		
		curr_top = Y_td_main_content_container + modules_vert_dist + max_height_column ;
		curr_top += modules_vert_dist ;
		$('div_module_premiere_agencies').style.top = curr_top + "px" ;
		$('div_module_premiere_agencies').style.left = curr_left + "px" ;
		
		curr_top += divs_containers_heights["div_module_premiere_agencies"] ;
		curr_top += modules_vert_dist ;
		$('div_module_footer_copyright').style.top = curr_top + "px" ;
		$('div_module_footer_copyright').style.left = curr_left + "px" ;
		
		$('div_module_top10_ind_escorts').show() ;	
		$('div_module_map').show() ;	
		$('div_module_ind_escorts').show() ;	
		$('div_module_premiere_agencies').show() ;	
		$('div_module_footer_copyright').show() ;
	} else if (current_modules_configurations == "independent_escort") {
		//alert ("independent_escort") ;
		
		var height_column_1 = divs_containers_heights["div_module_top10_ind_escorts"] + modules_vert_dist + divs_containers_heights["div_module_map"] ;
		var height_column_2 = divs_containers_heights["div_module_ind_escort"] ;
		
		var max_height_column = Math.max(height_column_1, height_column_2) ;
		
		td_main_content_container_height += max_height_column ;
		td_main_content_container_height += 3 * modules_vert_dist ;
		td_main_content_container_height += divs_containers_heights["div_module_premiere_agencies"] ;
		td_main_content_container_height += divs_containers_heights["div_module_footer_copyright"] ;
		
		var curr_top = Y_td_main_content_container + modules_vert_dist ;
		var curr_left = X_td_main_content_container + modules_hor_dist ;
		$('div_module_top10_ind_escorts').style.top = curr_top + "px" ;
		$('div_module_top10_ind_escorts').style.left = curr_left + "px" ;
		
		curr_left += width_modules + modules_hor_dist ;
		$('div_module_ind_escort').style.top = curr_top + "px" ;
		$('div_module_ind_escort').style.left = curr_left + "px" ;
		
		curr_top += divs_containers_heights["div_module_top10_ind_escorts"] ;
		curr_top += modules_vert_dist ;
		curr_left = X_td_main_content_container + modules_hor_dist ;
		$('div_module_map').style.top = curr_top + "px" ;
		$('div_module_map').style.left = curr_left + "px" ;
		
		curr_top = Y_td_main_content_container + modules_vert_dist + max_height_column ;
		curr_top += modules_vert_dist ;
		$('div_module_premiere_agencies').style.top = curr_top + "px" ;
		$('div_module_premiere_agencies').style.left = curr_left + "px" ;
		
		curr_top += divs_containers_heights["div_module_premiere_agencies"] ;
		curr_top += modules_vert_dist ;
		$('div_module_footer_copyright').style.top = curr_top + "px" ;
		$('div_module_footer_copyright').style.left = curr_left + "px" ;
		
		$('div_module_top10_ind_escorts').show() ;	
		$('div_module_map').show() ;	
		$('div_module_ind_escort').show() ;	
		$('div_module_premiere_agencies').show() ;	
		$('div_module_footer_copyright').show() ;
	} else if (current_modules_configurations == "agencies_escorts") {
		var height_column_1 = divs_containers_heights["div_module_top10_ag_escorts"] + modules_vert_dist + divs_containers_heights["div_module_map"] ;
		var height_column_2 = divs_containers_heights["div_module_ag_escort"] ;
		
		var max_height_column = Math.max(height_column_1, height_column_2) ;
		
		td_main_content_container_height += max_height_column ;
		td_main_content_container_height += 3 * modules_vert_dist ;
		td_main_content_container_height += divs_containers_heights["div_module_premiere_agencies"] ;
		td_main_content_container_height += divs_containers_heights["div_module_footer_copyright"] ;
		
		var curr_top = Y_td_main_content_container + modules_vert_dist ;
		var curr_left = X_td_main_content_container + modules_hor_dist ;
		$('div_module_top10_ag_escorts').style.top = curr_top + "px" ;
		$('div_module_top10_ag_escorts').style.left = curr_left + "px" ;
		
		curr_left += width_modules + modules_hor_dist ;
		$('div_module_ag_escort').style.top = curr_top + "px" ;
		$('div_module_ag_escort').style.left = curr_left + "px" ;
		
		curr_top += divs_containers_heights["div_module_top10_ag_escorts"] ;
		curr_top += modules_vert_dist ;
		curr_left = X_td_main_content_container + modules_hor_dist ;
		$('div_module_map').style.top = curr_top + "px" ;
		$('div_module_map').style.left = curr_left + "px" ;
		
		curr_top = Y_td_main_content_container + modules_vert_dist + max_height_column ;
		curr_top += modules_vert_dist ;
		$('div_module_premiere_agencies').style.top = curr_top + "px" ;
		$('div_module_premiere_agencies').style.left = curr_left + "px" ;
		
		curr_top += divs_containers_heights["div_module_premiere_agencies"] ;
		curr_top += modules_vert_dist ;
		$('div_module_footer_copyright').style.top = curr_top + "px" ;
		$('div_module_footer_copyright').style.left = curr_left + "px" ;
		
		$('div_module_top10_ag_escorts').show() ;	
		$('div_module_map').show() ;	
		$('div_module_ag_escort').show() ;	
		$('div_module_premiere_agencies').show() ;	
		$('div_module_footer_copyright').show() ;
	} else if (current_modules_configurations == "escorts_agencies") {
		var height_column_1 = divs_containers_heights["div_module_top10_ag_escorts"] + modules_vert_dist + divs_containers_heights["div_module_map"] ;
		var height_column_2 = divs_containers_heights["div_module_escorts_agencies"] ;
		
		var max_height_column = Math.max(height_column_1, height_column_2) ;
		
		td_main_content_container_height += max_height_column ;
		td_main_content_container_height += 3 * modules_vert_dist ;
		td_main_content_container_height += divs_containers_heights["div_module_premiere_agencies"] ;
		td_main_content_container_height += divs_containers_heights["div_module_footer_copyright"] ;
		
		var curr_top = Y_td_main_content_container + modules_vert_dist ;
		var curr_left = X_td_main_content_container + modules_hor_dist ;
		$('div_module_top10_ag_escorts').style.top = curr_top + "px" ;
		$('div_module_top10_ag_escorts').style.left = curr_left + "px" ;
		
		curr_left += width_modules + modules_hor_dist ;
		$('div_module_escorts_agencies').style.top = curr_top + "px" ;
		$('div_module_escorts_agencies').style.left = curr_left + "px" ;
		
		curr_top += divs_containers_heights["div_module_top10_ag_escorts"] ;
		curr_top += modules_vert_dist ;
		curr_left = X_td_main_content_container + modules_hor_dist ;
		$('div_module_map').style.top = curr_top + "px" ;
		$('div_module_map').style.left = curr_left + "px" ;
		
		curr_top = Y_td_main_content_container + modules_vert_dist + max_height_column ;
		curr_top += modules_vert_dist ;
		$('div_module_premiere_agencies').style.top = curr_top + "px" ;
		$('div_module_premiere_agencies').style.left = curr_left + "px" ;
		
		curr_top += divs_containers_heights["div_module_premiere_agencies"] ;
		curr_top += modules_vert_dist ;
		$('div_module_footer_copyright').style.top = curr_top + "px" ;
		$('div_module_footer_copyright').style.left = curr_left + "px" ;
		
		$('div_module_top10_ag_escorts').show() ;	
		$('div_module_map').show() ;	
		$('div_module_escorts_agencies').show() ;	
		$('div_module_premiere_agencies').show() ;	
		$('div_module_footer_copyright').show() ;
	} else if (current_modules_configurations == "agency_listing") {
		var height_column_1 = divs_containers_heights["div_module_main_menu"] + modules_vert_dist + divs_containers_heights["div_module_london_uk_escorts"] ;
		var height_column_2 = divs_containers_heights["div_module_agency_listing"] ;
		
		var max_height_column = Math.max(height_column_1, height_column_2) ;
		td_main_content_container_height += max_height_column ;
		td_main_content_container_height += 3 * modules_vert_dist ;
		td_main_content_container_height += divs_containers_heights["div_module_premiere_agencies"] ;
		td_main_content_container_height += divs_containers_heights["div_module_footer_copyright"] ;
		
		var curr_top = Y_td_main_content_container + modules_vert_dist ;
		var curr_left = X_td_main_content_container + modules_hor_dist ;
		$('div_module_main_menu').style.top = curr_top + "px" ;
		$('div_module_main_menu').style.left = curr_left + "px" ;
		
		curr_left += width_modules + modules_hor_dist ;
		$('div_module_agency_listing').style.top = curr_top + "px" ;
		$('div_module_agency_listing').style.left = curr_left + "px" ;
		
		curr_top += divs_containers_heights["div_module_main_menu"] ;
		curr_top += modules_vert_dist ;
		curr_left = X_td_main_content_container + modules_hor_dist ;
		$('div_module_london_uk_escorts').style.top = curr_top + "px" ;
		$('div_module_london_uk_escorts').style.left = curr_left + "px" ;
		
		curr_top = Y_td_main_content_container + modules_vert_dist + max_height_column ;
		curr_top += modules_vert_dist ;
		$('div_module_premiere_agencies').style.top = curr_top + "px" ;
		$('div_module_premiere_agencies').style.left = curr_left + "px" ;
		
		curr_top += divs_containers_heights["div_module_premiere_agencies"] ;
		curr_top += modules_vert_dist ;
		$('div_module_footer_copyright').style.top = curr_top + "px" ;
		$('div_module_footer_copyright').style.left = curr_left + "px" ;
		
		$('div_module_main_menu').show() ;	
		$('div_module_london_uk_escorts').show() ;	
		$('div_module_agency_listing').show() ;	
		$('div_module_premiere_agencies').show() ;	
		$('div_module_footer_copyright').show() ;
	} else if (current_modules_configurations == "banner_exchange") {
		var height_column_1 = divs_containers_heights["div_module_main_menu"] + modules_vert_dist + divs_containers_heights["div_module_london_uk_escorts"] ;
		var height_column_2 = divs_containers_heights["div_module_banner_exchange"] ;
		
		var max_height_column = Math.max(height_column_1, height_column_2) ;
		td_main_content_container_height += max_height_column ;
		td_main_content_container_height += 3 * modules_vert_dist ;
		td_main_content_container_height += divs_containers_heights["div_module_premiere_agencies"] ;
		td_main_content_container_height += divs_containers_heights["div_module_footer_copyright"] ;
		
		var curr_top = Y_td_main_content_container + modules_vert_dist ;
		var curr_left = X_td_main_content_container + modules_hor_dist ;
		$('div_module_main_menu').style.top = curr_top + "px" ;
		$('div_module_main_menu').style.left = curr_left + "px" ;
		
		curr_left += width_modules + modules_hor_dist ;
		$('div_module_banner_exchange').style.top = curr_top + "px" ;
		$('div_module_banner_exchange').style.left = curr_left + "px" ;
		
		curr_top += divs_containers_heights["div_module_main_menu"] ;
		curr_top += modules_vert_dist ;
		curr_left = X_td_main_content_container + modules_hor_dist ;
		$('div_module_london_uk_escorts').style.top = curr_top + "px" ;
		$('div_module_london_uk_escorts').style.left = curr_left + "px" ;
		
		curr_top = Y_td_main_content_container + modules_vert_dist + max_height_column ;
		curr_top += modules_vert_dist ;
		$('div_module_premiere_agencies').style.top = curr_top + "px" ;
		$('div_module_premiere_agencies').style.left = curr_left + "px" ;
		
		curr_top += divs_containers_heights["div_module_premiere_agencies"] ;
		curr_top += modules_vert_dist ;
		$('div_module_footer_copyright').style.top = curr_top + "px" ;
		$('div_module_footer_copyright').style.left = curr_left + "px" ;
		
		$('div_module_main_menu').show() ;	
		$('div_module_london_uk_escorts').show() ;	
		$('div_module_banner_exchange').show() ;	
		$('div_module_premiere_agencies').show() ;	
		$('div_module_footer_copyright').show() ;
	} else if (current_modules_configurations == "photographers") {
		var height_column_1 = divs_containers_heights["div_module_main_menu"] + modules_vert_dist + divs_containers_heights["div_module_london_uk_escorts"] ;
		var height_column_2 = divs_containers_heights["div_module_photographers"] ;
		
		var max_height_column = Math.max(height_column_1, height_column_2) ;
		td_main_content_container_height += max_height_column ;
		td_main_content_container_height += 3 * modules_vert_dist ;
		td_main_content_container_height += divs_containers_heights["div_module_premiere_agencies"] ;
		td_main_content_container_height += divs_containers_heights["div_module_footer_copyright"] ;
		
		var curr_top = Y_td_main_content_container + modules_vert_dist ;
		var curr_left = X_td_main_content_container + modules_hor_dist ;
		$('div_module_main_menu').style.top = curr_top + "px" ;
		$('div_module_main_menu').style.left = curr_left + "px" ;
		
		curr_left += width_modules + modules_hor_dist ;
		$('div_module_photographers').style.top = curr_top + "px" ;
		$('div_module_photographers').style.left = curr_left + "px" ;
		
		curr_top += divs_containers_heights["div_module_main_menu"] ;
		curr_top += modules_vert_dist ;
		curr_left = X_td_main_content_container + modules_hor_dist ;
		$('div_module_london_uk_escorts').style.top = curr_top + "px" ;
		$('div_module_london_uk_escorts').style.left = curr_left + "px" ;
		
		curr_top = Y_td_main_content_container + modules_vert_dist + max_height_column ;
		curr_top += modules_vert_dist ;
		$('div_module_premiere_agencies').style.top = curr_top + "px" ;
		$('div_module_premiere_agencies').style.left = curr_left + "px" ;
		
		curr_top += divs_containers_heights["div_module_premiere_agencies"] ;
		curr_top += modules_vert_dist ;
		$('div_module_footer_copyright').style.top = curr_top + "px" ;
		$('div_module_footer_copyright').style.left = curr_left + "px" ;
		
		$('div_module_main_menu').show() ;	
		$('div_module_london_uk_escorts').show() ;	
		$('div_module_photographers').show() ;	
		$('div_module_premiere_agencies').show() ;	
		$('div_module_footer_copyright').show() ;
	} else if (current_modules_configurations == "contact") {
		var height_column_1 = divs_containers_heights["div_module_main_menu"] + modules_vert_dist + divs_containers_heights["div_module_london_uk_escorts"] ;
		var height_column_2 = divs_containers_heights["div_module_contact"] ;
		
		var max_height_column = Math.max(height_column_1, height_column_2) ;
		td_main_content_container_height += max_height_column ;
		td_main_content_container_height += 3 * modules_vert_dist ;
		td_main_content_container_height += divs_containers_heights["div_module_premiere_agencies"] ;
		td_main_content_container_height += divs_containers_heights["div_module_footer_copyright"] ;
		
		var curr_top = Y_td_main_content_container + modules_vert_dist ;
		var curr_left = X_td_main_content_container + modules_hor_dist ;
		$('div_module_main_menu').style.top = curr_top + "px" ;
		$('div_module_main_menu').style.left = curr_left + "px" ;
		
		curr_left += width_modules + modules_hor_dist ;
		$('div_module_contact').style.top = curr_top + "px" ;
		$('div_module_contact').style.left = curr_left + "px" ;
		
		curr_top += divs_containers_heights["div_module_main_menu"] ;
		curr_top += modules_vert_dist ;
		curr_left = X_td_main_content_container + modules_hor_dist ;
		$('div_module_london_uk_escorts').style.top = curr_top + "px" ;
		$('div_module_london_uk_escorts').style.left = curr_left + "px" ;
		
		curr_top = Y_td_main_content_container + modules_vert_dist + max_height_column ;
		curr_top += modules_vert_dist ;
		$('div_module_premiere_agencies').style.top = curr_top + "px" ;
		$('div_module_premiere_agencies').style.left = curr_left + "px" ;
		
		curr_top += divs_containers_heights["div_module_premiere_agencies"] ;
		curr_top += modules_vert_dist ;
		$('div_module_footer_copyright').style.top = curr_top + "px" ;
		$('div_module_footer_copyright').style.left = curr_left + "px" ;
		
		$('div_module_main_menu').show() ;	
		$('div_module_london_uk_escorts').show() ;	
		$('div_module_contact').show() ;	
		$('div_module_premiere_agencies').show() ;	
		$('div_module_footer_copyright').show() ;
	} else if (current_modules_configurations == "sitemap") {
		var height_column_1 = divs_containers_heights["div_module_main_menu"] + modules_vert_dist + divs_containers_heights["div_module_london_uk_escorts"] ;
		var height_column_2 = divs_containers_heights["div_module_sitemap"] ;
		
		var max_height_column = Math.max(height_column_1, height_column_2) ;
		td_main_content_container_height += max_height_column ;
		td_main_content_container_height += 3 * modules_vert_dist ;
		td_main_content_container_height += divs_containers_heights["div_module_premiere_agencies"] ;
		td_main_content_container_height += divs_containers_heights["div_module_footer_copyright"] ;
		
		var curr_top = Y_td_main_content_container + modules_vert_dist ;
		var curr_left = X_td_main_content_container + modules_hor_dist ;
		$('div_module_main_menu').style.top = curr_top + "px" ;
		$('div_module_main_menu').style.left = curr_left + "px" ;
		
		curr_left += width_modules + modules_hor_dist ;
		$('div_module_sitemap').style.top = curr_top + "px" ;
		$('div_module_sitemap').style.left = curr_left + "px" ;
		
		curr_top += divs_containers_heights["div_module_main_menu"] ;
		curr_top += modules_vert_dist ;
		curr_left = X_td_main_content_container + modules_hor_dist ;
		$('div_module_london_uk_escorts').style.top = curr_top + "px" ;
		$('div_module_london_uk_escorts').style.left = curr_left + "px" ;
		
		curr_top = Y_td_main_content_container + modules_vert_dist + max_height_column ;
		curr_top += modules_vert_dist ;
		$('div_module_premiere_agencies').style.top = curr_top + "px" ;
		$('div_module_premiere_agencies').style.left = curr_left + "px" ;
		
		curr_top += divs_containers_heights["div_module_premiere_agencies"] ;
		curr_top += modules_vert_dist ;
		$('div_module_footer_copyright').style.top = curr_top + "px" ;
		$('div_module_footer_copyright').style.left = curr_left + "px" ;
		
		$('div_module_main_menu').show() ;	
		$('div_module_london_uk_escorts').show() ;	
		$('div_module_sitemap').show() ;	
		$('div_module_premiere_agencies').show() ;	
		$('div_module_footer_copyright').show() ;
	}
	
	$('td_main_content_container').style.height = td_main_content_container_height + "px" ;
	
	$('td_main_content_container').style.backgroundImage = "url(" + abs_url_site + "_images/blank.gif)"; 
}

function revealThumbnail(id) {
	$(id).style.filter = 'alpha(opacity=100)';
	$(id).style.opacity = 1;
}

function hideThumbnail(id) {
	$(id).style.filter = 'alpha(opacity=70)';
	$(id).style.opacity = 0.7;
}

function hideThumbnail_custom(id, alpha) {
	$(id).style.filter = 'alpha(opacity=' + alpha * 100 + ')';
	$(id).style.opacity = alpha;
}

var map;

var init_lat = Array();
var init_long = Array() ;

init_lat["roman"] = 46.9242 ;
init_long["roman"] = 26.9277 ;

init_lat["rak"] = 25.76 ;
init_long["rak"] = 55.92 ;

init_lat["london"] = 54.50 ;
init_long["london"] = -4.17 ;

var current_location = "london" ;

var zoom_level = 4 ;

function initialize() {
	if (show_map) {
		if (GBrowserIsCompatible()) {
			map = new GMap2(document.getElementById("div_map_container"));
			point = new GLatLng(location_lat, location_long) ;
			
			map.setCenter(point, zoom_level);
			
			map.setUIToDefault();
			
			map.setMapType(G_NORMAL_MAP);
			
			//map.removeMapType(G_SATELLITE_MAP);
			map.removeMapType(G_HYBRID_MAP); 
			//map.removeMapType(G_PHYSICAL_MAP);
			//map.removeMapType(G_NORMAL_MAP);
		}
	}
}

var top10_ind_escorts_order = 2 ;
var top10_ag_escorts_order = 2 ;
										
function init_ind_escorts_slideshow() {
	try {
		if (show_top10_ind_escorts) {
			var parametri = "sid=" + Math.random() ;
			parametri += "&top10_ind_escorts_order=" + top10_ind_escorts_order ;
			
			//alert (parametri) ;
			var url = abs_url_site + 'next_img_ind_escorts_slideshow.php' ;
			//alert (url) ;
			var opt = {
							method: 'post',
							parameters: parametri,
							onSuccess: 	function(transport) {
											//window.location = window.location ;
											var json = transport.responseText.evalJSON();
											
											var href = abs_url_site + "independent_escorts/escort/" + json['username'] ;
											
											//alert (json['top10_order']) ;
											$('img_independets_escorts').title = json['name'] ;
											$('img_independets_escorts').alt = json['name'] ;
											setTimeout("$('img_independets_escorts').src = '" + json['path'] + "'; $('span_independent_escort_name').update('" + json['name'] + "'); $('a_independets_escorts').href = '" + href + "';", 200) ;
											
											/*new Effect.Morph('img_independets_escorts', {
																					style: 'width:' + json['width'] + 'px;height:' + json['height'] + 'px;', // CSS Properties
																					duration: 1.2 // Core Effect properties
																				});
											
											new Effect.Parallel(	
																	[
																		new Effect.Morph(id_img_show, {sync: true, style: 'width:' + json['width'] + 'px;'}),
																		new Effect.Morph(id_img_show, {sync: true, style: 'height:' + json['height'] + 'px;'})
																	], 	
																	{ 
																		duration: 2,
																		delay: 0
																	}
																);*/									
										},
							onFailure: 	function(transport) {
											alert("Ajax Error next img ind escorts slideshow ") ;
											//alert(transport.responseText) ;
										}
			}
			new Ajax.Request(url, opt) ;
			
			
			
			if (top10_ind_escorts_order == 10)
				top10_ind_escorts_order = 1 ;
			else
				top10_ind_escorts_order++ ;		
		}
		
		
		if (show_top10_ag_escorts) {
			var parametri = "sid=" + Math.random() ;
			parametri += "&top10_ag_escorts_order=" + top10_ag_escorts_order ;
			
			//alert (parametri) ;
			var url = abs_url_site + 'next_img_ag_escorts_slideshow.php' ;
			//alert (url) ;
			var opt = {
							method: 'post',
							parameters: parametri,
							onSuccess: 	function(transport) {
											//window.location = window.location ;
											var json = transport.responseText.evalJSON();
											
											var href = abs_url_site + "independent_escorts/escort/" + json['username'] ;
											var href = abs_url_site + "agencies_escorts/agency/" + json["agency_username"] + "/escort/" + json["username"] ;
											
											//alert (json['top10_order']) ;
											$('img_ag_escorts').title = json['name'] ;
											$('img_ag_escorts').alt = json['name'] ;
											setTimeout("$('img_ag_escorts').src = '" + json['path'] + "'; $('span_ag_escort_name').update('" + json['name'] + "'); $('a_ag_escorts').href = '" + href + "';", 200) ;																
										},
							onFailure: 	function(transport) {
											alert("Ajax Error next img ag escorts slideshow ") ;
											//alert(transport.responseText) ;
										}
			}
			new Ajax.Request(url, opt) ;
			
			
			
			if (top10_ag_escorts_order == 10)
				top10_ag_escorts_order = 1 ;
			else
				top10_ag_escorts_order++ ;
		}
		
		if ( show_top10_ind_escorts || show_top10_ag_escorts )
			setTimeout("init_ind_escorts_slideshow()", 5000) ;
	} catch(err) {
		
	}
}

function show_email_ind_escort_window(escort) {
	$('iframe_email_ind_escort_window').src = abs_url_site + "_includes/_include_email_ind_escort_window_form.php?escort=" + escort  ;
	$('div_cover').show() ;
	$('div_email_ind_escort_window').show() ;
}

function show_email_ag_escort_window(agency, escort) {
	$('iframe_email_ag_escort_window').src = abs_url_site + "_includes/_include_email_ag_escort_window_form.php?agency=" + agency + "&escort=" + escort  ;
	$('div_cover').show() ;
	$('div_email_ag_escort_window').show() ;
}

function show_email_escort_ag_window(agency) {
	$('iframe_email_escort_ag_window').src = abs_url_site + "_includes/_include_email_escort_ag_window_form.php?agency=" + agency  ;
	$('div_cover').show() ;
	$('div_email_escort_ag_window').show() ;
}

function close_details_window(id_div) {
	$('div_cover').hide() ;
	$(id_div).hide() ;
}

function validate_form_email_ind_escort() {
	///////////////////////////////////////////////////
	//	Name
	///////////////////////////////////////////////////
	var name = trim($('name').value) ;
	if (!name) {
       	myalert("Please complete the field 'Name' !!!") ;
		$('name').focus() ;	
		return ;
	}
	if (name.length > 100) {
		myalert("Please complete the field 'Name' with maxim 100 characters !!!") ;
		$('name').select() ;		
		return ;
	}
	
	///////////////////////////////////////////////////
	//	E-mail
	///////////////////////////////////////////////////
	var email = trim($('email').value) ;
	if (!email) {
       	myalert("Please complete the field 'E-mail address' !!!") ;
		$('email').focus() ;	
		return ;
	}
	if (email.length > 100) {
		myalert("Please complete the field 'E-mail address' with maxim 100 characters !!!") ;
		$('email').select() ;		
		return ;
	}
	if (!checkemail('email')) {
		myalert("Please complete the field 'E-mail address' with a valid e-mail address !!!") ;
		$('email').select() ;
		return ;
	}
	
	///////////////////////////////////////////////////
	//	Subject
	///////////////////////////////////////////////////
	var subject = trim($('subject').value) ;
	if (subject.length > 500) {
		myalert("Please complete the field 'Subject' with maxim 500 characters !!!") ;
		$('subject').select() ;		
		return ;
	}
	
	///////////////////////////////////////////////////
	//	Message
	///////////////////////////////////////////////////
	var message = trim($('message').value) ;
	if (!message) {
       	myalert("Please complete the field 'Message' !!!") ;
		$('message').focus() ;	
		return ;
	}
	if (message.length > 3000) {
		myalert("Please complete the field 'Message' with maxim 3000 characters !!!") ;
		$('message').select() ;		
		return ;
	}
	
	///////////////////////////////////////////////////
	//	Security code
	///////////////////////////////////////////////////
	var security_code = trim($('security_code').value) ;
	if (!security_code) {
       	myalert("Please complete the field 'Security code' !!!") ;
		$('security_code').focus() ;	
		return ;
	}
	if (security_code.length > 5) {
		myalert("Please complete the field 'Security code' with maxim 5 characters !!!") ;
		$('security_code').select() ;		
		return ;
	}
	
	var parametri = "sid=" + Math.random() ;
	parametri += "&checked_random=" + security_code ;
	//alert (parametri) ;
	
	var url = '_verify_image_random.php' ;
	var opt = 	{
					method: 'post',
					parameters: parametri,
					onSuccess: 	function(transport) {
									if (transport.responseText == "ok") {
										$('form_email_ind_escort').submit() ;
									} else {
										alert("Invalid security code !!!!!") ;
										//alert(transport.responseText) ;
									}										
								},
					onFailure: 	function(transport) {
									alert("Ajax Error check security code !!!!!") ;
									alert(transport.responseText) ;
								}
				}	
	new Ajax.Request(url, opt) ;
}

function validate_form_email_ag_escort() {
	///////////////////////////////////////////////////
	//	Name
	///////////////////////////////////////////////////
	var name = trim($('name').value) ;
	if (!name) {
       	myalert("Please complete the field 'Name' !!!") ;
		$('name').focus() ;	
		return ;
	}
	if (name.length > 100) {
		myalert("Please complete the field 'Name' with maxim 100 characters !!!") ;
		$('name').select() ;		
		return ;
	}
	
	///////////////////////////////////////////////////
	//	E-mail
	///////////////////////////////////////////////////
	var email = trim($('email').value) ;
	if (!email) {
       	myalert("Please complete the field 'E-mail address' !!!") ;
		$('email').focus() ;	
		return ;
	}
	if (email.length > 100) {
		myalert("Please complete the field 'E-mail address' with maxim 100 characters !!!") ;
		$('email').select() ;		
		return ;
	}
	if (!checkemail('email')) {
		myalert("Please complete the field 'E-mail address' with a valid e-mail address !!!") ;
		$('email').select() ;
		return ;
	}
	
	///////////////////////////////////////////////////
	//	Subject
	///////////////////////////////////////////////////
	var subject = trim($('subject').value) ;
	if (subject.length > 500) {
		myalert("Please complete the field 'Subject' with maxim 500 characters !!!") ;
		$('subject').select() ;		
		return ;
	}
	
	///////////////////////////////////////////////////
	//	Message
	///////////////////////////////////////////////////
	var message = trim($('message').value) ;
	if (!message) {
       	myalert("Please complete the field 'Message' !!!") ;
		$('message').focus() ;	
		return ;
	}
	if (message.length > 3000) {
		myalert("Please complete the field 'Message' with maxim 3000 characters !!!") ;
		$('message').select() ;		
		return ;
	}
	
	///////////////////////////////////////////////////
	//	Security code
	///////////////////////////////////////////////////
	var security_code = trim($('security_code').value) ;
	if (!security_code) {
       	myalert("Please complete the field 'Security code' !!!") ;
		$('security_code').focus() ;	
		return ;
	}
	if (security_code.length > 5) {
		myalert("Please complete the field 'Security code' with maxim 5 characters !!!") ;
		$('security_code').select() ;		
		return ;
	}
	
	var parametri = "sid=" + Math.random() ;
	parametri += "&checked_random=" + security_code ;
	//alert (parametri) ;
	
	var url = '_verify_image_random.php' ;
	var opt = 	{
					method: 'post',
					parameters: parametri,
					onSuccess: 	function(transport) {
									if (transport.responseText == "ok") {
										$('form_email_ag_escort').submit() ;
									} else {
										alert("Invalid security code !!!!!") ;
										//alert(transport.responseText) ;
									}										
								},
					onFailure: 	function(transport) {
									alert("Ajax Error check security code !!!!!") ;
									alert(transport.responseText) ;
								}
				}	
	new Ajax.Request(url, opt) ;
}

function validate_form_email_escort_ag() {
	///////////////////////////////////////////////////
	//	Name
	///////////////////////////////////////////////////
	var name = trim($('name').value) ;
	if (!name) {
       	myalert("Please complete the field 'Name' !!!") ;
		$('name').focus() ;	
		return ;
	}
	if (name.length > 100) {
		myalert("Please complete the field 'Name' with maxim 100 characters !!!") ;
		$('name').select() ;		
		return ;
	}
	
	///////////////////////////////////////////////////
	//	E-mail
	///////////////////////////////////////////////////
	var email = trim($('email').value) ;
	if (!email) {
       	myalert("Please complete the field 'E-mail address' !!!") ;
		$('email').focus() ;	
		return ;
	}
	if (email.length > 100) {
		myalert("Please complete the field 'E-mail address' with maxim 100 characters !!!") ;
		$('email').select() ;		
		return ;
	}
	if (!checkemail('email')) {
		myalert("Please complete the field 'E-mail address' with a valid e-mail address !!!") ;
		$('email').select() ;
		return ;
	}
	
	///////////////////////////////////////////////////
	//	Subject
	///////////////////////////////////////////////////
	var subject = trim($('subject').value) ;
	if (subject.length > 500) {
		myalert("Please complete the field 'Subject' with maxim 500 characters !!!") ;
		$('subject').select() ;		
		return ;
	}
	
	///////////////////////////////////////////////////
	//	Message
	///////////////////////////////////////////////////
	var message = trim($('message').value) ;
	if (!message) {
       	myalert("Please complete the field 'Message' !!!") ;
		$('message').focus() ;	
		return ;
	}
	if (message.length > 3000) {
		myalert("Please complete the field 'Message' with maxim 3000 characters !!!") ;
		$('message').select() ;		
		return ;
	}
	
	///////////////////////////////////////////////////
	//	Security code
	///////////////////////////////////////////////////
	var security_code = trim($('security_code').value) ;
	if (!security_code) {
       	myalert("Please complete the field 'Security code' !!!") ;
		$('security_code').focus() ;	
		return ;
	}
	if (security_code.length > 5) {
		myalert("Please complete the field 'Security code' with maxim 5 characters !!!") ;
		$('security_code').select() ;		
		return ;
	}
	
	var parametri = "sid=" + Math.random() ;
	parametri += "&checked_random=" + security_code ;
	//alert (parametri) ;
	
	var url = '_verify_image_random.php' ;
	var opt = 	{
					method: 'post',
					parameters: parametri,
					onSuccess: 	function(transport) {
									if (transport.responseText == "ok") {
										$('form_email_escort_ag').submit() ;
									} else {
										alert("Invalid security code !!!!!") ;
										//alert(transport.responseText) ;
									}										
								},
					onFailure: 	function(transport) {
									alert("Ajax Error check security code !!!!!") ;
									alert(transport.responseText) ;
								}
				}	
	new Ajax.Request(url, opt) ;
}

function vote(username, name) {
	//alert (username) ;
	
	var parametri = "sid=" + Math.random() ;
	parametri += "&username=" + username ;
	//alert (parametri) ;
	
	var url = 'vote_ind_escorts.php' ;
	var opt = 	{
					method: 'post',
					parameters: parametri,
					onSuccess: 	function(transport) {
									//window.location = window.location ;
									var json = transport.responseText.evalJSON();
										
									if (json['response'] == "ok")
										alert ("You have voted for " + name + " !!!") ;
									else if (json['response'] == "allready_voted")
										alert ("You have allready voted for " + name + " !!!") ;
									else {
										alert("Server error !!!!!") ;
										//alert(transport.responseText) ;
									}
								},
					onFailure: 	function(transport) {
									alert("Ajax Error check security code !!!!!") ;
									alert(transport.responseText) ;
								}
				}	
	new Ajax.Request(url, opt) ;
}

function vote_ag_escort(agency_username, username, name) {
	//alert (username) ;
	
	var parametri = "sid=" + Math.random() ;
	parametri += "&username=" + username ;
	parametri += "&agency_username=" + agency_username ;
	//alert (parametri) ;
	
	var url = 'vote_ag_escorts.php' ;
	var opt = 	{
					method: 'post',
					parameters: parametri,
					onSuccess: 	function(transport) {
									//window.location = window.location ;
									var json = transport.responseText.evalJSON();
										
									if (json['response'] == "ok")
										alert ("You have voted for " + name + " !!!") ;
									else if (json['response'] == "allready_voted")
										alert ("You have allready voted for " + name + " !!!") ;
									else {
										alert("Server error !!!!!") ;
										//alert(transport.responseText) ;
									}
								},
					onFailure: 	function(transport) {
									alert("Ajax Error check security code !!!!!") ;
									alert(transport.responseText) ;
								}
				}	
	new Ajax.Request(url, opt) ;
}

function show_write_review_ind_escort_window(escort) {
	$('iframe_write_review_ind_escort_window').src = abs_url_site + "_includes/_include_write_review_ind_escort_window_form.php?escort=" + escort  ;
	$('div_cover').show() ;
	$('div_write_review_ind_escort_window').show() ;
}

function show_write_review_ag_escort_window(agency, escort) {
	$('iframe_write_review_ag_escort_window').src = abs_url_site + "_includes/_include_write_review_ag_escort_window_form.php?agency=" + agency + "&escort=" + escort  ;
	$('div_cover').show() ;
	$('div_write_review_ag_escort_window').show() ;
}

function validate_form_write_review_ind_escort() {
	///////////////////////////////////////////////////
	//	Name
	///////////////////////////////////////////////////
	var name = trim($('name').value) ;
	if (!name) {
       	myalert("Please complete the field 'Name' !!!") ;
		$('name').focus() ;	
		return ;
	}
	if (name.length > 100) {
		myalert("Please complete the field 'Name' with maxim 100 characters !!!") ;
		$('name').select() ;		
		return ;
	}
	
	///////////////////////////////////////////////////
	//	E-mail
	///////////////////////////////////////////////////
	var email = trim($('email').value) ;
	if (!email) {
       	myalert("Please complete the field 'E-mail address' !!!") ;
		$('email').focus() ;	
		return ;
	}
	if (email.length > 100) {
		myalert("Please complete the field 'E-mail address' with maxim 100 characters !!!") ;
		$('email').select() ;		
		return ;
	}
	if (email && !checkemail('email')) {
		myalert("Please complete the field 'E-mail address' with a valid e-mail address !!!") ;
		$('email').select() ;
		return ;
	}
	
	///////////////////////////////////////////////////
	//	Date / time of visit
	///////////////////////////////////////////////////
	var date_time_visit = trim($('date_time_visit').value) ;
	if (date_time_visit.length > 100) {
		myalert("Please complete the field 'Date / time of visit' with maxim 100 characters !!!") ;
		$('date_time_visit').select() ;		
		return ;
	}
	$('date_time_visit_hidden').value = date_time_visit ;
	
	///////////////////////////////////////////////////
	//	Time spent
	///////////////////////////////////////////////////
	var time_spent = trim($('time_spent').value) ;
	if (time_spent.length > 100) {
		myalert("Please complete the field 'Time spent' with maxim 100 characters !!!") ;
		$('time_spent').select() ;		
		return ;
	}
	
	///////////////////////////////////////////////////
	//	Price
	///////////////////////////////////////////////////
	var price = trim($('price').value) ;
	if (price.length > 100) {
		myalert("Please complete the field 'Price' with maxim 100 characters !!!") ;
		$('price').select() ;		
		return ;
	}
	
	///////////////////////////////////////////////////
	//	Her place
	///////////////////////////////////////////////////
	var her_place = trim($('her_place').value) ;
	if (her_place.length > 500) {
		myalert("Please complete the field 'Her place' with maxim 500 characters !!!") ;
		$('her_place').select() ;		
		return ;
	}
	
	///////////////////////////////////////////////////
	//	Her description
	///////////////////////////////////////////////////
	var her_description = trim($('her_description').value) ;
	if (her_description.length > 500) {
		myalert("Please complete the field 'Her description' with maxim 500 characters !!!") ;
		$('her_description').select() ;		
		return ;
	}
	
	///////////////////////////////////////////////////
	//	Comments
	///////////////////////////////////////////////////
	var client_comment = trim($('client_comment').value) ;
	if (!client_comment) {
       	myalert("Please complete the field 'Comments' !!!") ;
		$('client_comment').focus() ;	
		return ;
	}
	if (client_comment.length > 3000) {
		myalert("Please complete the field 'Comments' with maxim 3000 characters !!!") ;
		$('client_comment').select() ;		
		return ;
	}
	
	///////////////////////////////////////////////////
	//	Security code
	///////////////////////////////////////////////////
	var security_code = trim($('security_code').value) ;
	if (!security_code) {
       	myalert("Please complete the field 'Security code' !!!") ;
		$('security_code').focus() ;	
		return ;
	}
	if (security_code.length > 5) {
		myalert("Please complete the field 'Security code' with maxim 5 characters !!!") ;
		$('security_code').select() ;		
		return ;
	}
	
	var parametri = "sid=" + Math.random() ;
	parametri += "&checked_random=" + security_code ;
	//alert (parametri) ;
	
	var url = '_verify_image_random.php' ;
	var opt = 	{
					method: 'post',
					parameters: parametri,
					onSuccess: 	function(transport) {
									if (transport.responseText == "ok") {
										$('form_write_review_ind_escort').submit() ;
									} else {
										alert("Invalid security code !!!!!") ;
										//alert(transport.responseText) ;
									}										
								},
					onFailure: 	function(transport) {
									alert("Ajax Error check security code !!!!!") ;
									alert(transport.responseText) ;
								}
				}	
	new Ajax.Request(url, opt) ;
}

function validate_form_write_review_ag_escort() {
	///////////////////////////////////////////////////
	//	Name
	///////////////////////////////////////////////////
	var name = trim($('name').value) ;
	if (!name) {
       	myalert("Please complete the field 'Name' !!!") ;
		$('name').focus() ;	
		return ;
	}
	if (name.length > 100) {
		myalert("Please complete the field 'Name' with maxim 100 characters !!!") ;
		$('name').select() ;		
		return ;
	}
	
	///////////////////////////////////////////////////
	//	E-mail
	///////////////////////////////////////////////////
	var email = trim($('email').value) ;
	if (!email) {
       	myalert("Please complete the field 'E-mail address' !!!") ;
		$('email').focus() ;	
		return ;
	}
	if (email.length > 100) {
		myalert("Please complete the field 'E-mail address' with maxim 100 characters !!!") ;
		$('email').select() ;		
		return ;
	}
	if (email && !checkemail('email')) {
		myalert("Please complete the field 'E-mail address' with a valid e-mail address !!!") ;
		$('email').select() ;
		return ;
	}
	
	///////////////////////////////////////////////////
	//	Date / time of visit
	///////////////////////////////////////////////////
	var date_time_visit = trim($('date_time_visit').value) ;
	if (date_time_visit.length > 100) {
		myalert("Please complete the field 'Date / time of visit' with maxim 100 characters !!!") ;
		$('date_time_visit').select() ;		
		return ;
	}
	$('date_time_visit_hidden').value = date_time_visit ;
	
	///////////////////////////////////////////////////
	//	Time spent
	///////////////////////////////////////////////////
	var time_spent = trim($('time_spent').value) ;
	if (time_spent.length > 100) {
		myalert("Please complete the field 'Time spent' with maxim 100 characters !!!") ;
		$('time_spent').select() ;		
		return ;
	}
	
	///////////////////////////////////////////////////
	//	Price
	///////////////////////////////////////////////////
	var price = trim($('price').value) ;
	if (price.length > 100) {
		myalert("Please complete the field 'Price' with maxim 100 characters !!!") ;
		$('price').select() ;		
		return ;
	}
	
	///////////////////////////////////////////////////
	//	Her place
	///////////////////////////////////////////////////
	var her_place = trim($('her_place').value) ;
	if (her_place.length > 500) {
		myalert("Please complete the field 'Her place' with maxim 500 characters !!!") ;
		$('her_place').select() ;		
		return ;
	}
	
	///////////////////////////////////////////////////
	//	Her description
	///////////////////////////////////////////////////
	var her_description = trim($('her_description').value) ;
	if (her_description.length > 500) {
		myalert("Please complete the field 'Her description' with maxim 500 characters !!!") ;
		$('her_description').select() ;		
		return ;
	}
	
	///////////////////////////////////////////////////
	//	Comments
	///////////////////////////////////////////////////
	var client_comment = trim($('client_comment').value) ;
	if (!client_comment) {
       	myalert("Please complete the field 'Comments' !!!") ;
		$('client_comment').focus() ;	
		return ;
	}
	if (client_comment.length > 3000) {
		myalert("Please complete the field 'Comments' with maxim 3000 characters !!!") ;
		$('client_comment').select() ;		
		return ;
	}
	
	///////////////////////////////////////////////////
	//	Security code
	///////////////////////////////////////////////////
	var security_code = trim($('security_code').value) ;
	if (!security_code) {
       	myalert("Please complete the field 'Security code' !!!") ;
		$('security_code').focus() ;	
		return ;
	}
	if (security_code.length > 5) {
		myalert("Please complete the field 'Security code' with maxim 5 characters !!!") ;
		$('security_code').select() ;		
		return ;
	}
	
	var parametri = "sid=" + Math.random() ;
	parametri += "&checked_random=" + security_code ;
	//alert (parametri) ;
	
	var url = '_verify_image_random.php' ;
	var opt = 	{
					method: 'post',
					parameters: parametri,
					onSuccess: 	function(transport) {
									if (transport.responseText == "ok") {
										$('form_write_review_ag_escort').submit() ;
									} else {
										alert("Invalid security code !!!!!") ;
										//alert(transport.responseText) ;
									}										
								},
					onFailure: 	function(transport) {
									alert("Ajax Error check security code !!!!!") ;
									alert(transport.responseText) ;
								}
				}	
	new Ajax.Request(url, opt) ;
}

function see_review(review) {
	//alert (review) ;
	$('iframe_write_review_ind_escort_window').src = abs_url_site + "_includes/_include_see_review_ind_escort.php?review=" + review  ;
	$('div_cover').show() ;
	$('div_write_review_ind_escort_window').show() ;
}

function see_ag_esc_review(review) {
	//alert (review) ;
	$('iframe_write_review_ag_escort_window').src = abs_url_site + "_includes/_include_see_review_ag_escort.php?review=" + review  ;
	$('div_cover').show() ;
	$('div_write_review_ag_escort_window').show() ;
}

function validate_form_escort_employment() {
	///////////////////////////////////////////////////
	//	Name
	///////////////////////////////////////////////////
	var name = trim($('name').value) ;
	if (!name) {
       	myalert("Please complete the field 'Your name' !!!") ;
		$('name').focus() ;	
		return ;
	}
	if (name.length > 100) {
		myalert("Please complete the field 'Your name' with maxim 100 characters !!!") ;
		$('name').select() ;		
		return ;
	}
	
	///////////////////////////////////////////////////
	//	Telephone
	///////////////////////////////////////////////////
	var telephone = trim($('telephone').value) ;
	if (!telephone) {
       	myalert("Please complete the field 'Telephone' !!!") ;
		$('telephone').focus() ;	
		return ;
	}
	if (telephone.length > 100) {
		myalert("Please complete the field 'Telephone' with maxim 100 characters !!!") ;
		$('telephone').select() ;		
		return ;
	}
	
	///////////////////////////////////////////////////
	//	E-mail
	///////////////////////////////////////////////////
	var email = trim($('email').value) ;
	if (!email) {
       	myalert("Please complete the field 'E-mail address' !!!") ;
		$('email').focus() ;	
		return ;
	}
	if (email.length > 100) {
		myalert("Please complete the field 'E-mail address' with maxim 100 characters !!!") ;
		$('email').select() ;		
		return ;
	}
	if (email && !checkemail('email')) {
		myalert("Please complete the field 'E-mail address' with a valid e-mail address !!!") ;
		$('email').select() ;
		return ;
	}
	
	///////////////////////////////////////////////////
	//	Security code
	///////////////////////////////////////////////////
	var security_code = trim($('security_code').value) ;
	if (!security_code) {
       	myalert("Please complete the field 'Security code' !!!") ;
		$('security_code').focus() ;	
		return ;
	}
	if (security_code.length > 5) {
		myalert("Please complete the field 'Security code' with maxim 5 characters !!!") ;
		$('security_code').select() ;		
		return ;
	}
	
	var parametri = "sid=" + Math.random() ;
	parametri += "&checked_random=" + security_code ;
	//alert (parametri) ;
	
	var url = abs_url_site + '_includes/_verify_image_random.php' ;
	var opt = 	{
					method: 'post',
					parameters: parametri,
					onSuccess: 	function(transport) {
									if (transport.responseText == "ok") {
										//alert(transport.responseText) ;
										$('form_escort_employment').submit() ;
									} else {
										alert("Invalid security code !!!!!") ;
										//alert(transport.responseText) ;
									}										
								},
					onFailure: 	function(transport) {
									alert("Ajax Error check security code !!!!!") ;
									//alert(transport.responseText) ;
								}
				}	
	new Ajax.Request(url, opt) ;
}

function validate_form_agency_listing() {
	///////////////////////////////////////////////////
	//	Name
	///////////////////////////////////////////////////
	var name = trim($('name').value) ;
	if (!name) {
       	myalert("Please complete the field 'Agency name' !!!") ;
		$('name').focus() ;	
		return ;
	}
	if (name.length > 100) {
		myalert("Please complete the field 'Agency name' with maxim 100 characters !!!") ;
		$('name').select() ;		
		return ;
	}
	
	///////////////////////////////////////////////////
	//	Telephone
	///////////////////////////////////////////////////
	var telephone = trim($('telephone').value) ;
	if (!telephone) {
       	myalert("Please complete the field 'Telephone' !!!") ;
		$('telephone').focus() ;	
		return ;
	}
	if (telephone.length > 100) {
		myalert("Please complete the field 'Telephone' with maxim 100 characters !!!") ;
		$('telephone').select() ;		
		return ;
	}
	
	///////////////////////////////////////////////////
	//	E-mail
	///////////////////////////////////////////////////
	var email = trim($('email').value) ;
	if (!email) {
       	myalert("Please complete the field 'E-mail address' !!!") ;
		$('email').focus() ;	
		return ;
	}
	if (email.length > 100) {
		myalert("Please complete the field 'E-mail address' with maxim 100 characters !!!") ;
		$('email').select() ;		
		return ;
	}
	if (email && !checkemail('email')) {
		myalert("Please complete the field 'E-mail address' with a valid e-mail address !!!") ;
		$('email').select() ;
		return ;
	}
	
	///////////////////////////////////////////////////
	//	Security code
	///////////////////////////////////////////////////
	var security_code = trim($('security_code').value) ;
	if (!security_code) {
       	myalert("Please complete the field 'Security code' !!!") ;
		$('security_code').focus() ;	
		return ;
	}
	if (security_code.length > 5) {
		myalert("Please complete the field 'Security code' with maxim 5 characters !!!") ;
		$('security_code').select() ;		
		return ;
	}
	
	var parametri = "sid=" + Math.random() ;
	parametri += "&checked_random=" + security_code ;
	//alert (parametri) ;
	
	var url = abs_url_site + '_includes/_verify_image_random.php' ;
	var opt = 	{
					method: 'post',
					parameters: parametri,
					onSuccess: 	function(transport) {
									if (transport.responseText == "ok") {
										//alert(transport.responseText) ;
										$('form_agency_listing').submit() ;
									} else {
										alert("Invalid security code !!!!!") ;
										//alert(transport.responseText) ;
									}										
								},
					onFailure: 	function(transport) {
									alert("Ajax Error check security code !!!!!") ;
									//alert(transport.responseText) ;
								}
				}	
	new Ajax.Request(url, opt) ;
}

function validate_form_photographers() {
	///////////////////////////////////////////////////
	//	Name
	///////////////////////////////////////////////////
	var name = trim($('name').value) ;
	if (!name) {
       	myalert("Please complete the field 'Your name' !!!") ;
		$('name').focus() ;	
		return ;
	}
	if (name.length > 100) {
		myalert("Please complete the field 'Your name' with maxim 100 characters !!!") ;
		$('name').select() ;		
		return ;
	}
	
	///////////////////////////////////////////////////
	//	Telephone
	///////////////////////////////////////////////////
	var telephone = trim($('telephone').value) ;
	if (!telephone) {
       	myalert("Please complete the field 'Telephone' !!!") ;
		$('telephone').focus() ;	
		return ;
	}
	if (telephone.length > 100) {
		myalert("Please complete the field 'Telephone' with maxim 100 characters !!!") ;
		$('telephone').select() ;		
		return ;
	}
	
	///////////////////////////////////////////////////
	//	E-mail
	///////////////////////////////////////////////////
	var email = trim($('email').value) ;
	if (!email) {
       	myalert("Please complete the field 'E-mail address' !!!") ;
		$('email').focus() ;	
		return ;
	}
	if (email.length > 100) {
		myalert("Please complete the field 'E-mail address' with maxim 100 characters !!!") ;
		$('email').select() ;		
		return ;
	}
	if (email && !checkemail('email')) {
		myalert("Please complete the field 'E-mail address' with a valid e-mail address !!!") ;
		$('email').select() ;
		return ;
	}
	
	///////////////////////////////////////////////////
	//	Security code
	///////////////////////////////////////////////////
	var security_code = trim($('security_code').value) ;
	if (!security_code) {
       	myalert("Please complete the field 'Security code' !!!") ;
		$('security_code').focus() ;	
		return ;
	}
	if (security_code.length > 5) {
		myalert("Please complete the field 'Security code' with maxim 5 characters !!!") ;
		$('security_code').select() ;		
		return ;
	}
	
	var parametri = "sid=" + Math.random() ;
	parametri += "&checked_random=" + security_code ;
	//alert (parametri) ;
	
	var url = abs_url_site + '_includes/_verify_image_random.php' ;
	var opt = 	{
					method: 'post',
					parameters: parametri,
					onSuccess: 	function(transport) {
									if (transport.responseText == "ok") {
										//alert(transport.responseText) ;
										$('form_photographers').submit() ;
									} else {
										alert("Invalid security code !!!!!") ;
										//alert(transport.responseText) ;
									}										
								},
					onFailure: 	function(transport) {
									alert("Ajax Error check security code !!!!!") ;
									//alert(transport.responseText) ;
								}
				}	
	new Ajax.Request(url, opt) ;
}

function validate_form_contact() {
	///////////////////////////////////////////////////
	//	Name
	///////////////////////////////////////////////////
	var name = trim($('name').value) ;
	if (!name) {
       	myalert("Please complete the field 'Your name' !!!") ;
		$('name').focus() ;	
		return ;
	}
	if (name.length > 100) {
		myalert("Please complete the field 'Your name' with maxim 100 characters !!!") ;
		$('name').select() ;		
		return ;
	}
	
	///////////////////////////////////////////////////
	//	Telephone
	///////////////////////////////////////////////////
	var telephone = trim($('telephone').value) ;
	if (!telephone) {
       	myalert("Please complete the field 'Telephone' !!!") ;
		$('telephone').focus() ;	
		return ;
	}
	if (telephone.length > 100) {
		myalert("Please complete the field 'Telephone' with maxim 100 characters !!!") ;
		$('telephone').select() ;		
		return ;
	}
	
	///////////////////////////////////////////////////
	//	E-mail
	///////////////////////////////////////////////////
	var email = trim($('email').value) ;
	if (!email) {
       	myalert("Please complete the field 'E-mail address' !!!") ;
		$('email').focus() ;	
		return ;
	}
	if (email.length > 100) {
		myalert("Please complete the field 'E-mail address' with maxim 100 characters !!!") ;
		$('email').select() ;		
		return ;
	}
	if (email && !checkemail('email')) {
		myalert("Please complete the field 'E-mail address' with a valid e-mail address !!!") ;
		$('email').select() ;
		return ;
	}
	
	///////////////////////////////////////////////////
	//	Message
	///////////////////////////////////////////////////
	var message = trim($('message').value) ;
	if (!message) {
       	myalert("Please complete the field 'Message' !!!") ;
		$('message').focus() ;	
		return ;
	}
	if (message.length > 30000) {
		myalert("Please complete the field 'Message' with maxim 30000 characters !!!") ;
		$('message').select() ;		
		return ;
	}


	///////////////////////////////////////////////////
	//	Security code
	///////////////////////////////////////////////////
	var security_code = trim($('security_code').value) ;
	if (!security_code) {
       	myalert("Please complete the field 'Security code' !!!") ;
		$('security_code').focus() ;	
		return ;
	}
	if (security_code.length > 5) {
		myalert("Please complete the field 'Security code' with maxim 5 characters !!!") ;
		$('security_code').select() ;		
		return ;
	}
	
	var parametri = "sid=" + Math.random() ;
	parametri += "&checked_random=" + security_code ;
	//alert (parametri) ;
	
	var url = abs_url_site + '_includes/_verify_image_random.php' ;
	var opt = 	{
					method: 'post',
					parameters: parametri,
					onSuccess: 	function(transport) {
									if (transport.responseText == "ok") {
										//alert(transport.responseText) ;
										$('form_contact').submit() ;
									} else {
										alert("Invalid security code !!!!!") ;
										//alert(transport.responseText) ;
									}										
								},
					onFailure: 	function(transport) {
									alert("Ajax Error check security code !!!!!") ;
									//alert(transport.responseText) ;
								}
				}	
	new Ajax.Request(url, opt) ;
}

function change_city(city) {
	alert (city) ;
	
	point = new GLatLng(location_lat, location_long) ;
			
	map.setCenter(point, zoom_level);
}
