
/* Gallia */

function SwingLineGallia()
{
	return SwingLine("GALL", null, null, null, null, null, null);
}

function SwingLineGallia(ProductID)
{
	return SwingLine("GALL", null, null, ProductID, null, null, null);
}

function SwingLineGallia(ProductID, Length)
{
	return SwingLine("GALL", null, null, ProductID, Length, null, null);
}

function SwingLineGallia(ProductID, Length, DateStart)
{
	return SwingLine("GALL", null, null, ProductID, Length, DateStart, null);
}

function SwingLineGalliaPackage(PackageID)
{
	return SwingLine("GALL", null, PackageID, null, null, null, null);
}

function SwingLineGalliaPackage(PackageID, DateStart)
{
	return SwingLine("GALL", null, PackageID, null, null, DateStart, null);
}

function SwingLineGalliaLogon()
{
	return SwingLine("GALL", null, null, null, null, null, true);
}

function SwingLineGalliaPayment()
{
	return SwingLine("GALL", "Payment", null, null, null, null, null);
}

function SwingLineGalliaDocuments()
{
	return SwingLine("GALL", "Documents", null, null, null, null, null);
}

/* Trips4You */

function SwingLineTrips4You()
{
	return SwingLine("GAL2", null, null, null, null, null, null);
}

function SwingLineTrips4You(ProductID)
{
	return SwingLine("GAL2", null, null, ProductID, null, null, null);
}

function SwingLineTrips4You(ProductID, Length)
{
	return SwingLine("GAL2", null, null, ProductID, Length, null, null);
}

function SwingLineTrips4You(ProductID, Length, DateStart)
{
	return SwingLine("GAL2", null, null, ProductID, Length, DateStart, null);
}

function SwingLineTrips4YouPackage(PackageID)
{
	return SwingLine("GAL2", null, PackageID, null, null, null, null);
}

function SwingLineTrips4YouPackage(PackageID, DateStart)
{
	return SwingLine("GAL2", null, PackageID, null, null, DateStart, null);
}

function SwingLineTrips4YouLogon()
{
	return SwingLine("GAL2", null, null, null, null, null, true);
}

function SwingLineTrips4YouPayment()
{
	return SwingLine("GAL2", "Payment", null, null, null, null, null);
}

function SwingLineTrips4YouDocuments()
{
	return SwingLine("GAL2", "Documents", null, null, null, null, null);
}

/* Feel2Travel */

function SwingLineFeel2Travel()
{
	return SwingLine("GAL3", null, null, null, null, null, null);
}

function SwingLineFeel2Travel(ProductID)
{
	return SwingLine("GAL3", null, null, ProductID, null, null, null);
}

function SwingLineFeel2Travel(ProductID, Length)
{
	return SwingLine("GAL3", null, null, ProductID, Length, null, null);
}

function SwingLineFeel2Travel(ProductID, Length, DateStart)
{
	return SwingLine("GAL3", null, null, ProductID, Length, DateStart, null);
}

function SwingLineFeel2TravelPackage(PackageID)
{
	return SwingLine("GAL3", null, PackageID, null, null, null, null);
}

function SwingLineFeel2TravelPackage(PackageID, DateStart)
{
	return SwingLine("GAL3", null, PackageID, null, null, DateStart, null);
}

function SwingLineFeel2TravelLogon()
{
	return SwingLine("GAL3", null, null, null, null, null, true);
}

function SwingLineFeel2TravelPayment()
{
	return SwingLine("GAL3", "Payment", null, null, null, null, null);
}

function SwingLineFeel2TravelDocuments()
{
	return SwingLine("GAL3", "Documents", null, null, null, null, null);
}


/* Main Function */

function SwingLine(ContractID, Module, PackageID, ProductID, Length, DateStart, LogonRequired)
{
	sURL		= "http://www.servico.net/Gallia/SwingLine.aspx?ContractID=" + ContractID;
	sName		= "SwingLine";
	bReplace	= true;


        // code toegevoegd bij Dot Internet: lees cookie
        var galliadata = ''
        function getCookie(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
            galliadata = unescape(document.cookie.substring(c_start,c_end))
            } 
          }
        return ""
        }

        getCookie('Gallialink')
        sURL = sURL + '&' + galliadata

        // einde code toegevoegd bij Dot Internet


	
	if (Module			!= null) sURL += "&Module="			+ Module;
	if (PackageID		!= null) sURL += "&PackageID="		+ PackageID;
	if (ProductID		!= null) sURL += "&ProductID="		+ ProductID;
	if (Length			!= null) sURL += "&Length="			+ Length;
	if (DateStart		!= null) sURL += "&DateStart="		+ DateStart;
	if (LogonRequired	!= null) sURL += "&LogonRequired="	+ LogonRequired;

	// Calculate location

	iWidth		= 750;
	iHeight		= 550;
	
	iLeft		= (screen.width  - iWidth)  / 2;
	iTop		= (screen.height - iHeight) / 2;
	
	// Set sFeatures
	
	sFeatures	= "";
	
	sFeatures	+= "directories=no,";
	sFeatures	+= "location=no,";
	sFeatures	+= "menubar=no,";

	sFeatures	+= "width="		+ iWidth	+ ",";
	sFeatures	+= "height="	+ iHeight	+ ",";
	sFeatures	+= "left="		+ iLeft		+ ",";
	sFeatures	+= "top="		+ iTop;
	
	// Open new window

	oNewWindow = window.open(sURL, sName, sFeatures, bReplace);
	oNewWindow.focus();
	
	return false; 
}
