baseUrl = 'http://www.vinovisit.com'; aProps = new Array(); function addScript(src, id, txt, browser) { var oldE = document.createElement('script'); oldE.type = "text/javascript"; if(id){ oldE.id = id; } if(src){ oldE.src = src; } if(txt){ if(typeof oldE.text === 'string'){ oldE.text = txt; }else{ oldE.appendChild(document.createTextNode(txt)); } } if(browser == "ie"){ oldE.onreadystatechange = function() { if (/loaded|complete/.test(this.readyState)){ eval(this.innerHTML); } }; }else{ oldE.onload = function() { eval(this.innerHTML); }; } document.getElementsByTagName('head')[0].appendChild(oldE); } function addEl(type, props, parentID, parentTag, elParentNode) { var oldE = document.createElement(type); id= null; txt = null; if(props && props.length > 0){ for(i=0; i'); document.write(''); document.write(''); }, setHeight: function() { var widgetHeight = document.getElementById('vv-widgetWrapper'); }, widgetBox: function(widgetID, widgetField) { if(!baseUrl || (baseUrl == '')){ baseUrl = 'http://www.vinovisit.com'; } var mydomain= baseUrl; aSrc = ["/widget/assets/js/jquery-1.3.2.min.js", "/widget/assets/js/colorbox/jquery.colorbox-min.js"]; aID = ["jq-min", "cb-min"]; aText = ["", "boxInit('" + baseUrl + "', '" + widgetID + "', '" + widgetField + "');'"]; aProps.splice(0, aProps.length); aProps[0] = ["id", "cb-ss"]; aProps[1] = ["type", "text/css"]; aProps[2] = ["media", "screen"]; aProps[3] = ["rel", "stylesheet"]; aProps[4] = ["href", baseUrl + "/widget/assets/js/colorbox/colorbox.css"]; addEl("link", aProps, null, "head"); /*@cc_on @if (@_win32) addScript(baseUrl + aSrc[0], aID[0], "addScript('" + baseUrl + aSrc[1] + "', '" + aID[1] + "', " + "'boxInit(\"" + baseUrl + "\", \"" + widgetID + "\", \"" + widgetField + "\");'" + ", 'ie');", "ie"); @else @*/ /* for Safari */ if (/WebKit/i.test(navigator.userAgent)) { // sniff addScript(baseUrl + aSrc[0], aID[0], "addScript('" + baseUrl + aSrc[1] + "', '" + aID[1] + "', " + "'boxInit(\"" + baseUrl + "\", \"" + widgetID + "\", \"" + widgetField + "\");'" + ", 'safari');", 'safari'); }else{ for(k=0; k