var menuitems = new Object();
menuitems['ome'] = new Object();
menuitems['aboutus'] = new Object();
menuitems['aboutus']['global_presence.php'] = 'Flexicon Global Presence;menuitems['aboutus']['flexicon_group.php'] = 'Flexicon Group Introduction;menuitems['aboutus']['whats_new.php'] = 'What's New;menuitems['application'] = new Object();
menuitems['application']['construction_application.php'] = 'Construction;menuitems['application']['defence_application.php'] = 'Defence & Marine;menuitems['application']['rail_application.php'] = 'Rail;menuitems['application']['manufacturing_application.php'] = 'Manufacturing;menuitems['application']['hazardous_application.php'] = 'Hazardous Areas;menuitems['application']['tailored_application.php'] = 'Tailored Applications;menuitems['roducts'] = new Object();
menuitems['roducts']['metallicsystems.php'] = 'metallic conduit & fittings;menuitems['roducts']['nonmetallicsystems.php'] = 'non-metallic conduits & fittings;menuitems['roducts']['tools.php'] = 'TOOLS;menuitems['roducts']['accessories2.php'] = 'ACCESSORIES;menuitems['roducts']['contractorpack.php'] = 'CONTRACTOR PACK;menuitems['roducts']['energy-management.php'] = 'Energy Management Timers;menuitems['roducts']['new_product.php'] = 'FPA(X) - the Ultimate fitting;menuitems['technicalguidance'] = new Object();
menuitems['technicalguidance']['qualitystandardapprovals.php'] = 'STANDARD & APPROVALS;menuitems['technicalguidance']['chemicalresistance.php'] = 'CHEMICAL RESISTANCE;menuitems['technicalguidance']['threaddata.php'] = 'THREAD DATA;menuitems['technicalguidance']['lowfirehazard.php'] = 'LOW FIRE HAZARD;menuitems['technicalguidance']['ipratings.php'] = 'IP RATINGS;menuitems['technicalguidance']['cutting_assembly_guide.php'] = 'Cutting & assembly;menuitems['technicalguidance']['technical_guidance.php'] = 'technical guidance;menuitems['news'] = new Object();
menuitems['contactus'] = new Object();
menuitems['contactus']['vacancies.php'] = 'VACANCIES;menuitems['contactus']['contactform.php'] = 'CONTACT FORM;menuitems['contactus']['regulatorycompanyinformation.php'] = 'REGULATORY COMPANY INFORMATION;menuitems['contactus']['locationmapdirections.php'] = 'LOCATION MAP & DIRECTIONS;menuitems['contactus']['findadistributor.php'] = 'FIND A DISTRIBUTOR;menuitems['contactus']['legals.php'] = 'Terms & Conditions of Sale;temp = "";
function prod_select(id){
img = document.getElementById("check"+id);
if(img.src.indexOf("check-off.gif") > 0){
img.src = img.src.replace("check-off.gif","check-on.gif");
document.prodform.elements["con"+id].value = "1";
}else{
img.src = img.src.replace("check-on.gif","check-off.gif");
document.prodform.elements["con"+id].value = "";
}
}
function show_sub_menu(menu,pos,o_right){
layer = document.getElementById('submenu');
layer.innerHTML = " ";
var menucolor = "";
for(items in menuitems[menu]){
if(items.indexOf("&") > 0){
apage = items.substr(0,items.indexOf("&"));
}else{
apage = items;
}
//alert(thispage+": "+apage);
if(thispage == apage){
menucolor = "style='color:#ff0000'";
}else{
menucolor = "";
}
if(layer.innerHTML == ""){
layer.innerHTML = ""+menuitems[menu][items]+"";
}else{
layer.innerHTML += " // "+menuitems[menu][items]+"";
}
}
if(o_right){
layer.style.right = pos+'px';
layer.style.left = "";
layer.style.textAlign = "right";
}else{
layer.style.left = pos+'px';
layer.style.right = "";
layer.style.textAlign = "left"; }
}
function clear_sub_menu(){
layer = document.getElementById('submenu');
layer.innerHTML = " ";
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i 0){
if(myelements[i].value != ""){
selected = true;
}
}
}
}
//flist = document.getElementById('f_list');
if(selected == false){
//if(flist.value == ""){
alert("You haven't selected any conduits");
return false;
//}else{
//return true;
//}
}else{
//alert("You haven't selected any conduits");
return true;
}
}
function add(formname,part,page,paction){
qtyel = document.getElementById(part+"qty");
var qty = qtyel.value;
if(qty == "" || isNaN(qty)){
alert("Please enter your quantity for this conduit");
}else{
document.forms[formname].action = page+"&paction="+paction;
document.forms[formname].submit();
}
}
function doscroll(coordinate){
window.scrollTo(0,coordinate);
}
function store_ycoord(){
ycoord = document.getElementById('ycoord');
if(ycoord){
var ScrollTop = document.body.scrollTop;
if (ScrollTop == 0) {
if (window.pageYOffset){
ScrollTop = window.pageYOffset;
}else{
ScrollTop = (document.body.parentElement) ? document.body.parentElement.scrollTop : 0;
}
}
ycoord.value = ScrollTop;
}
}
function closegraph(){
var graph = document.getElementById("graph2");
graph.style.display = "none";
}
function opengraph(){
var graph = document.getElementById("graph2");
graph.style.display = "block";
}
function select_system(sysid){
document.sel2.sub_select.value = sysid;
document.sel2.type.value = 'metallic'
document.sel2.submit();
}
function fitting_add(){
document.sel2.sub_select.value = '';
//document.sel2.type.value = 'nonmetallic'; removed as no logical sense adam
//alert(document.sel2.type.value);
document.sel2.submit();
}
function back_to_conduit(type,conduit){
document.sel2.action = "?page=selectionprocess.php&type="+type+"&selectedconduit="+conduit;
document.sel2.submit();
}
function accessory_add(parameters){
document.accessory.action = parameters;
var quantity = 0;
for(i=0;i -1){
if(document.accessory.elements[i].value != "" || document.accessory.elements[i].value.isNaN){
quantity = quantity + parseInt(document.accessory.elements[i].value);
}
}
}
if(quantity == 0){
alert("No accessory has been selected");
}else{
document.accessory.submit();
}
}
function contract_pack_add(pack_id){
thisselect = document.getElementById(pack_id+'conpackitem');
thisqty = document.getElementById(pack_id+'quantity');
if(thisqty.value == "" || thisqty.isNaN){
thisqty.value = "1";
}
document.conpacks.conpackid.value = thisselect.value;
document.conpacks.conpackqty.value = thisqty.value;
document.conpacks.submit();
}
function tool_add(url){
myEl = document.toolform.elements;
mygood = false;
for(i=0;i -1){
if(bElements[i].checked == false){
bElements[i].checked = true;
}else{
bElements[i].checked = false;
}
}
}
}
function viewbigimage(imagename,width,height){
window.open("content/bigimage.php?image="+imagename,"bigimage","width="+width+", height="+height);
}
function win_open(url){
window.open(url,"terms","width=600,height=600,scrollbars=yes");
}
function check_terms(){
if(document.checkout.terms.checked == false){
alert("You must agree to our terms and conditions before you can place your enquiry");
return false;
}else{
return true;
}
}
function quick_search(){
if(document.quicksearch.area.value != ""){
document.quicksearch.action = "?page=applicationguides.php&action=quicksearch";
document.quicksearch.submit();
}else if(document.quicksearch.chem1.value != ""){
document.quicksearch.action = "?page=chemicalresistance.php&action=chem";
document.quicksearch.submit();
}
}
function check_search(){
if(document.quicksearch.prodid.value != "product code" && document.quicksearch.prodid.value != ""){
document.quicksearch.action = "?page=search.php";
return true
}
return false;
}
function clear_searchtext(){
if(document.quicksearch.prodid.value == "product code"){
document.quicksearch.prodid.value = "";
}
}
function restore_searchtext(){
if(document.quicksearch.prodid.value == ""){
document.quicksearch.prodid.value = "product code";
}
}
// JavaScript Document