/* Hervan */
function SwingLineHervan(PackageID, Length, DateStart, LanguageID)
{
	return SwingLine("HEVD", null, PackageID, null, Length, DateStart, LanguageID);
}

/* Main Function */

function SwingLine(ContractID, Module, PackageID, ProductID, Length, DateStart, LanguageID)
{
	//sURL		= "http://www.servico.net/Gallia/SwingLine.aspx?ContractID=" + ContractID;
	//sURL		= "http://bookings.hervan.be/swingline/modules/booking/default.aspx?ContractID=" + ContractID;
	sURL		= "orderdirect.php?ContractID=" + ContractID + "&PackageID=" + PackageID + "&length=" + length + "&DateStart=" + DateStart + "&LanguageID=" + LanguageID;
	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 (LanguageID		!= null) sURL += "&LanguageID="		+ LanguageID;
	//if (LogonRequired	!= null) sURL += "&LogonRequired="	+ LogonRequired;

	// Calculate location
	iWidth		= 750;
	iHeight		= 580;

	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;
}


function Openinfo(lang){

	sURL		= "info.php?lang=" + lang;
	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

	// Calculate location
	iWidth		= 750;
	iHeight		= 580;

	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;

}