﻿






/* ====================================================
    insertAutoDropIT v1.0: auto-dropIT
    Copyright (c) 2007 Vvs data - http://www.vvsdata.se
    All rights reserved, may only be used by 
    Villeroy & Boch Gustavsberg AB
    Date last edited: 2008-03-05
==================================================== */
function insertAutoDropIT(productName, imageFile, xmlFile, threedsFile, dwgFile, ifcFile, productPage, w, h, pr, gr, v) {
    var appVersionName = navigator.appVersion;
    var index = appVersionName.indexOf("x64");
    if (index != -1 ){
                    c = "clsid:32290CD1-D585-4803-AF20-F16E20FF377A";
    } else {
                    c = "clsid:21E0CB95-1198-4945-A3D2-4BF804295F78";
    }
    var z = "<div class='content_category_cad'><div class='content_category_img_container'><table class='content_category_cad_image' cellpadding='0' cellspacing='0' border='0'><tr><td style='vertical-align: middle; text-align: center;'>";
    z = z + productName + "<br/>";
    z = z + "<OBJECT name=idrop classid=" + c + " width=" + w + " height=" + h + ">";    // START i-drop
    z = z + "<PARAM NAME=\"background\" VALUE=\"" + imageFile + "\">";
    z = z + "<PARAM NAME=\"proxyrect\" VALUE=\"" + pr + "\">";
    z = z + "<PARAM NAME=\"griprect\" VALUE=\"" + gr + "\">";
    z = z + "<PARAM NAME=\"package\" VALUE=\"" + xmlFile + "\">";
    z = z + "<PARAM NAME=\"validate\" VALUE=\"" + v + "\">";
    z = z + "<img src=\"" + imageFile + "\" width=\"" + w + "\" height=\"" + h + "\">";
    z = z + "</OBJECT>";    //END i-drop
    z = z + "<br/>Additional Downloads:<br/>";
    z = z + "<A href='" + threedsFile + "' title='Download 3DS Zip-file (3D studio)'>3DS</A> | ";
    z = z + "<A href='" + dwgFile + "' title='Download DWG Zip-file (AutoCAD)'>DWG</A>";
    if (ifcFile!="") z = z + " | <A href='" + ifcFile + "' title='Download IFC-file (Industry Foundation Classes)'><img src='images/ifc_icon.gif' width='16' height='16' border='0' alt='Download IFC-file (Industry Foundation Classes)' align='absmiddle'/></A>";
    if (productPage!="") z = z + "<br/><A href='" + productPage + "' title='View product information'>More information <img src='system_images/Gustavsberg_arrow.gif' width='11' height='11' border='0' alt='More information'/></A>";
    z = z + "</td></tr></table></div></div>";
    document.write(z);
}
