<!--
function setGalleryCookies(p, a) {
	var exdate=new Date();
	exdate.setDate(exdate.getDate()+1);
	document.cookie="gt_img_gal_spid=" +escape(p)+";expires="+exdate.toGMTString()+";path=/";
	document.cookie="gt_img_gal_said=" +escape(a)+";expires="+exdate.toGMTString()+";path=/";
	document.cookie="gt_img_gal=" +escape('1')+";expires="+exdate.toGMTString()+";path=/";
}


function CreateBookmarkLink() 
{

title = "Gautrain Rapid Rail Link"; 
url = self.location.href;
	if (window.sidebar) 
	{
		window.sidebar.addPanel(title, url,"");	
		} else if( window.external ) {
			window.external.AddFavorite( url, title); 
			}	else if(window.opera && window.print) {
					return true; } 
					} 
					
						



function sets(val){
  elt = document.getElementById('mys'); elt.value=val;
  elt = document.getElementById('winname'); elt.value=window.name;
  elt = document.getElementById('myform'); elt.submit();
}

function getURL() {
	return window.location.href;
}

// Function to print this page
	function funPrintPage(intPage,strTitle,intFID)
		{
			strURL = "_includes/add_this/printpage.php?fid=" + intFID + "&pid=" + intPage + "&tit=" + strTitle;
			window.location = strURL;
		}


function gup( name ){  
	name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");  
	var regexS = "[\\?&]"+name+"=([^&#]*)";  
	var regex = new RegExp( regexS );  
	var results = regex.exec( window.location.href );  
	if( results == null )    
	return "";  
	else    
	return results[1];
}


function setCookieBT(c_name,value,expiredays) {
	var exdate=new Date();
	exdate.setDate(exdate.getDate()+expiredays);
	document.cookie=c_name+ "=" +escape(value)+	((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
} 



function getCookieBT(c_name) {
	if (document.cookie.length>0) {
		c_start=document.cookie.indexOf(c_name + "=");
		if (c_start!=-1) { 
			c_start=c_start + c_name.length+1; 
			c_end=document.cookie.indexOf(";",c_start);
			if (c_end==-1) c_end=document.cookie.length;
			return unescape(document.cookie.substring(c_start,c_end));
		} 
	}
	return "";
}

function openRateWindow(pid) {
	var screenX = ((screen.width - 500) / 2);
	var screenY = (screen.height - 50) / 2;

	//get the window coordinates and set the vars i.e scroll etc
	var width = 500;
	var height = 50;
	var str = "height=" + height + ",innerHeight=" + height;
	str += ",width=" + width + ",innerWidth=" + width;
	if (window.screen) {
		var ah = screen.availHeight - 30;
		var aw = screen.availWidth - 10;
		var xc = (aw - width) / 2;
		var yc = (ah - height) / 2;
	
		str += ",left=" + xc + ",screenX=" + xc;
		str += ",top=" + yc + ",screenY=" + yc;
		str += ",scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";
	}				

	mywindow = window.open('_includes/rate/rate.php?pid=' + pid, '' , str);
	mywindow.location.href = '_includes/rate/rate.php?pid=' + pid;
	if (mywindow.opener == null) mywindow.opener = self;

//	document.location = 'index.php';
	
}


//-->