/*common-uvoizle.js*/function $(a) {
	return document.getElementById(a)
}
var m = {
	h : function(a) {
		$(a).style.display = "none"
	},
	f : function(a) {
		$(a).focus()
	},
	gv : function(a) {
		try {
			return $(a).value
		} catch (b) {
		}
	},
	v : function(a, b) {
		$(a).value = b
	},
	vt : function(a, b) {
		$(a).value += b
	},
	si : function(a) {
		return $(a).selectedIndex
	},
	s : function(a) {
		$(a).style.display = "block"
	},
	w : function(a, b) {
		try {
			$(a).innerHTML = b
		} catch (c) {
		}
	},
	wt : function(a, b) {
		$(a).innerHTML += b
	},
	gi : function(a) {
		return $(a).innerHTML
	},
	i : function(a, b) {
		return a.indexOf(b)
	},
	r : function(a, b, c) {
		for (; a.indexOf(b) != -1;)
			a = a.replace(b, c);
		return a.replace(b, c)
	},
	l : function(a) {
		return a.length
	},
	ck : function(a) {
		if ($(a).checked)
			return true;
		return false
	},
	sck : function(a, b) {
		$(a).checked = b
	},
	c : function(a, b, c) {
		var e = m.gi(a);
		m.w(a, b);
		setTimeout('m.w("' + a + '","' + e + '");', c * 1E3)
	},
	d : function(b) {
		return $(b).getAttribute("data").toArr()
	}
}, cid;
String.prototype.trim = function(a) {
	return !a ? this.replace(/^\s+|\s+$/g, "") : eval("this.replace(/^\\" + a
			+ "+|\\" + a + '+$/g, "")')
};
function $E(fun) {
	return eval(fun);
}
var voizle = {
	io : {
		makeRequest : function(a, b, c, e) {
			var d;
			if (window.XMLHttpRequest) {
				d = new XMLHttpRequest;
				d.overrideMimeType && d.overrideMimeType("text/xml")
			} else if (window.ActiveXObject)
				try {
					d = new ActiveXObject("Msxml2.XMLHTTP")
				} catch (g) {
					try {
						d = new ActiveXObject("Microsoft.XMLHTTP")
					} catch (j) {
					}
				}
			if (!d) {
				alert("Givingup:(Cannot create an XMLHTTP instance");
				return false
			}
			d.onreadystatechange = function() {
				if (d.readyState == 4)
					if (d.status == 200 || d.status == 405) {
						var f = {};
						if (voizle.Browser.ie()
								&& c.ctype == voizle.io.ContentType.DOM) {
							var h = new ActiveXObject("Microsoft.XMLDOM");
							h.loadXML(d.responseText);
							f[c.ctype] = h
						} else
							f[c.ctype] = c.ctype == voizle.io.ContentType.DOM ? d.responseXML
									: d.responseText;
						b(f)
					}
			};
			if (!c.method)
				c.method = "GET";
			if (c.method == voizle.io.MethodType.POST)
				try {
					a += "?" + c.postdata
				} catch (i) {
				}
			d.open(c.method, e ? a : "request?url=" + escape(a) + "&ctype="
					+ c.ctype, true);
			d.send(null)
		},
		RequestType : {
			CONTENT_TYPE : "ctype",
			METHOD_TYPE : "method",
			POST_DATA : "postdata"
		},
		ContentType : {
			TEXT : "text",
			DOM : "data"
		},
		MethodType : {
			POST : "POST",
			GET : "GET"
		},
		toQueryString : function(a) {
			var b = "";
			for (key in a)
				b += key + "=" + escape(a[key]) + "&";
			return b.trim("&")
		}
	},
	eff : {
		promp : function(a, b, c) {
			if (a) {
				$(c).style.color = "black";
				if ($(c).value == b)
					$(c).value = ""
			} else {
				$(c).style.color = "darkgray";
				if ($(c).value == "")
					$(c).value = b
			}
		},
		load : function(a) {
			m.w(a, "Creating...<br/>");
			var b = document.createElement("img");
			b.alt = "Please Wait...";
			b.src = "loading.gif";
			$(a).appendChild(b)
		}
	},
	cookie : {
		set : function(a, b, c, e, d, g, j, i) {
			try {
				document.cookie = escape(a) + "=" + escape(b)
						+ (e ? "; EXPIRES=" + e.toGMTString() : "")
						+ (d ? "; PATH=" + d : "") + (g ? "; DOMAIN=" + g : "")
						+ (i ? "; SECURE" : "")
			} catch (f) {
				return false
			}
			if (c)
				location.href = location.href;
			return true
		},
		get : function(a) {
			var b = null, c = document.cookie.indexOf(escape(a) + "=");
			if (c != -1) {
				a = c + (escape(a) + "=").length;
				b = document.cookie.indexOf(";", a);
				b = b != -1 ? unescape(document.cookie.substring(a, b))
						: unescape(document.cookie.substring(a))
			}
			return b
		},
		day : function(a) {
			return new Date((new Date).getTime() + 864E5 * a)
		}
	},
	Browser : {
		ie : function() {
			return navigator.userAgent.indexOf("MSIE") > -1
		}
	}
}, vz = [];
String.prototype.trim = function(a) {
	return !a ? this.replace(/^\s+|\s+$/g, "") : eval("this.replace(/^\\" + a
			+ "+|\\" + a + '+$/g, "")')
};
String.prototype.replaceAll = function(a, b) {
	for (st = this; st.indexOf(a) != -1;)
		st = st.replace(a, b);
	return st.replace(a, b)
};
var o = {
	s : function(num) {
		for (i = 0; i < num; i++) {
			window.scrollTo(0, num);
		}
	},
	c : function(id, v) {
		$(id).style.color = v;
	},
	b : function(id, v) {
		$(id).style.backgroundColor = v;
	},
	t : function(id, v) {
		$(id).style.top = v + "px";
	},
	l : function(id, v) {
		$(id).style.left = v + "px";
	},
	h : function(id, v) {
		$(id).style.height = v + "px";
	},
	w : function(id, v) {
		$(id).style.width = v + "px";
	}
}, ele = {
	init : function(id) {
		var data = m.d(id);
		eval(data.func + '(id, data)');
	}
};
var func = {
	epro : function(id, data) {
		$(id).onmouseover = function() {
			m.s(data.id);
		}
		$(id).onmouseout = function() {
			m.h(data.id);
		}
		$(data.id).onmouseover = function() {
			m.s(data.id);
		}
		$(data.id).onmouseout = function() {
			m.h(data.id);
		}
	}
};
var tooltip = {
	tipid : "tip",
	init : function(id) {
		$(id).onmouseout = tooltip.hidehelp;
		$(id).onmousemove = tooltip.movehelp;
		$(id).onmouseover = tooltip.showhelp;
	},
	showhelp : function() {
		try {
			$(tooltip.tipid).focus()
		} catch (e) {
			var div = document.createElement('div');
			div.className = "full_border";
			div.style.position = "absolute";
			div.id = tooltip.tipid;
			$('voizle').appendChild(div);
			m.h(tooltip.tipid);
			o.w(tooltip.tipid, 200);
		}

		var data = m.d(this.id);
		eval(data.fun + '(data, $(tooltip.tipid))');
		m.s(tooltip.tipid);
	},
	hidehelp : function() {
		m.h(tooltip.tipid);
	},
	movehelp : function(ev) {
		showPos = tooltip.getPositionData($(tooltip.tipid), ev);
		o.l(tooltip.tipid, showPos.posX);
		o.t(tooltip.tipid, showPos.posY);
	},
	getPositionData : function(obj, showEvent) {
		if (!showEvent) {
			showEvent = window.event;
		}
		var pos_X = 0, pos_Y = 0;
		if (showEvent) {
			if (typeof showEvent.pageX == "number") {
				pos_X = showEvent.pageX;
				pos_Y = showEvent.pageY;
			} else {
				if (typeof showEvent.clientX == "number") {
					pos_X = showEvent.clientX;
					pos_Y = showEvent.clientY;
					if (document.body
							&& (document.body.scrollTop || document.body.scrollLeft)
							&& !(window.opera || window.debug || navigator.vendor == "KDE")) {
						pos_X += document.body.scrollLeft;
						pos_Y += document.body.scrollTop;
					} else {
						if (document.documentElement
								&& (document.documentElement.scrollTop || document.documentElement.scrollLeft)
								&& !(window.opera || window.debug || navigator.vendor == "KDE")) {
							pos_X += document.documentElement.scrollLeft;
							pos_Y += document.documentElement.scrollTop;
						}
					}
				}
			}
		}
		var scroll_X = 0, scroll_Y = 0;
		if (document.body
				&& (document.body.scrollTop || document.body.scrollLeft)
				&& !(window.debug || navigator.vendor == "KDE")) {
			scroll_X = document.body.scrollLeft;
			scroll_Y = document.body.scrollTop;
		} else {
			if (document.documentElement
					&& (document.documentElement.scrollTop || document.documentElement.scrollLeft)
					&& !(window.debug || navigator.vendor == "KDE")) {
				scroll_X = document.documentElement.scrollLeft;
				scroll_Y = document.documentElement.scrollTop;
			}
		}
		var win_size_X = 0, win_size_Y = 0;
		if (window.innerWidth && window.innerHeight) {
			win_size_X = window.innerWidth;
			win_size_Y = window.innerHeight;
		} else {
			if (document.documentElement
					&& document.documentElement.clientWidth
					&& document.documentElement.clientHeight) {
				win_size_X = document.documentElement.clientWidth;
				win_size_Y = document.documentElement.clientHeight;
			} else {
				if (document.body && document.body.clientWidth
						&& document.body.clientHeight) {
					win_size_X = document.body.clientWidth;
					win_size_Y = document.body.clientHeight;
				}
			}
		}
		pos_X += 15;
		pos_Y += 20;
		if (obj.offsetWidth && obj.offsetHeight) {
			if (pos_X - scroll_X + obj.offsetWidth + 5 > win_size_X) {
				pos_X -= (obj.offsetWidth + 25);
			}
			if (pos_Y - scroll_Y + obj.offsetHeight + 5 > win_size_Y) {
				pos_Y -= (obj.offsetHeight + 20);
			}
		}
		var res = new Array();
		res.posX = pos_X;
		res.posY = pos_Y;
		res.scrollX = scroll_X;
		res.scrollY = scroll_Y;
		res.winSizeX = win_size_X;
		res.winSizeY = win_size_Y;
		return res;
	}
};
String.prototype.toArr = function() {
	eval("var obj = " + this);
	return obj ? obj : []
};
var text = {
	init : function(id) {
		m.v(id, m.d(id).text);
		o.c(id, '#ccc');
		$(id).onfocus = text.focus;
		$(id).onblur = text.blur;
	},
	focus : function() {
		var id = this.id;
		var txt = m.d(id).text;
		if (m.gv(id) == txt) {
			m.v(id, '');
			o.c(id, '#000');
		}
	},
	blur : function(){
		var id = this.id;
		var txt = m.d(id).text;
		if (m.gv(id) == '') {
			m.v(id, txt);
			o.c(id, '#ccc');
		}
	}
};var uv={error:{display:function(b,c){try{var d="msg";if(c)d=c;m.w(d,"");var e=document.createElement("li");e.className="error";e.innerHTML=b;$(d).appendChild(e)}catch(f){alert(a)}}},validate:{url:function(b){if(b!="http://"&&b.indexOf(".")>5&&b.indexOf("//")>3)return true;uv.error.display(vz.url);return false}}};function validate(b,c,d){b=eval("document.voizle."+b+".value");if(b.trim().length>0){c=new RegExp(c);if(c.exec(b)!=null)return true}uv.error.display(d);return false} function checkForm(){var b=document.voizle.page.value.trim();if(b!=""){if(validate("page","^(http|ftp|https)(:)(.*)$",vz.iurl)&&uv.validate.url(b)){document.voizle.style.display="none";b={u:b,id:document.voizle.pageid.value.trim(),type:"short",key:userkey};var c={};c[voizle.io.RequestType.CONTENT_TYPE]=voizle.io.ContentType.DOM;c[voizle.io.RequestType.METHOD_TYPE]=voizle.io.MethodType.POST;c[voizle.io.RequestType.POST_DATA]=voizle.io.toQueryString(b);voizle.io.makeRequest("http://api.voizle.com/",callback,c); voizle.eff.load("uform");return false}}else error(vz.url);return false}function callback(b){urlid=b.data.getElementsByTagName("urlid").item(0).childNodes[0].nodeValue;location.href="preview?id="+urlid}function promp(b,c,d){voizle.eff.promp(b,c,d)}function CreateBookmarkLink(){if(document.all)window.external.AddFavorite(location.href,document.title);else if(window.sidebar)window.sidebar.addPanel(document.title,location.href,"");else if(window.opera&&window.print)return true};