﻿// JScript File
function showvehicledetails(id, cdid)
{
    window.open("vehicledetails.aspx?id=" 
    + id+"&&cdid="+cdid,  
    "details", "menubar=no,width=350px,height=400px,scrollbars=yes");      
    
}
function showvehicledetails2(id)
{
    window.open("vehicledetails.aspx?id=" 
    + id,  
    "details", "menubar=no,width=350px,height=400px,scrollbars=yes");      
    
}
function showlocationspot(id)
{
if(id<1)
{
alert("Please Select Correct Location.");
return;
}
window.open("locationdetails.aspx?locationspotsid=" 
    + id,  
    "details", "menubar=no,width=555px,height=610px,scrollbars=yes");
//alert(id);
//window.open("locationdetails.aspx?locationspotsid=" + id, ",,screenX=-1,screenY=-1,width=600,height=300,scrollbars=yes, resizable=yes alwaysRaised=yes");
//return false;
}
function showlocationspotforsimple(id)
{
if(id<1)
{
alert("Please Select Correct Location.");
return;
}
window.open("../locationdetails.aspx?locationspotsid=" 
    + id,  
    "details", "menubar=no,width=555px,height=610px,scrollbars=yes");
}
/* Full Screen PopUp*/
winWidth = 400; // sets a default width for browsers who do not understand screen.width below
winheight = 400; // ditto for height

if (screen){ // weeds out older browsers who do not understand screen.width/screen.height
   winWidth = screen.width;
   winHeight = screen.height;
}
	
// this function calls a popupWindow where
// win is the page address i.e. '../page.htm'

/* Full Screen PopUp*/

function ddlReservatoinType(ddlObject){
    if (ddlObject.options[ddlObject.selectedIndex].text=="Worldwide") {//internationalreservation.aspx
        window.open("budget_middleeast.aspx", "details", "menubar=no,scrollbars=yes,toolbar=no, resizable=true, width="+winWidth+",height="+winHeight+",left=0,top=0'");     
    }
}

//function ddlPaymentMethod(ddlObject){
//    if (ddlObject.options[ddlObject.selectedIndex].text=="Credit Card") 
//    {
//        alert('Credit card payment service will be available soon.')   
//        ddlObject.options[ddlObject.selectedIndex] = 0;
//    }
//}

//function getvalue()
//{
//    alert('in');
//    var obj = $get(<%=DropDownList1.ClientID %>);
//    alert(obj);
//    var IndexValue = $get('<%=DropDownList1.ClientID %>').selectedIndex;
//    var SelectedVal = $get('<%=DropDownList1.ClientID %>').options[IndexValue].value;
//    alert(SelectedVal);
//}

function init0()
{
	resize();
}

function resize()
{
	obj = document.getElementById('fhlp');
	//obj3 = document.getElementById('contentframe');
	// hide DIV "nvhlp" for external URL's 
	
	height = getHeight();
	if( obj && height )
	{
		height = height - 93;
		obj.style.height = height+"px";
		obj2 = document.getElementById('nvhlp');
		if( obj2 )
		{
			obj2.style.height = height+"px";
		}
	}	
	
/*	if( obj3 && height )
	{
		height = height - 100;
		obj3.style.height = height+"px";
		obj2 = document.getElementById('nvhlp');
		if( obj2 )
		{
			obj2.style.height = height+"px";
		}
	}*/
}

function getHeight() 
{
	myHeight = 0;
	if( typeof( window.innerWidth ) == 'number' ) 
	{
		//Non-IE
		myHeight = window.innerHeight;
	}
	else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) 
	{
		//IE 6+ in 'standards compliant mode'
		myHeight = document.documentElement.clientHeight;
	} 
	else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) 
	{
		//IE 4 compatible
		myHeight = document.body.clientHeight;
	}
	return myHeight;
}
// -->

function showsummary(id)
{

window.open("summaryemailprint.aspx?number=" 
    + id,  
    "details", "menubar=no,width=555px,height=610px,scrollbars=yes");
//alert(id);
//window.open("locationdetails.aspx?locationspotsid=" + id, ",,screenX=-1,screenY=-1,width=600,height=300,scrollbars=yes, resizable=yes alwaysRaised=yes");
//return false;
}