JVC Everio GZMC500 5 MP 3 CCD 4GB Microdrive Camcorder
| JVC Everio GZMC500 5 MP 3 CCD 4GB Microdrive Camcorder… |
Still images or video–capture either 60 minutes of DVD-quality MPEG-2 movies or thousands of super-high resolution UXGA-size JPEG pictures with the Everio–the first camera to use Microdrive technology. The included 4GB Microdrive card, though it is the same size as Compact Flash card, has such unprecedented capacity because it is has its own built-in HDD (hard disk drive).

A few anything-but-bland brands - salencoupon » Blog Archive » Sony DCR-SR100 3MP 30GB HDD Handycam Camcorder said,
January 31, 2006 @ 1:50 pm
[...] Related: JVC Everio GZMC500 5 MP 3 CCD 4GB Microdrive Camcorder var TaggingOptions = {}; TaggingOptions.suggestionUrl = “/gp/tagging/actions/suggest/002-1444896-8396059″; TaggingOptions.replaceUrl = “/gp/tagging/actions/replace/002-1444896-8396059″; TaggingOptions.tagObjectUrl = “/gp/tagging/actions/tagObject/002-1444896-8396059″; TaggingOptions.usage= “usage”; TaggingOptions.usages = “usages”; TaggingOptions.removeTitle = “remove tag”; TaggingOptions.removeImgUrl = “http://ec1.images-amazon.com/images/G/01/x-locale/communities/tags/x-sm.gif”; TaggingOptions.tagUrl1 = “/gp/tagging/glance/”; TaggingOptions.tagUrl2 = “/A247G1OAK5YP3L/002-1444896-8396059?ref=cm_tag_tdp”; TaggingUtils = {}; //======================= test based on browser type ======================= TaggingUtils.sUserAgent = navigator.userAgent; TaggingUtils.fAppVersion = parseFloat(navigator.appVersion); TaggingUtils.isOpera = TaggingUtils.sUserAgent.indexOf(”Opera”) > -1; TaggingUtils.isIE = TaggingUtils.sUserAgent.indexOf(”compatible”) > -1 && TaggingUtils.sUserAgent.indexOf(”MSIE”) > -1 && !TaggingUtils.isOpera; TaggingUtils.isMinIE4 = TaggingUtils.isMinIE5 = TaggingUtils.isMinIE5_5 = TaggingUtils.isMinIE6 = false; if (TaggingUtils.isIE) { var reIE = new RegExp(”MSIE (\d+\.\d+);”); reIE.test(TaggingUtils.sUserAgent); var fIEVersion = parseFloat(RegExp[”$1″]); TaggingUtils.isMinIE4 = fIEVersion >= 4; TaggingUtils.isMinIE5 = fIEVersion >= 5; TaggingUtils.isMinIE5_5 = fIEVersion >= 5.5; TaggingUtils.isMinIE6 = fIEVersion >= 6.0; } if (TaggingUtils.isOpera) { var fOperaVersion; if (navigator.appName == “Opera”) { fOperaVersion = TaggingUtils.fAppVersion; } else { var reOperaVersion = new RegExp(”Opera (\d+\.\d+)”); reOperaVersion.test(TaggingUtils.sUserAgent); fOperaVersion = parseFloat(RegExp[”$1″]); } TaggingUtils.isMinOpera4 = fOperaVersion >= 4; TaggingUtils.isMinOpera5 = fOperaVersion >= 5; TaggingUtils.isMinOpera6 = fOperaVersion >= 6; TaggingUtils.isMinOpera7 = fOperaVersion >= 7; TaggingUtils.isMinOpera7_5 = fOperaVersion >= 7.5; TaggingUtils.isMinOpera8 = fOperaVersion >= 8; } TaggingUtils.getPageLeft = function(element) { element = $(element); if (!element) return 0; var x = 0; while (element) { if (element.offsetLeft) x += element.offsetLeft; element = element.offsetParent ? element.offsetParent : null; } return x; } TaggingUtils.getPageTop = function(element) { element = $(element); if (!element) return 0; var y = 0; while (element) { if (element.offsetTop) y += element.offsetTop; element = element.offsetParent ? element.offsetParent : null; } return y; } TaggingUtils.getScrollTop = function() { return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0; } TaggingUtils.getScrollLeft = function() { return window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0; } TaggingUtils.observe = function(element, name, observer, useCapture) { element = $(element); useCapture = useCapture || false; if (element.addEventListener) { element.addEventListener(name, observer, useCapture); } else if (element.attachEvent) { element.attachEvent(’on’ + name, observer); } } TaggingUtils.stopObserving = function(element, name, observer, useCapture) { element = $(element); useCapture = useCapture || false; if (element.removeEventListener) { element.removeEventListener(name, observer, useCapture); } else if (element.detachEvent) { element.detachEvent(’on’ + name, observer); } } TaggingUtils.remove = function(element) { element = $(element); element.parentNode.removeChild(element); } TaggingUtils.replace = function(node, newNode) { node = $(node); newNode = $(newNode); var parent = node.parentNode; parent.replaceChild(newNode, node); } TaggingUtils.getParent = function (node, type) { node = $(node); if(!node) return null; var parent = node.parentNode; if(type) type = type.toLowerCase(); while(parent && type && parent.nodeName.toLowerCase() != type){ parent = parent.parentNode; } return parent; } TaggingUtils.getParent = function (node, type) { node = $(node); if(!node) return null; var parent = node.parentNode; if(type) type = type.toLowerCase(); while(parent && type && parent.nodeName.toLowerCase() != type){ parent = parent.parentNode; } return parent; } TaggingUtils.firstChild = function(element, type, name) { var elem = $(element).firstChild; if (name) { name = name.toUpperCase(); } if (type && type != 1) { while (elem && elem.nodeType != type) { elem = elem.nextSibling; } } else { if (name) { while (elem && (elem.nodeType != 1 || (elem.nodeType == 1 && elem.nodeName.toUpperCase() != name))) { elem = elem.nextSibling; } } else { while (elem && elem.nodeType != 1) { elem = elem.nextSibling; } } } return elem; } TaggingUtils.nextSibling = function(element, type, name) { var elem = $(element).nextSibling; if (name) { name = name.toUpperCase(); } if (type && type != 1) { while (elem && elem.nodeType != type) { elem = elem.nextSibling; } } else { if (name) { while (elem && (elem.nodeType != 1 || (elem.nodeType == 1 && elem.nodeName.toUpperCase() != name))) { elem = elem.nextSibling; } } else { while (elem && elem.nodeType != 1) { elem = elem.nextSibling; } } } return elem; } TaggingUtils.prevSibling = function(element, type, name) { var elem = $(element).previousSibling; if (name) { name = name.toUpperCase(); } if (type && type != 1) { while (elem && elem.nodeType != type) { elem = elem.previousSibling; } } else { if (name) { while (elem && (elem.nodeType != 1 || (elem.nodeType == 1 && elem.nodeName.toUpperCase() != name))) { elem = elem.previousSibling; } } else { while (elem && elem.nodeType != 1) { elem = elem.previousSibling; } } } return elem; } TaggingUtils.getParentIndex = function (node) { var childNodes = node.parentNode.childNodes; var index = 0; for (var i = 0; i < childNodes.length; i++) { if (childNodes[i] == node) { return index; } if (childNodes[i].nodeType == 1) { index++; } } return -1; } TaggingUtils.swapNode = function (node1, node2) { if (node1.swapNode) { node1.swapNode(node2); } else { var nextSibling1 = node1.nextSibling; var nextSibling2 = node2.nextSibling; var parentNode1 = node1.parentNode; parentNode1.removeChild(node1, true); var parentNode2 = node2.parentNode; parentNode2.removeChild(node2, true); parentNode1.insertBefore(node2, nextSibling1); parentNode2.insertBefore(node1, nextSibling2); } } TaggingUtils.findNodes = function (parent, tagName, attrName) { var tags = parent.getElementsByTagName(tagName); if (attrName) { var result = new Array(); for (var i = 0; i < tags.length; i++) { if (tags[i].getAttribute(attrName)) { result.push(tags[i]); } } return result; } else { return tags; } } TaggingUtils.copyObject = function(destination, source) { for (property in source) { destination[property] = source[property]; } return destination; } TaggingUtils.bind = function(fct, object) { var __method = fct; return function() { __method.apply(object, arguments); } } TaggingUtils.bindAsEventListener = function(fct, object) { var __method = fct; return function(event) { return __method.apply(object, [event || window.event]); } } TaggingUtils.getEventPageX = function(evt) { if (evt.pageX) { return evt.pageX; } else if (evt.clientX) { return evt.clientX + TaggingUtils.getScrollLeft(); } return 0; } TaggingUtils.getEventPageY = function(evt) { if (evt.pageY) { return evt.pageY; } else if (evt.clientY) { return evt.clientY + TaggingUtils.getScrollTop(); } return 0; } TaggingUtils.isLeftClick = function(evt) { return ((evt.which) && (evt.which == 1)) || ((evt.button) && (evt.button == 1)); } TaggingUtils.getEventKeyCode = function(evt) { if (evt.keyCode) { return evt.keyCode; } else if (evt.charCode) { return evt.charCode; } else if (evt.which) { return evt.which; } } TaggingUtils.stopEvent = function(event) { if (event.preventDefault) { event.preventDefault(); event.stopPropagation(); } else { event.cancelBubble = true; event.returnValue = false; } } TaggingUtils.trim = function(str) { // strip leading var s = str.replace(/^s+/g, “”); // strip trailing return s.replace(/s+$/g, “”); } function $() { var elements = new Array(); for (var i = 0; i < arguments.length; i++) { var element = arguments[i]; if (typeof element == ’string’) element = document.getElementById(element); if (arguments.length == 1) return element; elements.push(element); } return elements; } TaggingUtils.isInArray = function(arr, value) { if (!arr || !value) return false; for (i = 0; i < arr.length; i++) { if (arr[i] == value) { return true; } } return false; } function emptyFunction() { } //////////////////////////////////////////////////////////////////////////// // // // general functions // // // //////////////////////////////////////////////////////////////////////////// function TaggingInputKeyDown(evt) { var key = TaggingUtils.getEventKeyCode(evt); //ECLogger.eraseLog(); //ECLogger.info(”key ” + evt.type + “=” + key + ” ” + String.fromCharCode(key)); if (evt.shiftKey && key == 45) {//catch shift+insert TaggingUtils.stopEvent(evt); } if (evt.ctrlKey && (key == 118 || key == 86)) {//catch ctrl+v TaggingUtils.stopEvent(evt); } // prevent submision if input is in a form if (key == 13) { TaggingUtils.stopEvent(evt); } if (!document.all) { if ((key == 46 || key == 8 || key == 9 || key == 37 || key == 39 || key == 35 || key == 36)) { window.taggingAllowKey = true; } } } function TaggingInputKeyPress(evt) { var key = TaggingUtils.getEventKeyCode(evt); //ECLogger.info(”key ” + evt.type + “=” + key + ” ” + String.fromCharCode(key)); if (!document.all) { if (window.taggingAllowKey) { window.taggingAllowKey = false; return; } } if (evt.shiftKey && key == 45) {//catch shift+insert TaggingUtils.stopEvent(evt); } if (evt.ctrlKey && (key == 118 || key == 86)) {//catch ctrl+v TaggingUtils.stopEvent(evt); } // prevent submision if input is in a form if (key == 13) { TaggingUtils.stopEvent(evt); } if (!(key == 32 || key == 45 || key == 8 || (48 0 && suggestions.length > 0) { suggestions.reverse(); var s = suggestions.pop(); for (i = 0; i < this.suggestionsByPopularity.length; i++) { if (this.suggestionsByPopularity[i].popularity 0) { var sTable = document.createElement(”table”); sTable.cellSpacing = ‘0px’; sTable.cellPadding = ‘2px’; sTable.style.position = ‘absolute’; sTable.style.zIndex= ‘99′; sTable.id = “suggest-table”; var iFrame = document.getElementById(”suggest-table-iframe”); if (!iFrame) { if (TaggingUtils.isIE && TaggingUtils.isMinIE5_5) { iframe = document.createElement(”iframe”); iframe.id = “suggest-table-iframe”; iframe.src=”javascript:false;” mce_src=”javascript:false;”; iframe.frameborder = “0px”; iframe.scrolling = “no” iframe.style.position = “absolute”; iframe.style.zIndex = 99; iframe.style.display = “none”; iframe.style.borderStyle = “none”; document.body.appendChild(iframe); } } for (var i = 0; i < this.data.length; i++) { var sTR = sTable.insertRow(-1); var sTD = sTR.insertCell(-1); //aSuggest.href=”javascript:void(0)” mce_href=”javascript:void(0)”; sTR.position = i; sTR.suggestion = this.data[i].name; sTD.innerHTML = parse(this.data[i].name, this.key); var pTD = sTR.insertCell(-1); pTD.align = “right”; pTD.innerHTML = this.data[i].popularity + ” ” + (this.data[i].popularity > 1 ? TaggingOptions.usages : TaggingOptions.usage); TaggingUtils.observe(sTR, “mouseover”, TaggingUtils.bindAsEventListener(this.highlightOnMouseOver, this), false); TaggingUtils.observe(sTR, “mousedown”, TaggingUtils.bindAsEventListener(this.selectOnClick, this), false); } document.body.appendChild(sTable); } } TaggingSuggestionBox.prototype.startFetchSuggestions = function(key) { if (this.container.hasKey(key)) { this.data = this.container.getSuggestions(key, 20); this.show(); //this.highlightNext(true); } else { //use only the first key to retreive suggestions bucket var firstChar = key.length > 1?key.charAt(0):key; var opts = { method: ‘GET’, asynchronous: true, sameInstance: true, parameters: “appID=retail&key=” + firstChar + “&ref=cm_tag_s”, key : key, onSuccess : TaggingUtils.bind(function(transport) { this.successFetchSuggestions(transport, opts); }, this), onError : TaggingUtils.bind(function(transport) { this.failedFetchSuggestions(transport, opts); }, this), onTimeout : TaggingUtils.bind(function(transport) { this.failedFetchSuggestions(transport, opts); }, this) }; var ajax = new TaggingAjax.Request(opts); ajax.makeRequest(TaggingOptions.suggestionUrl); } } TaggingSuggestionBox.prototype.successFetchSuggestions = function(xmlObj, options) { var response = TaggingUtils.trim(xmlObj.responseText); if (response.indexOf(”Error”) != 0 && response.indexOf(”[”) == 0 && response.lastIndexOf(”]”) == response.length - 1) { var tmp = eval(xmlObj.responseText); this.container.addSuggestions(options.key, tmp); var currentUserValue = TaggingUtils.trim(this.inputBox.value); //check the first char to see if we are in the same bucket if (currentUserValue && currentUserValue.length > 0 && currentUserValue.charAt(0) == options.key.charAt(0)) { //use the last user key to fetch suggestion from bucket this.data = this.container.getSuggestions(currentUserValue, 20); this.show(); //this.highlightNext(true); } } } TaggingSuggestionBox.prototype.failedFetchSuggestions = function(xmlObj, options) { this.hide(); } TaggingSuggestionBox.prototype.show = function() { if (this.data.length > 0) { this.key = TaggingUtils.trim(this.inputBox.value); this.addData(); var sTable = document.getElementById(”suggest-table”); sTable.style.display = (TaggingUtils.isIE || TaggingUtils.isOpera) ? ‘block’ : “table”; var top = TaggingUtils.getPageTop(this.inputBox, ‘offsetTop’) + this.inputBox.offsetHeight - 1 + ‘px’; var left = TaggingUtils.getPageLeft(this.inputBox, ‘offsetLeft’) + ‘px’; sTable.style.top = top; sTable.style.left = left; var iFrame = document.getElementById(”suggest-table-iframe”); if(iFrame){ iFrame.style.top = top; iFrame.style.left = left; iFrame.style.width = sTable.offsetWidth; iFrame.style.height = sTable.offsetHeight; iFrame.style.display = “block”; iFrame.style.zIndex = sTable.style.zIndex - 1; } //sTable.style.width = this.inputBox.offsetWidth * 2 + ‘px’; } } TaggingSuggestionBox.prototype.hide = function() { var sTable = document.getElementById(”suggest-table”); if (sTable) { sTable.style.display = ‘none’; document.body.removeChild(sTable); } var iFrame = document.getElementById(”suggest-table-iframe”); if(iFrame){ iFrame.style.display = “none”; } this.reset(); } TaggingSuggestionBox.prototype.selectOnClick = function(evt) { this.inputBox.value = this.data[this.selected]; this.hide(); } TaggingSuggestionBox.prototype.highlightOnMouseOver = function(evt) { var position = 0; var parent; if (window.event) { position = window.event.srcElement.parentNode.position; parent = window.event.srcElement; } else { position = evt.target.parentNode.position; parent = evt.target; } while (parent.tagName.toLowerCase() != “tr”) { parent = parent.parentNode } position = parent.position; var sTable = document.getElementById(”suggest-table”); if (this.selected != -1) { sTable.rows[this.selected].className = ‘’; } this.selected = position; sTable.rows[this.selected].className = ‘hovered’; } TaggingSuggestionBox.prototype.highlightNext = function(updateValue) { if (this.data && this.data.length) { var sTable = document.getElementById(”suggest-table”); if (this.selected != -1) { sTable.rows[this.selected].className = ‘’; } this.selected++; if (this.selected >= this.data.length) { //this.selected = 0; this.selected = this.data.length - 1; } if (!updateValue) { this.inputBox.value = this.data[this.selected]; } sTable.rows[this.selected].className = ‘hovered’; } } TaggingSuggestionBox.prototype.highlightPrev = function(updateValue) { if (this.data && this.data.length) { if (this.selected < = -1) { return; } var sTable = document.getElementById(”suggest-table”); sTable.rows[this.selected].className = ”; this.selected–; if (this.selected < 0) { //this.selected = this.data.length-1; this.selected = -1; this.inputBox.value = this.key; } else { if (!updateValue) { this.inputBox.value = this.data[this.selected]; } sTable.rows[this.selected].className = ‘hovered’; } } } ////////////////////////////////////////////////////////////////////////// // // // Product Tags // // // ////////////////////////////////////////////////////////////////////////// function TaggingProductTags(asin, tags) { this.asin = asin; if (tags) { this.tags = tags; } else { this.tags = new Array(); } this.suggestBox = new TaggingSuggestionBox(asin + “-tag-input”, document.suggestionsContainer, this); } TaggingProductTags.prototype.initHandlers = function(tag) { var editEle = document.getElementById(this.asin + “-edit”); if (editEle) { var anchor = TaggingUtils.findNodes(editEle, “a”, null)[0]; anchor.href=”javascript:void(0)” mce_href=”javascript:void(0)”; anchor.onclick = function() { return false; } TaggingUtils.observe(editEle, “click”, TaggingUtils.bindAsEventListener(this.showEdit, this), false); } var addEle = document.getElementById(this.asin + “-tag-add”); if (addEle) { var button = document.createElement(”img”); button.src = addEle.src; button.title = addEle.title; button.align = addEle.align; if (document.all) { button.style.cursor = “hand”; } else { button.style.cursor = “pointer”; } button.style.borderWidth = “0px”; TaggingUtils.observe(button, “click”, TaggingUtils.bindAsEventListener(this.startTagProduct, this), false); addEle.style.display = “none”; addEle.parentNode.insertBefore(button, addEle); } this.suggestBox.init(); } TaggingProductTags.prototype.addTag = function(tag) { if (!this.containsTag(tag)) { this.tags[this.tags.length] = tag; } } TaggingProductTags.prototype.containsTag = function(tag) { if (this.tags) { for (var i = 0; i < this.tags.length; i++) { if (this.tags[i] == tag) { return true; } } } return false; } TaggingProductTags.prototype.tagsReplaced = function(tags) { var tagsSpan = document.getElementById(this.asin + “-tags”); while (tagsSpan.firstChild) { tagsSpan.removeChild(tagsSpan.firstChild); } for (i = 0; i < tags.length; i++) { this.addTagAnchor(tags[i]); this.addTag(tags[i]); } } TaggingProductTags.prototype.addTagAnchor = function(tag) { var tagsSpan = document.getElementById(this.asin + “-tags”); var newTag = document.createElement(”A”); var ltext = tag.length > 40? (tag.substring(0, 40) + “…”) : tag; ltext = ltext.replace(/ /g, “ ”); newTag.innerHTML = ltext; newTag.setAttribute(”href”, TaggingOptions.tagUrl1 + tag + TaggingOptions.tagUrl2); if (this.tags.length > 0) { tagsSpan.appendChild(document.createTextNode(”, “)); } tagsSpan.appendChild(newTag); } TaggingProductTags.prototype.startReplaceTags = function(replacingTags, removedTags, renamedTags) { var paramString = “appID=retail&ASIN=” + this.asin; for (i = 0; i < replacingTags.length; i++) { paramString += “&tag=” + replacingTags[i]; } var opts = { method: ‘GET’, asynchronous: true, sameInstance: true, parameters: paramString + “&ref=cm_tag_edit”, replacingTags : replacingTags, removedTags : removedTags, renamedTags : renamedTags, onSuccess : TaggingUtils.bind(function(transport) { this.successReplaceTags(transport, opts); }, this), onError : TaggingUtils.bind(function(transport) { this.failedReplaceTags(transport, opts); }, this), onTimeout : TaggingUtils.bind(function(transport) { this.failedReplaceTags(transport, opts); }, this) }; var ajax = new TaggingAjax.Request(opts); ajax.makeRequest(TaggingOptions.replaceUrl); } TaggingProductTags.prototype.successReplaceTags = function(xmlObj, options) { var response = TaggingUtils.trim(xmlObj.responseText); if (response.indexOf(”ok”) == 0) { this.tags = new Array(); this.tagsReplaced(options.replacingTags); } var editElem = document.getElementById(this.asin + “-edit”); if (editElem && this.tags.length == 0) { editElem.style.display = “none”; } } TaggingProductTags.prototype.failedReplaceTags = function(xmlObj, options) { } TaggingProductTags.prototype.startTagProduct = function(evt) { if (this.addTagInProgress) { return; } var addTagElem = document.getElementById(this.asin + “-tag-add”); if (addTagElem && addTagElem.getAttribute(”collect-rn-url”)) { window.location = addTagElem.getAttribute(”collect-rn-url”); } else { var input = document.getElementById(this.asin + “-tag-input”); if (input) { var tag = TaggingUtils.trim(input.value); if (!tag || tag.length == 0) { return; } if (this.containsTag(tag)) { try { input.value = “”; } catch (e) { } return; } input.blur(); input.readOnly = true; this.addTagInProgress = true; //start ajax call var opts = { method: ‘GET’, asynchronous: true, sameInstance: true, parameters: “appID=retail&tag=” + tag + “&ASIN=” + this.asin + “&ref=cm_tag_add”, onSuccess : TaggingUtils.bind(function(transport) { this.successTagProduct(transport, opts); }, this), onError : TaggingUtils.bind(function(transport) { this.failedTagProduct(transport, opts); }, this), onTimeout : TaggingUtils.bind(function(transport) { this.failedTagProduct(transport, opts); }, this) }; var ajax = new TaggingAjax.Request(opts); ajax.makeRequest(TaggingOptions.tagObjectUrl); } } if (evt) { TaggingUtils.stopEvent(evt); return false; } } TaggingProductTags.prototype.successTagProduct = function(xmlObj, options) { var response = TaggingUtils.trim(xmlObj.responseText); var tagInput = document.getElementById(this.asin + “-tag-input”); if (response.indexOf(”ok”) == 0) { var tag = TaggingUtils.trim(tagInput.value); this.addTagAnchor(tag); try { tagInput.value = “”; } catch (e) { } this.addTag(tag); var editElem = document.getElementById(this.asin + “-edit”); if (editElem) { editElem.style.display = “”; } } tagInput.readOnly = false; this.addTagInProgress = false; tagInput.focus(); } TaggingProductTags.prototype.failedTagProduct = function(xmlObj, options) { var tagInput = document.getElementById(this.asin + “-tag-input”); tagInput.readOnly = false; this.addTagInProgress = false; } TaggingProductTags.prototype.showEdit = function(ev) { var productTags = this; var editPanel = new TaggingPopUpPanel(”editTagsLayer”, this); editPanel.removeContent(); //add event handlers to the editPanel’s buttons if (editPanel.cancelButton) { editPanel.cancelButton.onclick = function() { editPanel.hide(); }; } if (editPanel.okButton) { editPanel.okButton.onclick = function() { var removeAllTags = true; var i = 0; content = editPanel.getContent(); var removedTags = new Array(); var renamedTags = {}; var replacingTags = new Array(); var areRenamed = false; for (i = 0; i < productTags.tags.length; i++) { var removed = true; for (j = 0; j < content.length; j++) { var child = content[j]; if ((child.tagName == “DIV” || child.tagName == “div”) && child.id == i) { removed = false; var inputChild = child.childNodes[0]; var tag = TaggingUtils.trim(inputChild.value); if (!tag) {//remove tag if empty string removed = true; } else if (tag != productTags.tags[i]) { renamedTags[productTags.tags[i]] = tag; areRenamed = true; } if (!removed && !TaggingUtils.isInArray(replacingTags, tag)) { replacingTags.push(tag); } break; } } if (removed) { removedTags.push(productTags.tags[i]); } } if (removedTags.length > 0 || areRenamed) { productTags.startReplaceTags(replacingTags, removedTags, renamedTags); } editPanel.hide(); }; } this.populateEditPanel(editPanel); if (window.event) ev = window.event; var element = ev.target || ev.srcElement; editPanel.show(element); TaggingUtils.stopEvent(ev); return false; } TaggingProductTags.prototype.populateEditPanel = function(editPanel) { //var popTags = document.getElementById(”popTags”); //popTags.product = product; // delete ‘popTags’ children editPanel.addContent(document.createElement(”br”)); // build children from ‘your tags’ list var i = 0; for (i = 0; i < this.tags.length; i++) { var tag = this.tags[i]; var popDiv = document.createElement(”DIV”); popDiv.className = “tagEdit”; popDiv.id = i; editPanel.addContent(popDiv); // create INPUT var popInput = document.createElement(”INPUT”); popInput.type = “text”; popInput.value = tag; popInput.maxLength = 128; popInput.className = “tiny edit-tag”; TaggingUtils.observe(popInput, “keydown”, TaggingUtils.bindAsEventListener(TaggingInputKeyDown, window), false); TaggingUtils.observe(popInput, “keypress”, TaggingUtils.bindAsEventListener(TaggingInputKeyPress, window), false); popInput.oncontextmenu = function() { return false; }; popDiv.appendChild(popInput); popDiv.appendChild(document.createTextNode(” “)); // create A var popA = document.createElement(”A”); popA.href=”javascript:void(0)” mce_href=”javascript:void(0)”; popA.id = tag; popA.onclick = function () { editPanel.removeContent(this.parentNode.id); } //create IMG var popImg = document.createElement(”IMG”); popImg.align = “absmiddle”; popImg.title = TaggingOptions.removeTitle; popImg.src = TaggingOptions.removeImgUrl; popImg.style.border = 0; popA.appendChild(popImg); popDiv.appendChild(popA); popDiv.appendChild(document.createElement(”br”)); } editPanel.addContent(document.createElement(”br”)); } ////////////////////////////////////////////////////////////////////////// // // // edit tags functions // // // ////////////////////////////////////////////////////////////////////////// function TaggingPopUpPanel(name, productTags) { this.name = name; this.productTags = productTags this.okButton = document.getElementById(name + “:button:ok”); this.cancelButton = document.getElementById(name + “:button:cancel”); this.whichDog = document.getElementById(name); this.iFrame = document.getElementById(”editTagsLayer-iframe”); if (!this.iFrame) { if (TaggingUtils.isIE && TaggingUtils.isMinIE5_5) { var iframe = document.createElement(”iframe”); iframe.id = “editTagsLayer-iframe”; iframe.src=”javascript:false;” mce_src=”javascript:false;”; iframe.frameborder = “0px”; iframe.scrolling = “no” iframe.style.position = “absolute”; iframe.style.display = “none”; iframe.style.borderStyle = “none”; document.body.appendChild(iframe); this.iFrame = iframe; } } this.titleBar = document.getElementById(name + “:titleBar”); TaggingUtils.observe(document, “mousemove”, TaggingUtils.bindAsEventListener(this.onMouseDrag, this), false); TaggingUtils.observe(this.titleBar, “mousedown”, TaggingUtils.bindAsEventListener(this.titleBarMouseDown, this), false); TaggingUtils.observe(this.titleBar, “mouseup”, TaggingUtils.bindAsEventListener(this.titleBarMouseUp, this), false); } TaggingPopUpPanel.prototype.titleBarMouseDown = function(evt) { this.offsetx = TaggingUtils.getEventPageX(evt); this.offsety = TaggingUtils.getEventPageY(evt); this.nowX = parseInt(this.whichDog.style.left); this.nowY = parseInt(this.whichDog.style.top); this.okToMove = TaggingUtils.isLeftClick(evt); } TaggingPopUpPanel.prototype.titleBarMouseUp = function(evt) { if (TaggingUtils.isLeftClick(evt)) { this.okToMove = false; } } TaggingPopUpPanel.prototype.onMouseDrag = function(evt) { if (this.visible && this.okToMove) { this.whichDog.style.left = this.nowX + TaggingUtils.getEventPageX(evt) - this.offsetx; this.whichDog.style.top = this.nowY + TaggingUtils.getEventPageY(evt) - this.offsety; if (this.iFrame) { this.iFrame.style.top = this.whichDog.style.top; this.iFrame.style.left = this.whichDog.style.left; } } return true; } TaggingPopUpPanel.prototype.addContent = function(content) { document.getElementById(this.name + “:content”).appendChild(content); } TaggingPopUpPanel.prototype.getContent = function(contentId) { if (contentId) { var content = document.getElementById(this.name + “:content”); var nodes = content.childNodes; for (i = 0; i < nodes.length; i++) { if (nodes[i].id == contentId) { return nodes[i]; } } } else { return document.getElementById(this.name + “:content”).childNodes; } } TaggingPopUpPanel.prototype.removeContent = function(contentId) { var content = document.getElementById(this.name + “:content”); var nodes = content.childNodes; if (contentId) { for (i = 0; i < nodes.length; i++) { if (nodes[i].id == contentId) { var tmp = nodes[i]; document.getElementById(this.name + “:content”).removeChild(tmp); return tmp; } } } else { while (content.firstChild) { content.removeChild(content.firstChild); } } } TaggingPopUpPanel.prototype.hide = function() { this.whichDog.style.display = “none”; if (this.iFrame) { this.iFrame.style.display = “none”; } this.visible = false; } TaggingPopUpPanel.prototype.show = function(triggerElement, options) { this.options = options; var popup = document.getElementById(”editTagsLayer”); var iFrame = document.getElementById(”editTagsLayer-iframe”); popup.style.top = (TaggingUtils.getPageTop(triggerElement) + triggerElement.offsetHeight) + ‘px’; popup.style.left = TaggingUtils.getPageLeft(triggerElement) + ‘px’; popup.style.zIndex = 100; this.whichDog.style.display = “block”; this.visible = true; if (this.iFrame) { iFrame.style.width = popup.offsetWidth; iFrame.style.height = popup.offsetHeight; iFrame.style.zIndex = popup.style.zIndex - 1; iFrame.style.top = popup.style.top; iFrame.style.left = popup.style.left; iFrame.style.display = “block”; } } [...]
Austin Drake said,
February 9, 2006 @ 7:49 pm
Cool site! I’ll be back.