// JavaScript Document

/***********************************************
* Ajax Includes script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
* To include a page, invoke ajaxinclude("afile.htm") in the BODY of page. The included file MUST be from the same domain as the page displaying it.
Made some changes to load up a video/image iframe in the ajax_show_page div.
***********************************************/

var urlVid = "";
var ajax_show_page_holder = 'ajax_show_page_holder';
var ajax_show_page = 'ajax_show_page';

function SHOWSERVICE(vid_id, ypos,xpos, type, widthIn, height) {
	var setWidth = 690;
	var setHeight = 580;
	var scrolling = 'no';
	if(widthIn != null){
		setWidth = widthIn;
	}
	
		
		scrolling = 'auto';
		urlDisplay = "index.cfm?event=service&service=" + vid_id;
	
	var page_request = false;
	if (!ypos){
		ypos = 100;
	}
	else{
		ypos = ypos - 0;
		vid_iframe_code = '<iframe src="' + urlDisplay + '" id="the_video_in_page" name="the_video_in_page" frameborder="0" marginheight="0" marginwidth="0" allowtransparency="yes" scrolling="' + scrolling +'" style="border:0px; border-style:none; width:'+ setWidth + 'px; height:580px; margin:0; padding:0;"></iframe>';
		document.getElementById(ajax_show_page_holder).style.visibility = "visible";
		document.getElementById(ajax_show_page_holder).style.display = "block";
		document.getElementById(ajax_show_page_holder).style.top = ypos + "px";
		document.getElementById(ajax_show_page).style.overflow = "hidden";
		document.getElementById(ajax_show_page).innerHTML = vid_iframe_code;
		window.frames["the_video_in_page"].location.href=urlDisplay;

	}
			

	
}


function A2AClose() {
	document.getElementById('ajax_show_page_holder').style.visibility = "hidden";
	document.getElementById('ajax_show_page_holder').style.display = "none";
	urlBlank = "/includes/common_content/" + "BLANK.php" + "?r=" + Math.floor(Math.random()*1001);
	var page_request = false;

}






function RSLShowNews(news_id, ypos,xpos, type, widthIn, height) {
	
	var setWidth = 690;
	var setHeight = 580;
	var scrolling = 'no';
	if(widthIn != null){
		setWidth = widthIn;
	}
	
		
	scrolling = 'auto';
	urlDisplay = "http://news.rsllhr.co.uk/news/view.asp?ID=" + news_id;
	
	var page_request = false;
	if (!ypos){
		ypos = 100;
	}
	else{
		ypos = ypos - 0;
		vid_iframe_code = '<iframe src="' + urlDisplay + '" id="the_video_in_page" name="the_video_in_page" frameborder="0" marginheight="0" marginwidth="0" allowtransparency="yes" scrolling="' + scrolling +'" style="border:0px; border-style:none; width:'+ setWidth + 'px; height:580px; margin:0; padding:0;"></iframe>';
		document.getElementById(ajax_show_page_holder).style.visibility = "visible";
		document.getElementById(ajax_show_page_holder).style.display = "block";
		document.getElementById(ajax_show_page_holder).style.top = ypos + "px";
		document.getElementById(ajax_show_page).style.overflow = "hidden";
		document.getElementById(ajax_show_page).innerHTML = vid_iframe_code;
		frames["the_video_in_page"].location.href=urlDisplay;

	}
			

	
}

