﻿function OpenQuoteWindow(product){
	
	var scrWidth = screen.availWidth;
    var scrHeight = screen.availHeight;
	
	var VanURL = 'https://quote.swinton.co.uk/Internet/van/frontPage.aspx?aff=';
	var MotorURL = 'https://quote.swinton.co.uk/Internet/van/frontPage.aspx?aff=';
	var TravelSingleURL = 'https://quote.swinton.co.uk/Internet/travel/TravelFrontPage.aspx?product=single&aff=';
	var TravelAnnualURL = 'https://quote.swinton.co.uk/Internet/travel/TravelFrontPage.aspx?product=annual&aff=';
	var TravelURL = 'https://quote.swinton.co.uk/Internet/travel/TravelFrontPage.aspx?aff=';
	var HomeBuildingsURL = 'https://quote.swinton.co.uk/Internet/home/ProposerDataCapture.aspx??cleardetails=true&product=buildings&aff=';
	var HomeContentsURL = 'https://quote.swinton.co.uk/Internet/home/ProposerDataCapture.aspx??cleardetails=true&product=contents&aff=';
	var HomeURL = 'https://quote.swinton.co.uk/Internet/home/ProposerDataCapture.aspx??cleardetails=true&product=combined&aff=';
	var TravelOver65URL = 'https://quote.swinton.co.uk/Internet/travel/TravelFrontPage.aspx?ExtraCover=over65&aff=';
	
    switch (product){
        //case "motor": window.open("https://quote.swinton.co.uk/Internet/pm/frontpage.aspx?aff=","MotorQuote","height=648,width=788,scrollbars=no,toolbar=no,menubar=no,resizable=no,directories=no"); break;
        //case "van": window.open("https://quote.swinton.co.uk/Internet/van/frontPage.aspx?aff=","VanQuote","height=648,width=788,scrollbars=yes,toolbar=no,menubar=no,resizable=no,directories=no");break;
		//case "travelSingle": window.open("https://quote.swinton.co.uk/Internet/travel/TravelFrontPage.aspx?product=single&aff=","swintonquote","height=648,width=788,scrollbars=no,toolbar=no,menubar=no,resizable=no,directories=no");break;
        //case "travelAnnual": window.open("https://quote.swinton.co.uk/Internet/travel/TravelFrontPage.aspx?product=annual&aff=","swintonquote","height=648,width=788,scrollbars=no,toolbar=no,menubar=no,resizable=no,directories=no");break;
        //case "travel": window.open("https://quote.swinton.co.uk/Internet/travel/TravelFrontPage.aspx?aff=","swintonquote","height=648,width=788,scrollbars=no,toolbar=no,menubar=no,resizable=no,directories=no");break;
        //case "homeBuildings": window.open("https://quote.swinton.co.uk/Internet/home/ProposerDataCapture.aspx??cleardetails=true&product=buildings&aff=","swintonquote","height=695,width=788,scrollbars=no,toolbar=no,menubar=no,resizable=no,directories=no");break;
        //case "homeContents": window.open("https://quote.swinton.co.uk/Internet/home/ProposerDataCapture.aspx??cleardetails=true&product=contents&aff=","swintonquote","height=695,width=788,scrollbars=no,toolbar=no,menubar=no,resizable=no,directories=no");break;
        //case "home": window.open("https://quote.swinton.co.uk/Internet/home/ProposerDataCapture.aspx??cleardetails=true&product=combined&aff=","swintonquote","height=695,width=788,scrollbars=no,toolbar=no,menubar=no,resizable=no,directories=no");break;
        //case "travelOver65": window.open("https://quote.swinton.co.uk/Internet/travel/TravelFrontPage.aspx?ExtraCover=over65&aff=","swintonquote","height=648,width=788,scrollbars=no,toolbar=no,menubar=no,resizable=no,directories=no");break;
		
		case "motor": 
			eval("window.location = MotorURL");
			//eval("window.open(MotorURL,'MotorQuote','height=' + scrHeight + ',width=' + scrWidth + ',scrollbars=yes');");
			break;
		
		case "van": 
			eval("window.location = VanURL");
			//eval("window.open(VanURL,'VanQuote','height=' + scrHeight + ',width=' + scrWidth + ',scrollbars=yes');");
			break;
			
		case "travelSingle": 
			eval("window.location = TravelSingleURL");
			//eval("window.open(TravelSingleURL,'swintonquote','height=' + scrHeight + ',width=' + scrWidth + ',scrollbars=yes');");
			break;
			
		case "travelAnnual": 
			eval("window.location = TravelAnnualURL");
			//eval("window.open(TravelAnnualURL,'swintonquote','height=' + scrHeight + ',width=' + scrWidth + ',scrollbars=yes');");
			break;
			
		case "travel": 
			eval("window.location = TravelURL");
			//eval("window.open(TravelURL,'swintonquote','height=' + scrHeight + ',width=' + scrWidth + ',scrollbars=yes');");
			break;
			
		case "homeBuildings": 
			eval("window.location = HomeBuildingsURL");			
			//eval("window.open(HomeBuildingsURL,'swintonquote','height=' + scrHeight + ',width=' + scrWidth + ',scrollbars=yes');");
			break;
			
		case "homeContents": 
			eval("window.location = HomeContentsURL");			
			//eval("window.open(HomeContentsURL,'swintonquote','height=' + scrHeight + ',width=' + scrWidth + ',scrollbars=yes');");
			break;
			
		case "home": 
			eval("window.location = HomeURL");
			//eval("window.open(HomeURL,'swintonquote','height=' + scrHeight + ',width=' + scrWidth + ',scrollbars=yes');");
			break;
		
		case "travelOver65": 
			eval("window.location = TravelOver65URL");
			//eval("window.open(TravelOver65URL,'swintonquote','height=' + scrHeight + ',width=' + scrWidth + ',scrollbars=yes');");
			break;
			
		default:
			break;
    }
}
 
function OpenRetrieveWindow(product){
    
	var scrWidth = screen.availWidth;
    var scrHeight = screen.availHeight;
	
	var MotorURL = 'https://quote.swinton.co.uk/Internet/pm/quoteretrieval.aspx?aff=';
	var VanURL = 'https://quote.swinton.co.uk/Internet/van/quoteretrieval.aspx?aff=';
	
	switch (product){
        
		//case "motor": window.open("https://quote.swinton.co.uk/Internet/pm/quoteretrieval.aspx?aff=","MotorQuote","height=648,width=788,scrollbars=no,toolbar=no,menubar=no,resizable=no,directories=no");
        //case "van": window.open("https://quote.swinton.co.uk/Internet/van/quoteretrieval.aspx?aff=","VanQuote","height=648,width=788,scrollbars=no,toolbar=no,menubar=no,resizable=no,directories=no");
		
		case "motor": 
			eval("window.location = MotorURL");
			//eval("window.open(MotorURL,'MotorQuote','height=' + scrHeight + ',width=' + scrWidth + ',scrollbars=yes');");
			break;
		
		case "van": 
			eval("window.location = VanURL");
			//eval("window.open(VanURL,'VanQuote','height=' + scrHeight + ',width=' + scrWidth + ',scrollbars=yes');");
			break;
			
		default:
			break;
    }
}

