function check_the_notice(first_name,surname,email) { if(first_name=="") { alert('Please enter your first name.'); } else if(surname=="") { alert('Please enter your surname.'); } else if(email=="") { alert('Please enter your Email address.'); } else if(email.indexOf("@")==-1) { alert('Please enter your Email address.'); } else { document.thisone.submit(); } } function popUpgrg(URL) { window.open(URL, 'opopo', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=320,height=500'); } function ignoreSpaces(string) { var temp = ""; string = '' + string; splitstring = string.split(" "); for(i = 0; i < splitstring.length; i++) temp += splitstring[i]; return temp; } function scroll_to(obj){ /* use
*/ curtop = obj.offsetTop; while (obj = obj.offsetParent) { curtop += obj.offsetTop; } for (var x = document.body.scrollTop; x <= curtop; x++) { scroll(0,x); } } // JavaScript Document var toplevel = 100; function zoom(productID){ document.getElementById('imagezoom'+productID).style.visibility = 'visible';document.getElementById('imagezoom'+productID).style.zIndex = toplevel;toplevel++; } function unzoom(productID){ document.getElementById('imagezoom'+productID).style.visibility = 'hidden'; } ////////////////////////////////////////////////////////////////////////////////// V12 Variable Live Deposit Calc /* function recalc_the_finance(scheme,chosen_deposit,cash_price){ if(scheme=="36") { var factor=0.0363; } else if(scheme=="48") { var factor=0.02953; } else // the BNPL factor for the 9 month scheme { var factor=0.04574; } var monthly_ppi=0; // we do not offer payment protection using 0 here. var balance_before_charges=(cash_price-chosen_deposit); var bob=balance_before_charges*factor; var monthly_installment=Math.round(bob*100)/100; var balance_payable=monthly_installment*scheme; var amount_payable=Math.round((balance_payable+chosen_deposit)*100)/100; var charge_for_credit=Math.round((amount_payable-cash_price)*100)/100; var credit_amount=Math.round((cash_price-chosen_deposit)*100)/100; document.cc_check.credit_amount.value="�"+credit_amount; document.cc_check.monthly_installment.value="�"+monthly_installment; //document.cc_check.charge_for_credit.value="�"+charge_for_credit; document.cc_check.amount_payable.value="�"+amount_payable; var tenpc=(cash_price/100)*10; if(chosen_deposit
"
} else {
document.getElementById(plusminuscategoryIDd).innerHTML = "
"
}
}
function show(id)
{
if (document.getElementById(id))
{
document.getElementById(id).style.display = 'block';
}
}
function hide(id)
{
if (document.getElementById(id))
{
document.getElementById(id).style.display = 'none';
}
}
///////////////////////////////////////////////////////////////////////////////////// VARIOUS POPUPS
function apply_now(url) {
window.open(url,"jobpop",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=no,width=570,height=570');
}
function pop_support(){
window.open("http://www.creativevideo.co.uk/public/ajax_chat/","chat_window",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=no,width=462,height=360');
}
function open_window(url) {
window.open(url,"MyWind",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=no,width=680,height=600');
}
function open_alt(url) {
window.open(url,"ALT",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=no,width=420,height=600');
}
function open_admin_chat(url) {
window.open(url,"MyWin",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=no,width=700,height=500');
}
function popcustomer(url) {
window.open(url,"customerdetails",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=no,width=455,height=530');
}
function popvatvi(url) {
window.open(url,"vatty",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=no,width=285,height=250');
}
function poprequest(url) {
window.open(url,"request",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=no,width=200,height=75');
}
function popversions(url) {
window.open(url,"request",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=no,width=644,height=400');
}
function open_admin_package_items(url) {
window.open(url,"MyWin",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=no,width=620,height=600');
}
function open_popup_travel_rail(url) {
window.open(url,"rail",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=no,width=660,height=275');
}
function open_popup_travel_road(url) {
window.open(url,"road",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=no,width=660,height=350');
}
function open_popup_travel_bus(url) {
window.open(url,"bus",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=no,width=660,height=375');
}
function open_popup_travel_air(url) {
window.open(url,"air",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=no,width=660,height=215');
}
function open_popup_cvp_map(url) {
window.open(url,"map",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=no,width=540,height=330');
}
function open_secure(url) {
window.open(url,"Secure",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=no,width=520,height=500');
}
//////////////////////////////////////////////////////////////////////////////////////////////////////// SORT BAR CAT JS
function formHandler(form){
var URL = document.form.listorder.options[document.form.listorder.selectedIndex].value;
window.location.href = URL;
}
function formHandler2(form2){
var URL = document.form2.listorder2.options[document.form2.listorder2.selectedIndex].value;
window.location.href = URL;
}
function formHandler3(form3){
var URL = document.form3.listorder3.options[document.form3.listorder3.selectedIndex].value;
window.location.href = URL;
}
////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////// IF SCRIPTS DIE BLAME ME/DELETE PART BELOW WHICH IS ENCLOSED IN COMMENT LINES - RYAN ////////////////////////////////////
var xOffset = 0;
var yOffset = 0;
function showPopup (targetObjectId, eventObj) {
if(eventObj) {
// hide any currently-visible popups
hideCurrentPopup();
// stop event from bubbling up any farther
eventObj.cancelBubble = true;
var newXCoordinate = eventObj.clientX - 200 + ((document.body.scrollLeft)?document.body.scrollLeft:0) + xOffset;
var newYCoordinate = eventObj.clientY - 109 + ((document.body.scrollTop)?document.body.scrollTop:0) + yOffset;
moveObject(targetObjectId, newXCoordinate, newYCoordinate);
// and make it visible
if( changeObjectVisibility(targetObjectId, 'visible') ) {
// if we successfully showed the popup
// store its Id on a globally-accessible object
window.currentlyVisiblePopup = targetObjectId;
return true;
} else {
// we couldn't show the popup, boo hoo!
return false;
}
} else {
// there was no event object, so we won't be able to position anything, so give up
return false;
}
} // showPopup
function hideCurrentPopup() {
// note: we've stored the currently-visible popup on the global object window.currentlyVisiblePopup
if(window.currentlyVisiblePopup) {
changeObjectVisibility(window.currentlyVisiblePopup, 'hidden');
window.currentlyVisiblePopup = false;
}
} // hideCurrentPopup
// ***********************
// hacks and workarounds *
// ***********************
// initialize hacks whenever the page loads
// setup an event handler to hide popups for generic clicks on the document
document.onclick = hideCurrentPopup;
function show_small_basket() {
req.open('get', 'basket_functions_ajax.php?do=show_small_basket', true);
//req2.open('get', 'basket2.php');
req.onreadystatechange = handleResponse;
req.send(null);
// setTimeout('show_small_quotation()',2000);
if (debugmode == 'yes') {alert('showing small basket');}
}
//////////////////////////////////////////////////////////////////////////////////////////////////////// REGISTER
var title2 = "";
var first_name2 = "";
var surname2 = "";
var email2 = "";
var phone2 = "";
var mobile2 = "";
var fax2 = "";
var website2 = "";
var organisation2 = "";
var address12 = "";
var address22 = "";
var address32 = "";
var address42 = "";
var town2 = "";
var county2 = "";
var postcode2 = "";
var country2 = "";
var username2 = "";
var password2 = "";
var source2 = "";
var secure_check2 = "";
var form = "";
var buka = "";
function madetomeasure(buka) {
var form = "";
document.copyit.title2.value = document.contactDetails.title.value;
document.copyit.first_name2.value = document.contactDetails.first_name.value;
document.copyit.surname2.value = document.contactDetails.surname.value;
document.copyit.email2.value = document.contactDetails.email.value;
document.copyit.username2.value = document.contactDetails.email.value;
document.copyit.password2.value = document.contactDetails.password.value;
document.copyit.phone2.value = document.contactDetails.phone.value;
document.copyit.mobile2.value = document.contactDetails.mobile.value;
document.copyit.fax2.value = document.contactDetails.fax.value;
document.copyit.website2.value = document.contactDetails.website.value;
document.copyit.organisation2.value = document.contactDetails.organisation.value;
document.copyit.address12.value = document.contactDetails.address1.value;
document.copyit.address22.value = document.contactDetails.address2.value;
document.copyit.address32.value = document.contactDetails.address3.value;
document.copyit.address42.value = document.contactDetails.address4.value;
document.copyit.town2.value = document.contactDetails.town.value;
document.copyit.county2.value = document.contactDetails.county.value;
document.copyit.postcode2.value = document.contactDetails.postcode.value;
document.copyit.source2.value = document.contactDetails.source.value;
document.copyit.country2.value = document.contactDetails.country.value;
document.copyit.secure_check2.value = document.contactDetails.secure_check.value;
document.copyit.submit();
}
function switch_tabs(taba,lista){
var contentDiv = document.getElementById(lista);
var allContainedElements = contentDiv.getElementsByTagName("a");
for (var i = 0; i < allContainedElements.length; i++) {
var elem = allContainedElements[i];
elem.className = "";
//alert(elem);
}
document.getElementById(taba).className = "current";
}
function riseupvi (box,taba) {
//alert(box + taba);
/*
iState = 0;
document.getElementById('menucontainer').style.zIndex = toplevel +1;
divheight = document.getElementById(box).offsetHeight;
document.getElementById('walek').style.height = divheight +10;*/
var contentDiv = document.getElementById('box_keeper');
var allContainedElements = contentDiv.getElementsByTagName("div");
for (var i = 0; i < allContainedElements.length; i++) {
var elem = allContainedElements[i];
if (elem.className =="boxstyle1"){
elem.style.display = "none";
}
}
document.getElementById(box).style.display = "block";
switch_tabs(taba,'navigationcvp');
}
function switch_versions(button){
var elementList = document.getElementsByClassName("vbutton");
for (var i = 0; i < elementList.length; i++) {
var elem = elementList[i];
elem.className = "vbutton_dis";
elem.firstChild.innerHTML = "Select version";
elem.firstChild.style.color = "#999999";
//alert(elem);
}
document.getElementById(button).className = "vbutton";
var contentDiv = document.getElementById(button);
var allContainedElements = contentDiv.getElementsByTagName("a");
for (var i = 0; i < allContainedElements.length; i++) {
var insideElem = allContainedElements[i]
insideElem.innerHTML = "Selected";
insideElem.style.color = "#333333"
}
document.getElementById('promotext').innerHTML = "Remember that all of our stock is genuine.";
}
function pop_send_video_friend(videoID)
{
window.open('http://www.mitcorp.com/public/video_send_friend.php?vID='+videoID, 'video_send_friend', "toolbar=no, height=259, width=350, top=200, left=200");
}
function pop_comment_video(videoID)
{
window.open('http://www.mitcorp.com/public/video_comment.php?vID='+videoID, 'video_comment', "toolbar=no, height=400, width=350, top=200, left=200");
}