/**
  * 
  *  OEM Redirect Item List
  *  
  *  Emerson Barrion
  *  May 05, 2011
  *
  */

 function gup( name )
{
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  if( results == null )
    return "";
  else
    return results[1];
}
  
var product_url = window.location.pathname;
var product_param = gup( 'page' );
var customer_param = gup( 'category' );

if(product_url == '/Dealers' || product_url == '/dealers') {
	window.location.replace("http://www.digistor.com/s.nl/it.I/id.21/.f?category=12&category=12");
}
// This link should be redirect to other link
if( product_url == '/Panasonic-Slim-DVD-Burner-SATA-Tray-Load_2' ) {
  window.location.replace("http://www.digistor.com/Panasonic-Slim-DVD-Burner-SATA-Tray-Load_4");
}
if( product_url == '/return-policy' || product_url == '/Return-Policy' ) {
  window.location.replace("http://www.digistor.com/s.nl/it.I/id.30/.f");
}
if( product_url == '/returns' ) {
  window.location.replace("http://www.digistor.com/s.nl/it.I/id.34/.f");
}


if( product_param != 'oem' && customer_param.length === 0 )
{
	switch (product_url)
	{
		case ("/Panasonic-Slim-Blu-ray-Burner-Slimline-SATA-Tray-Load_2"):
		  window.location.replace("http://www.digistor.com/Panasonic-Slim-Blu-ray-Burner-Slimline-SATA-Tray-Load_2?page=oem");
		break
		case ("/TEAC-Blu-ray-Combo-Drive-Slim-SATA-Slot-Load"):
		  window.location.replace("http://www.digistor.com/TEAC-Blu-ray-Combo-Drive-Slim-SATA-Slot-Load?page=oem");
		break
		case ("/Panasonic-Slim-Blu-ray-Burner-Slimline-SATA-Tray-Load_3"):
		  window.location.replace("http://www.digistor.com/Panasonic-Slim-Blu-ray-Burner-Slimline-SATA-Tray-Load_3?page=oem");
		break
		case ("/DIGISTOR-5-25-Blu-ray-Burner-SATA-Slot-Load-Drive"):
		  window.location.replace("http://www.digistor.com/DIGISTOR-5-25-Blu-ray-Burner-SATA-Slot-Load-Drive?page=oem");
		break
		case ( "/Panasonic-Slim-Blu-ray-Burner-Slimline-SATA-Slot-Load"):
		  window.location.replace("http://www.digistor.com/Panasonic-Slim-Blu-ray-Burner-Slimline-SATA-Slot-Load?page=oem");
		break
		case ( "/Internal-Blu-ray-ADA-Drive-SATA-Advanced-Disc-Archiving"):
		  window.location.replace("http://www.digistor.com/Internal-Blu-ray-ADA-Drive-SATA-Advanced-Disc-Archiving?page=oem");
		break
		case ( "/External-Blu-ray-ADA-Drive-Advanced-Disc-Archiving"):
		  window.location.replace("http://www.digistor.com/External-Blu-ray-ADA-Drive-Advanced-Disc-Archiving?page=oem");
		break
		case ( "/Digistor-External-DVD-Burner-USB-2-0-Tray-Load"):
		  window.location.replace("http://www.digistor.com/Digistor-External-DVD-Burner-USB-2-0-Tray-Load?page=oem");
		break		
		case ( "/Digistor-External-DVD-ROM-Drive-USB-2-0-Tray-Load"):
		  window.location.replace("http://www.digistor.com/Digistor-External-DVD-ROM-Drive-USB-2-0-Tray-Load?page=oem");
		break
		case ( "/Digistor-External-DVD-Burner-USB-2-0-Slot-Load"):
		  window.location.replace("http://www.digistor.com/Digistor-External-DVD-Burner-USB-2-0-Slot-Load?page=oem");
		break
		//case ( "/Digistor-External-Blu-ray-Burner-USB-2-0-Tray-Load"):
		//  window.location.replace("http://www.digistor.com/Digistor-External-Blu-ray-Burner-USB-2-0-Tray-Load?page=oem");
		//break
		case ( "/Digistor-External-Blu-ray-Burner-USB-2-0-Tray-Load-Drive"):
		  window.location.replace("http://www.digistor.com/Digistor-External-Blu-ray-Burner-USB-2-0-Tray-Load-Drive?page=oem");
		break
		case ( "/Digistor-External-Blu-ray-Burner-USB-2-0-Slot-Load"):
		  window.location.replace("http://www.digistor.com/Digistor-External-Blu-ray-Burner-USB-2-0-Slot-Load?page=oem");
		break		
		case ( "/External-Blu-ray-ADA-Drive-Advanced-Disc-Archiving"):
		  window.location.replace("http://www.digistor.com/External-Blu-ray-ADA-Drive-Advanced-Disc-Archiving?page=oem");
		break	
		case ( "/Panasonic-Slim-DVD-Burner-Slimline-SATA-Tray-Load_3"):
		  window.location.replace("http://www.digistor.com/Panasonic-Slim-DVD-Burner-Slimline-SATA-Tray-Load_3?page=oem");
		break		
		case ( "/Panasonic-Slim-DVD-Burner-Slimline-SATA-Slot-Load-Drive"):
		  window.location.replace("http://www.digistor.com/Panasonic-Slim-DVD-Burner-Slimline-SATA-Slot-Load-Drive?page=oem");
		break
		case ( "/TEAC-Slim-DVD-ROM-SATA-Tray-Load-Drive"):
		  window.location.replace("http://www.digistor.com/TEAC-Slim-DVD-ROM-SATA-Tray-Load-Drive?page=oem");
		break		
		case ( "/DIGISTOR-5-25-DVD-Writer-Slot-Load"):
		  window.location.replace("http://www.digistor.com/DIGISTOR-5-25-DVD-Writer-Slot-Load?page=oem");
		break		
		case ( "/TEAC-Slim-DVD-Burner-SATA-Slot-Load_4"):
		  window.location.replace("http://www.digistor.com/TEAC-Slim-DVD-Burner-SATA-Slot-Load_4?page=oem");
		break		
		case ( "/DIGISTOR-25GB-Blu-ray-BD-R-Media-5-pack"):
		  window.location.replace("http://www.digistor.com/DIGISTOR-25GB-Blu-ray-BD-R-Media-5-pack?page=oem");
		break	
		case ( "/DIGISTOR-25GB-BD-R-Media-White-Inkjet-Printable-Surface-5-pack"):
		  window.location.replace("http://www.digistor.com/DIGISTOR-25GB-BD-R-Media-White-Inkjet-Printable-Surface-5-pack?page=oem");
		break
		case ( "/DIGISTOR-25GB-Blu-ray-BD-R-Media-White-Inkjet-Printable-Surface-10-pack"):
		  window.location.replace("http://www.digistor.com/DIGISTOR-25GB-Blu-ray-BD-R-Media-White-Inkjet-Printable-Surface-10-pack?page=oem");
		break		
		case ( "/DIGISTOR-25GB-Blu-ray-BD-R-Media-10-pack"):
		  window.location.replace("http://www.digistor.com/DIGISTOR-25GB-Blu-ray-BD-R-Media-10-pack?page=oem");
		break
		case ( "/DIGISTOR-25GB-Blu-ray-BD-R-Media-White-Inkjet-Printable-Surface-25-pack"):
		  window.location.replace("http://www.digistor.com/DIGISTOR-25GB-Blu-ray-BD-R-Media-White-Inkjet-Printable-Surface-25-pack?page=oem");
		break	
		case ( "/DIGISTOR-25GB-BD-R-Media-25-pack"):
		  window.location.replace("http://www.digistor.com/DIGISTOR-25GB-BD-R-Media-25-pack?page=oem");
		break	
		case ( "/DIGISTOR-25GB-Blu-ray-BD-R-Media-100-pack"):
		  window.location.replace("http://www.digistor.com/DIGISTOR-25GB-Blu-ray-BD-R-Media-100-pack?page=oem");
		break		
		case ( "/DIGISTOR-25GB-BD-R-Media-White-Inkjet-Printable-Surface-100-pack"):
		  window.location.replace("http://www.digistor.com/DIGISTOR-25GB-BD-R-Media-White-Inkjet-Printable-Surface-100-pack?page=oem");
		break	
		case ( "/DIGISTOR-50GB-BD-R-Media-6X-5-pack"):
		  window.location.replace("http://www.digistor.com/DIGISTOR-50GB-BD-R-Media-6X-5-pack?page=oem");
		break		
		case ( "/DIGISTOR-50GB-BD-R-Media-6X-10-pack"):
		  window.location.replace("http://www.digistor.com/DIGISTOR-50GB-BD-R-Media-6X-10-pack?page=oem");
		break		
		//case ( "/DIGISTOR-50GB-BD-R-Media-25-pack"):
		//  window.location.replace("http://www.digistor.com/DIGISTOR-50GB-BD-R-Media-25-pack?page=oem");
		//break	
		case ( "/Panasonic-50-50GB-Blu-Ray-Recordable-BD-R-Double-Layer-Disc"):
		  window.location.replace("http://www.digistor.com/Panasonic-50-50GB-Blu-Ray-Recordable-BD-R-Double-Layer-Disc?page=oem");
		break	
		case ("/DIGISTOR-50GB-BD-R-Media-6X-100-pack"):
		  window.location.replace("http://www.digistor.com/DIGISTOR-50GB-BD-R-Media-6X-100-pack?page=oem");
		break			
		case ( "/Panasonic-50GB-BD-RE-Double-Layer-Printable-Spindle-Pack_2"):
		  window.location.replace("http://www.digistor.com/Panasonic-50GB-BD-RE-Double-Layer-Printable-Spindle-Pack_2?page=oem");
		break	
		case ( "/Panasonic-50-50GB-BD-RE-Blu-ray-Rewritable-Double-Layer-Discs"):
		  window.location.replace("http://www.digistor.com/Panasonic-50-50GB-BD-RE-Blu-ray-Rewritable-Double-Layer-Discs?page=oem");
		break		
		case ( "/Digistor-Mini-USB-Cable-for-Slim-External-Drive"):
		  window.location.replace("http://www.digistor.com/Digistor-Mini-USB-Cable-for-Slim-External-Drive?page=oem");
		break		
		case ( "/DIGISTOR-Dual-Cable-for-Slim-External-Drive-Mini-USB-DC"):
		  window.location.replace("http://www.digistor.com/DIGISTOR-Dual-Cable-for-Slim-External-Drive-Mini-USB-DC?page=oem");
		break		
		case ( "/Digistor-Slimline-SATA-to-7-pin-SATA-Conversion-Cable"):
		  window.location.replace("http://www.digistor.com/Digistor-Slimline-SATA-to-7-pin-SATA-Conversion-Cable?page=oem");
		break				
		case ( "/DIGISTOR-SATA-Cable"):
		  window.location.replace("http://www.digistor.com/DIGISTOR-SATA-Cable?page=oem");
		break			
		case ( "/Digistor-Slimline-SATA-to-Standard-SATA-Conversion-Cable"):
		  window.location.replace("http://www.digistor.com/Digistor-Slimline-SATA-to-Standard-SATA-Conversion-Cable?page=oem");
		break			
		case ( "/Digistor-5v-Power-Adapter-for-Slim-External-Drives"):
		  window.location.replace("http://www.digistor.com/Digistor-5v-Power-Adapter-for-Slim-External-Drives?page=oem");
		break				
		case ( "/Combo-Kit-for-Dual-Slimline-Blu-ray-DVD-Drive-Black-Bezel"):
		  window.location.replace("http://www.digistor.com/Combo-Kit-for-Dual-Slimline-Blu-ray-DVD-Drive-Black-Bezel?page=oem");
		break		
		case ( "/Bezel-Kit-for-Single-Slimline-Blu-ray-DVD-Black-Bezel"):
		  window.location.replace("http://www.digistor.com/Bezel-Kit-for-Single-Slimline-Blu-ray-DVD-Black-Bezel?page=oem");
		break				
		case ( "/Black-Bezel-for-Panasonic-Slim-Slot-Load-Drive"):
		  window.location.replace("http://www.digistor.com/Black-Bezel-for-Panasonic-Slim-Slot-Load-Drive?page=oem");
		break	
		case ( "/Silver-Bezel-for-Panasonic-12-7mm-Slot-Load-Drive"):
		  window.location.replace("http://www.digistor.com/Silver-Bezel-for-Panasonic-12-7mm-Slot-Load-Drive?page=oem");
		break
		case ( "/Silver-Bezel-for-Panasonic-12-7mm-Slot-Load-Drive"):
		  window.location.replace("http://www.digistor.com/Silver-Bezel-for-Panasonic-12-7mm-Slot-Load-Drive?page=oem");
		break
		default:
		break
	}
}

