/* This is client side code that does the following: 1) It takes in the URL that the user intended to go to 2) Parses out to find the last element of that URL (xxxxx.html) 3) Redirects to a .jsp page which confirms that the page does not exist, writes to the log and finishes the redirect.*/ function redirect() { window.location.href = path; } var undefined; var frameCheck = parent.sideNav; if(frameCheck === undefined || frameCheck != "undefined") { var url = document.URL; //Get the URL url = url.toString(); //Convert the URL to a string var reg = /com\/(\S*)/; var fileNameArray = url.match(reg); var fileName = fileNameArray[1]; //Get everything after the '.com/' var path = "http://www.molex.com/cgi-bin/bv/molex/jsp/index_login.jsp"; if(fileName.indexOf("jp\/") != -1) //Found japanese { path = path + "?destination=" + fileName + "&lang=japanese"; } //ADD ELSE IF's FOR OTHER LANGUAGES HERE... //else if(fileName.indexOf("kr\/") != -1) //Found korean //... else { path = path + "?destination=" + fileName; } document.write('
');
//Wait 1 second, and then redirect to index.jsp, which will log the user in and redirect to the keyword page.
var timeOut = setTimeout("redirect()", 500);
}