<!--
// This JavaScript is copyright (c) Dooman Productions Pty. Ltd. 2003
// **== Magpies Rule ==**

// FUNCTION drawProduct
//---------------------
//
function drawProduct(pmPosition,pmAnchor,pmProductName,pmPic,pmProductDesc,pmCodeDesc) {

var wstr = '';

if (pmPosition == 'left') {
   wstr += '<tr><td width=\"2%\">';
   wstr += createImageLink(pmAnchor,pmProductName,pmPic)+'<\/td>';
   wstr += '<td colspan=\"2\">'+pmProductDesc;
   wstr += '<\/td><\/tr>';
   wstr += '<tr><td class=\"sml\" colspan=\"3\">'+pmCodeDesc+'<\/td><\/tr>';
}
else {
   wstr +=  '<tr align=\"right\">';
   wstr += '<td width=\"98%\" align=\"right\" colspan=\"2\">'+pmProductDesc+'<\/td>';
   wstr += '<td width=\"2%\">' + createImageLink(pmAnchor,pmProductName,pmPic)+'<\/td><\/tr>';
   wstr += '<tr align=\"right\"><td class=\"smlr\" colspan=\"3\">'+pmCodeDesc+'<\/td><\/tr>';
}

document.write(wstr);

} // end of function drawProduct


// FUNCTION drawTwoProducts
//-------------------------
//
function drawTwoProducts(pmPosition,pmAnchor,pmProductName,pmPic1,pmPic2,pmProductDesc,pmCodeDesc) {

var wstr = '';

if (pmPosition == 'left') {

   wstr += '<tr><td width=\"2%\"><table cellspacing=\"0\" cellpadding=\"0\">';
   wstr += '<tr><td valign=\"middle\">'+createImageLink(pmAnchor,pmProductName,pmPic1)+'<\/td><\/tr>';
   wstr += '<tr><td><img src=\"../images/blank.gif\" width=\"100%\" height=\"5\"><\/td><\/tr>';
   wstr += '<tr><td valign=\"middle\">'+createImageLink(pmAnchor,pmProductName,pmPic2)+'<\/td><\/tr>';
   wstr += '<\/table><\/td>';
   wstr += '<td align=\"left\" valign=\"middle\" colspan=\"2\">'+pmProductDesc+'<\/td><\/tr>';
   wstr += '<tr><td class=\"smll\" colspan=\"3\">'+pmCodeDesc+'<\/td><\/tr>';

}
else {

   wstr += '<tr align=\"right\"><td width=\"98%\" align=\"right\" colspan=\"2\">'+pmProductDesc+'<\/td>';
   wstr += '<td width=\"2%\"><table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">';
   wstr += '<tr><td valign=\"middle\">'+createImageLink(pmAnchor,pmProductName,pmPic1)+'<\/td><\/tr>';
   wstr += '<tr><td><img src=\"../images/blank.gif\" width=\"100%\" height=\"5\"><\/td><\/tr>';
   wstr += '<tr><td valign=\"middle\">'+createImageLink(pmAnchor,pmProductName,pmPic2)+'<\/td><\/tr>';
   wstr += '<\/table><\/td><\/tr>';
   wstr += '<tr align=\"right\"><td class=\"smlr\" colspan=\"3\">'+pmCodeDesc+'<\/td><\/tr>';

}

document.write(wstr);

} // end of function drawThreeProducts


// FUNCTION drawThreeProducts
//---------------------------
//
function drawThreeProducts(pmPosition,pmAnchor,pmProductName,pmPic1,pmPic2,pmPic3,pmProductDesc,pmCodeDesc) {

var wstr = '';

if (pmPosition == 'left') {
//
//THIS LEFT CODE IS NOT COMPATIBLE WITH 3 PRODUCTS - STILL HAS TO BE WRITTEN 
//
   wstr += '<tr><td width=\"2%\">'+createImageLink(pmAnchor,pmProductName,pmPic)+'<\/td>';
   wstr += '<td colspan=\"2\">'+pmProductDesc+'<\/td><\/tr>';
   wstr += '<tr><td class=\"sml\" colspan=\"3\">'+pmCodeDesc+'<\/td><\/tr>';
}
else {
   wstr += '<tr align=\"right\"><td width=\"98%\" align=\"right\" colspan=\"2\">'+pmProductDesc+'<\/td>';
   wstr += '<td width=\"2%\">';

   wstr += '<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">';
   wstr += '<tr><td valign=\"middle\">'+createImageLink(pmAnchor,pmProductName,pmPic1)+'<\/td>';
   wstr += '<td width=\"5\" nowrap><img src=\"../images/blank.gif\" width=\"5\" height=\"100%\"><\/td>';
   wstr += '<td><table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">';
   wstr += '<tr><td>'+createImageLink(pmAnchor,pmProductName,pmPic2)+'<\/td><\/tr>';
   wstr += '<tr><td><img src=\"../images/blank.gif\" width=\"100%\" height=\"5\"><\/td><\/tr>';
   wstr += '<tr><td>'+createImageLink(pmAnchor,pmProductName,pmPic3)+'<\/td><\/tr>';
   wstr += '<\/table><\/td><\/tr><\/table><\/td><\/tr>';

   wstr += '<tr align=\"right\"><td class=\"smlr\" colspan=\"3\">'+pmCodeDesc+'<\/td><\/tr>';
}

document.write(wstr);

} // end of function drawThreeProducts


// FUNCTION createImageLink
//-------------------------
//
function createImageLink(pmAnchor,pmProductName,pmPic) {

var wstr = '';
var picHeight = 200;
var picWidth  = 200;
var imageText = 'Click here for an enlargement of the ';

var hrefLink  = "\"this.href='javascript:popupWindow(/"+pmPic+"/,/"+pmProductName+"/)'\"";

wstr += '<a id=\"'+pmAnchor+'\" name=\"'+pmAnchor+'\" href=\"default.html\" onClick='+hrefLink+'>';
wstr += ' <img class=\"imgproduct\" src=\"../images/'+pmPic+'\" width=\"'+picWidth+'\" height=\"'+picHeight+'\"';
wstr += '  alt="'+imageText+pmProductName+'"';
wstr += "  onMouseover=\"window.status='"+pmProductName+"'; return true\" ";
wstr += "  onMouseout=\"window.status=''\" /><\/a>";

return wstr;

} // end of function createImageLink

// -->

