var dragresize = new DragResize('dragresize', { minWidth: 50, minHeight: 50, minLeft: -600, minTop: 0, maxLeft: 1600, maxTop: 900 }); dragresize.isElement = function(elm) { if (elm.className && elm.className.indexOf('drsElement') > -1) return true; }; dragresize.isHandle = function(elm) { if (elm.className && elm.className.indexOf('drsMoveHandle') > -1) return true; }; //window.scrollbars.visible = true; // You can define optional functions that are called as elements are dragged/resized. // Some are passed true if the source event was a resize, or false if it's a drag. // The focus/blur events are called as handles are added/removed from an object, // and the others are called as users drag, move and release the object's handles. // You might use these to examine the properties of the DragResize object to sync // other page elements, etc. dragresize.ondragfocus = function() { }; dragresize.ondragstart = function(isResize) { }; dragresize.ondragmove = function(isResize) { }; dragresize.ondragend = function(isResize) { }; dragresize.ondragblur = function() { }; // Finally, you must apply() your DragResize object to a DOM node; all children of this // node will then be made draggable. Here, I'm applying to the entire document. dragresize.apply(document); //]]> var xmlhttp1 = false; try { xmlhttp1 = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp1 = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp1 = false; } } if (!xmlhttp1 && typeof XMLHttpRequest != 'undefined') { xmlhttp1 = new XMLHttpRequest(); } var xmlhttp2 = false; try { xmlhttp2 = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp2 = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp2 = false; } } if (!xmlhttp2 && typeof XMLHttpRequest != 'undefined') { xmlhttp2 = new XMLHttpRequest(); } function makerequests(left, center) { var centerDiv = document.getElementById('content_right'); var leftDiv = document.getElementById('content'); leftDiv.style.backgroundColor = '#FFFFFF'; xmlhttp1.open("GET", center); xmlhttp2.open("GET", left); xmlhttp1.onreadystatechange = function() { if (xmlhttp1.readyState == 1) { centerDiv.innerHTML = "
loading
"; } else if (xmlhttp1.readyState == 4 && xmlhttp1.status == 200) { centerDiv.innerHTML = xmlhttp1.responseText; } } xmlhttp1.send(null); xmlhttp2.onreadystatechange = function() { if (xmlhttp2.readyState == 1) { leftDiv.innerHTML = "
loading
"; } else if (xmlhttp2.readyState == 4 && xmlhttp2.status == 200) { leftDiv.innerHTML = xmlhttp2.responseText; } } xmlhttp2.send(null); } function makerequest(serverPage, objID) { var obj = document.getElementById(objID); document.getElementById('content').style.backgroundColor = '#FFFFFF'; xmlhttp1.open("GET", serverPage); xmlhttp1.onreadystatechange = function() { if (xmlhttp1.readyState == 1) { obj.innerHTML = "
loading
"; } else if (xmlhttp1.readyState == 4 && xmlhttp1.status == 200) { obj.innerHTML = xmlhttp1.responseText; //obj.innerHTML = 'asdf'; } } xmlhttp1.send(null); } function submitContactForm() { var name = document.online_booking_request_form.name.value; var surname = document.online_booking_request_form.surname.value; var company = document.online_booking_request_form.company.value; var email = document.online_booking_request_form.email.value; var tel = document.online_booking_request_form.tel1.value; var address1 = document.online_booking_request_form.address1.value; var address2 = document.online_booking_request_form.address2.value; var comments = document.online_booking_request_form.comments.value; var alert_message = 'Please enter a valid '; var err = 0; if(name.length < 2) { err++; alert_message += '[Name]'; } else { alert_message += ''; } if(surname.length < 2) { err++; alert_message += '[Surname]'; } else { alert_message += ''; } if(company.length < 2) { err++; alert_message += '[Company]'; } else { alert_message += ''; } if(email.length < 6) { err++; alert_message += '[Email Address]'; } else { alert_message += ''; } if(isNaN(tel)) { err++; alert_message += '[Contact Number (eg. +44115651234]'; } else { alert_message += ''; } if(comments.length < 5) { err++; alert_message += '[Comments]'; } else { alert_message += ''; } if(address1.length < 5) { err++; alert_message += '[Address]'; } else { alert_message += ''; } var str = ""; str += "?name=" + name; str += "&surname=" + surname; str += "&company=" + company; str += "&emailaddress=" + email; str += "&tel=" + tel; str += "&comments=" + comments; str += "&address1=" + address1; str += "&address2=" + address2; str += "&code=" + "bc178987"; var obj = document.getElementById('response'); if(err > 0) { obj.innerHTML = "
" + alert_message + "
"; } else { xmlhttp1.open("GET", "/content/email_submit.php" + str); xmlhttp1.onreadystatechange = function() { if (xmlhttp1.readyState == 1) { obj.innerHTML = "Sending Request..."; } else if (xmlhttp1.readyState == 4 && xmlhttp1.status == 200) { obj.innerHTML = xmlhttp1.responseText; } } xmlhttp1.send(null); } } function submitDownloadForm() { var name = document.online_booking_request_form.name.value; var surname = document.online_booking_request_form.surname.value; var company = document.online_booking_request_form.company.value; var email = document.online_booking_request_form.email.value; var file = document.online_booking_request_form.file.value; var alert_message = 'Please enter a valid '; var err = 0; if(name.length < 2) { err++; alert_message += '[Name]'; } else { alert_message += ''; } if(surname.length < 2) { err++; alert_message += '[Surname]'; } else { alert_message += ''; } if(company.length < 2) { err++; alert_message += '[Company]'; } else { alert_message += ''; } if(email.length < 6) { err++; alert_message += '[Email Address]'; } else { alert_message += ''; } var str = ""; str += "?name=" + name; str += "&surname=" + surname; str += "&company=" + company; str += "&emailaddress=" + email; str += "&code=" + "bc178987"; str += "&file=" + file; var obj = document.getElementById('response'); if(err > 0) { obj.innerHTML = "
" + alert_message + "
"; } else { xmlhttp1.open("GET", "/content/download_submit.php" + str); xmlhttp1.onreadystatechange = function() { if (xmlhttp1.readyState == 1) { obj.innerHTML = "Sending Request..."; } else if (xmlhttp1.readyState == 4 && xmlhttp1.status == 200) { obj.innerHTML = xmlhttp1.responseText; } } xmlhttp1.send(null); } } function getMap() { if (GBrowserIsCompatible()) { document.getElementById('map').style.display = ''; var map = new GMap2(document.getElementById("map")); map.addControl(new GLargeMapControl()); map.addControl(new GMapTypeControl()); map.setCenter(new GLatLng(-34.003577, 25.652024), 11); var point = new GLatLng(-34.003577, 25.652024); var marker = new GMarker(point); map.addOverlay(marker); marker.openInfoWindowHtml(''); document.getElementById('showMap').style.display = 'none'; document.getElementById('hideMap').style.display = ''; } } function hideMap() { //if (GBrowserIsCompatible()) { document.getElementById('map').style.display = 'none'; //var map = new GMap2(document.getElementById("map")); //map.setCenter(new GLatLng(-33.976962, 25.372195), 11); document.getElementById('showMap').style.display = ''; document.getElementById('hideMap').style.display = 'none'; //} } function newImage( imgSrc ){ var imgName = new Image(); imgName.src = imgSrc; return imgName; } function change( imgName, imgLocation ) { document[imgName].src = imgLocation ; } var preloadFlag = false; function loadImages() { if (document.images) { //****Edit this list to include rollover state images **** //****Example: aboutus_over = newImage( "images/aboutus-over.gif" ); home = newImage("images/slide_01.gif"); home_over = newImage("images/slide_02.gif"); home_over = newImage("images/slide_03.gif"); home_over = newImage("images/slide_04.gif"); home_over = newImage("images/slide_05.gif"); home_over = newImage("images/slide_06.gif"); preloadFlag = true; } } function addItem (type) { document.getElementById('blur').style.display = ''; document.getElementById('float').style.display = ''; makerequest('admin/add_post_input.php', 'float_content'); } function closeInputBox() { document.getElementById('float').style.display='none'; document.getElementById('blur').style.display='none'; } function saveRecord() { var heading = document.form1.heading.value; var text = document.form1.text.value; var label = document.form1.label.value; var alert_message = 'Please enter a valid '; var err = 0; if(heading.length < 2) { err++; alert_message += '[Heading]'; } else { alert_message += ''; } if(text.length < 3) { err++; alert_message += '[Text]'; } else { alert_message += ''; } if(label == 'undefined') { err++; alert_message += '[Type]'; } else { alert_message += ''; } var str = ""; str += "?heading=" + heading; str += "&text=" + text; str += "&label=" + label; var obj = document.getElementById('float_content'); if(err > 0) { obj.innerHTML = "
" + alert_message + "
"; } else { xmlhttp1.open("GET", "admin/add_post.php" + str); xmlhttp1.onreadystatechange = function() { if (xmlhttp1.readyState == 1) { obj.innerHTML = "Sending Request..."; } else if (xmlhttp1.readyState == 4 && xmlhttp1.status == 200) { obj.innerHTML = xmlhttp1.responseText; } } xmlhttp1.send(null); } } function setMenu(menu) { var obj = document.getElementById('slide_bar'); var title = "BPSE Consulting - "; switch (menu) { case 'home': //obj.style.background = "url(images/home_bar.gif)"; document.title = title + "Business Process Strategy and Execution"; break; case 'services': //obj.style.background = "url(images/services_bar.gif)"; document.title = title + "Services"; break; case 'solutions': //obj.style.background = "url(images/solutions_bar.gif)"; document.title = title + "Solutions"; break; case 'products': //obj.style.background = "url(images/products_bar.gif)"; document.title = title + "Products"; break; case 'partners': //obj.style.background = "url(images/products_bar.gif)"; document.title = title + "Partners"; break; case 'about': //obj.style.background = "url(images/about_bar.gif)"; document.title = title + "About"; break; case 'contact': //obj.style.background = "url(images/contact_bar.gif)"; document.title = title + "Contact us"; break; case 'none': obj.style.background = "url(images/blank_bar.gif)"; document.title = title + "Posts"; break; default: //obj.style.background = "url(images/home_bar.gif)"; document.title = title + "Business Process Strategy and Execution"; } } function scrollToDiv(divid) { var divs = document.getElementsByTagName('div'); for (var i = 0; i < divs.length; i++) { var div = divs[i]; if (!isNaN(div.id) && div.id != '' && div.id != 0 && div.id != '0') { //div.style.backgroundColor = '#6BA6C7'; } } document.getElementById(divid).scrollIntoView(true); //var col1 = "#8AB9D2"; //var col2 = "#6BA6C7"; var col1 = "#8AB9D2"; var col2 = "#FFFFFF"; col = col1; var x = 0; timer = setInterval ( function flipColor() { document.getElementById(divid).style.backgroundColor = col; if(col == col1) { col = col2; } else { col = col1; } x++; if(x > 5) { clearInterval(timer); } }, 400 ); } function backToTop() { document.getElementById('top').scrollIntoView(true); } function moreLess(div, more_less) { obj1 = document.getElementById(more_less); obj2 = document.getElementById(div); if(obj1.style.display == '') { obj1.style.display = 'none'; obj2.className = 'more'; } else { obj1.style.display = ''; obj2.className = 'less'; } }