// JavaScript Document - for ***** WineMarket.com.au onLoadReg.js *****
// Author : don mclean, onlineone
// Copyright: online one
//
// Script runs onload within the browser and detects the page on the check out and then does DOM manipulation
// based on the user/customer requirement.
// Put the script into NetSuite document library, then refer to it in the theme header
// and be sure to add an onload="onLoadReg();" call in the browser ..
// IE Issues....removing and then recreating a table row tr
// Creating the suburb drop down list
// main function
function onLoadReg()
{
// CONSTANTS
TEXT = '
We all face ups and downs within our own bodies from time to time. The low times are so much easier'+ ' to deal with when you have Simply Pharmacy on your side!
'+ 'As a full-service online pharmacy, we can also supply your regular prescription medication'+
' online.'+
'The process is simple:
'+
'
You\'ll also fill out a short medical history form for your online prescription supply - this allows'+ ' us to identify any drug interactions or health problems that may occur. The process is exactly as'+ ' it would be at a physical pharmacy.
'+ 'Simply Pharmacy online prescription delivery is fast, cheap and private.
'+ 'Make Simply Pharmacy your regular online prescription supplier and the health support you need'+ ' is even easier to get!
'+ 'Filling your medication prescriptions online at Simply Pharmacy lets you get the medicine you'+ ' need at great prices ... and get on with your healthy, happy life!
'; var title = document.title; var url = document.URL; var t = title.split(' '); var combo = t[0]+t[1]; var combo2 = t[0]+t[1]+t[2]+t[3]; //alert(combo2); if (combo == "PrescriptionsOnline") { var div1 = document.getElementById("div__body"); var table = div1.getElementsByTagName("table"); tr = table[20].insertRow(1); var cell0=tr.insertCell(0); cell0.innerHTML=TEXT; cell0.className ="smalltextnolink" cell0.align= "right"; } if (combo2 =="DiscountPharmacy&Chemists") { // get all tds var td = document.getElementsByTagName("td"); var text = document.getElementById("specials-text").innerHTML; var div_specials = document.getElementById("specials-text"); document.getElementById("specials-text").innerHTML = ""; var index =0; var found = false; for (i=0; i < td.length; i++) { var str = td[i].innerHTML; // find the one with the text 'Results" in it if (!found && str.search(/Results 1-/i) < 10) { index ++ } else { found = true; //alert('found' +i+' '+td[i].innerHTML); document.getElementById("specials-text").innerHTML = text; div_specials.style.display('block'); } } } if (combo2 == "PharmacyOnLine-") { // this is the home page so display the content at bottom } else { // } }