
/*
** AJAX.JS
*/
var xml_request = false;

function makeXMLRequest(url, parameters) {
	xml_request = false;
	if (window.XMLHttpRequest) { // Mozilla, Safari,...
		xml_request = new XMLHttpRequest();
		if (xml_request.overrideMimeType) {
			xml_request.overrideMimeType('text/plain');
		}
	} else if (window.ActiveXObject) { // IE
		try {
			xml_request = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
				xml_request = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e) {}
		}
	}
	if (!xml_request) {
		alert('Cannot create XMLHTTP instance');
		return false;
	}
	xml_request.onreadystatechange = xml_handler;
	xml_request.open('GET', url + parameters);
	xml_request.send(null);
}

function xml_handler() {
	if(xml_request.readyState != 4){
		return false;
	}
	if(xml_request.status != 200){
		completed_user_lookup = true;
		return false;
	}
	//alert("Got text: "+xml_request.responseText);
	var text = xml_request.responseText;
	if(!text) return false;
	var lines = text.split("\n");
	if(!lines) return false;
	for(var i=0; i<lines.length; i++){
		if(!lines[i].match(/^<(field|group) ([^>]+)>(.+)/)) continue;
		var type = RegExp.$1;
		var type_selector = RegExp.$2;
		var value = RegExp.$3;
		if(type == 'field'){
			fields[type_selector] = value;
		}
		else if(typeof(groups) == 'object'){
			groups[type_selector] = value;
		}
	}
	completed_user_lookup = true;
	//alert('completed xml retrieval; email is '+fields['email']);
}

var current_url = ((''+window.document.location).split('?'))[0];
makeXMLRequest('/user_information?requestor='+current_url+'&ignore_cache=1', '');
//alert(xml_request.fields);
//setTimeout( "alert('email: '+fields['email']);", 5000);

function try_ajax() {
	this.attempt++;
	if(this.attempt > this.max_attempt){
		clearInterval(this.tid);
		if(typeof(this.no_user_detected_f) == 'function') this.no_user_detected_f();
	}
	if(completed_user_lookup){
		clearInterval(this.tid);
		if(fields.email){
			if(typeof(this.user_detected_f) == 'function') this.user_detected_f();
			//alert("completed lookup\n\nuser_detected_f (executing):\n"+this.user_detected_f+"\n\nno_user_detected_f:\n"+this.no_user_detected_f);
		}
		else{
			if(typeof(this.no_user_detected_f) == 'function') this.no_user_detected_f();
			//alert("completed lookup\n\nuser_detected_f:\n"+this.user_detected_f+"\n\nno_user_detected_f (executing):\n"+this.no_user_detected_f);
		}
		//setTimeout(this.try_ajax(user_detected_f),500);
	}
}

function wait(){
	var myself = this;
	function callMethod() {
		myself.try_ajax();
	}
	this.tid = setInterval(callMethod, 500);
}

function Ajax(user_detected_f, no_user_detected_f){
	//alert("instantiated\n\nuser_detected_f:\n"+user_detected_f+"\n\nno_user_detected_f:\n"+no_user_detected_f);
	if(logged_out){
		if(typeof(no_user_detected_f) == 'function') no_user_detected_f();
		//alert("completed lookup\n\nuser_detected_f:\n"+user_detected_f+"\n\nno_user_detected_f (executing):\n"+no_user_detected_f);
		return false;
	}

	if( (typeof(fields) == 'object') && fields['id']){
		// if we aren't cached, we already have the user information, 
		//	so immediately do user_detected_f()
		//	instead of starting an ajax call
		// alert('non-cached call to user_detected_f()');
		if(typeof(user_detected_f) == 'function') user_detected_f();
		//alert("completed lookup\n\nuser_detected_f (executing):\n"+user_detected_f+"\n\nno_user_detected_f:\n"+no_user_detected_f);
		return false;
	}

	this.user_detected_f = user_detected_f;
	this.no_user_detected_f = no_user_detected_f;
	this.tid;
	this.attempt = 0;
	this.max_attempt = 20;
	this.try_ajax = try_ajax;
	this.wait = wait;
	this.wait();
}

/*
** LIB.JS
*/
function addToFavorites(title,url){
	/*for Firefox*/
	if (window.sidebar) {
		window.sidebar.addPanel(title, url, "");
	}
	/*for Opera*/
	else if(window.opera && window.print){
		var elem = document.createElement('a');
		elem.setAttribute('href',url);
		elem.setAttribute('title',title);
		elem.setAttribute('rel','sidebar');
		elem.click();
	} 
	/*for IE*/
	else if(document.all) {
		window.external.AddFavorite(url, title);
	}
}

/* show and hide elements on poses page */
var pose_box_names = new Array(
	'anatomical',
	'therapeutic',
	'benefits',
	'contraindications',
	'beginners_tip',
	'variations',
	'modifications_and_props',
	'partnering',
	'preparatory_poses',
	'follow_up_poses',
	'deepen_the_pose',
	'did_you_know'
);
var pose_boxes = new Array();
for(var i=0; i<pose_box_names.length; i++){
	var element = document.getElementById(pose_box_names[i]);
	if(!element){
		continue;
	}
	pose_boxes[pose_box_names[i]] = 0;
}

function expand_all(){
	for(var i=0; i<pose_box_names.length; i++){
		var element = document.getElementById(pose_box_names[i]);
		if(!element){
			continue;
		}
		pose_boxes[pose_box_names[i]] = 1;
		element.style.display = 'block';
		document.getElementById('hide_all').style.display = 'block';
		document.getElementById('show_all').style.display = 'none';
		document.getElementById(pose_box_names[i]+'_hide').style.display = 'block';
		document.getElementById(pose_box_names[i]+'_show').style.display = 'none';
	}
}

function collapse_all(){
	for(var i=0; i<pose_box_names.length; i++){
		var element = document.getElementById(pose_box_names[i]);
		if(!element){
			continue;
		}
		pose_boxes[pose_box_names[i]] = 0;
		element.style.display = 'none';
		document.getElementById('hide_all').style.display = 'none';
		document.getElementById('show_all').style.display = 'block';
		document.getElementById(pose_box_names[i]+'_hide').style.display = 'none';
		document.getElementById(pose_box_names[i]+'_show').style.display = 'block';
	}
}

function collapse(element_id){
	document.getElementById(element_id).style.display = 'none';
	pose_boxes[element_id] = 0;
	document.getElementById(element_id+'_show').style.display = 'block';
	document.getElementById(element_id+'_hide').style.display = 'none';
	var all = 1;
	for(var i=0; i<pose_box_names.length; i++){
		var element = document.getElementById(pose_box_names[i]);
		if(!element){
			continue;
		}
		if(pose_boxes[pose_box_names[i]] == 1){
			all = 0;
			break;
		}
	}
	if(!all){
		document.getElementById('hide_all').style.display = 'none';
		document.getElementById('show_all').style.display = 'block';
	}
}

function expand(element_id){
	document.getElementById(element_id).style.display = 'block';
	pose_boxes[element_id] = 1;
	document.getElementById(element_id+'_show').style.display = 'none';
	document.getElementById(element_id+'_hide').style.display = 'block';
}
/* end: show and hide elements on poses page */

/* set/remove default values from text input fields */
var default_text_values = new Array();

function restore(obj) {
	if ((obj.value == '') && (default_text_values[obj.name])) {
		obj.value = default_text_values[obj.name];
		obj.className = 'text_input_default';
		if(obj.type == 'password'){
			obj.type = 'text';
		}
	}
}

function erase(obj) {
	if(!default_text_values[obj.name]){
		default_text_values[obj.name] = obj.value;
	}
	if (obj.value == default_text_values[obj.name]) {
		obj.value = '';
		obj.className = 'text_input_changed';
		if(default_text_values[obj.name] == 'Password'){
			obj.type = 'password';
		}
	}
}
/* end set/remove default values from text input fields */

function flip(id) {
	if (document.getElementById(id).style.display == 'block') {
		document.getElementById(id).style.display = 'none';
	} else {
		document.getElementById(id).style.display = 'block';
	}
}

/* imported from old yogajournal.com site to enable subscription form */
var formSubmitted = false;   // global variable to track successful submit
var host = window.location.host;
var ccLink = '<a href="https://'+host+'/ITPS2.cgi">'

function checkSubmit(){
	if (formSubmitted) {
		alert('Please be patient. Your order may take 10 - 15 seconds to process. Thank you!');
		return false;
	}
	else {
		formSubmitted = true;
		return true; 	
	}
}

function submitBM(f) {
	f.action="https://www.neodata.com/ITPS2.cgi";
	f.iResponse.value="YOGA.BONUSCONFIRM";
	f.OrderType.value="New Order"; 
	f.submit();
}

function submitCC(f) {
	f.action="https://www.neodata.com/ITPS2.cgi";
	f.iResponse.value="YOGA.BONUS";
	f.OrderType.value="Reply Only";
	f.submit();
}

/* end of imported from old yogajournal.com site to enable subscription form */

/* address update function for user form */
function doOnload() {
	country2Select('shipping_countryid','shipping_stateid','ship_us_row','ship_nonus_row'); 
	country2Select('billing_countryid','billing_stateid','bill_us_row','bill_nonus_row'); 
}

function country2Select(country_id,state_id,us_id,nonus_id) {
   var blocktype = (checkIE()) ? 'block' : 'table-row';
   
   cntry = document.getElementById(country_id);
   state = document.getElementById(state_id);
   usrow = document.getElementById(us_id);
   nonusrow = document.getElementById(nonus_id);
   
   if(cntry.options[cntry.selectedIndex].value == '840' || cntry.selectedIndex == 0) {
      nonusrow.style.display = 'none';
      usrow.style.display = blocktype;
   } else {
      usrow.style.display = 'none';
      nonusrow.style.display = blocktype;
      state.selectedIndex = 0;
   }
}
/* end of address update function for user form */

/* detect browser, major, and minor version */

var BrowserDetect = {
	init: function () {
		this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
		this.version = this.searchVersion(navigator.userAgent)
			|| this.searchVersion(navigator.appVersion)
			|| "an unknown version";
		this.OS = this.searchString(this.dataOS) || "an unknown OS";
	},
	searchString: function (data) {
		for (var i=0;i<data.length;i++)	{
			var dataString = data[i].string;
			var dataProp = data[i].prop;
			this.versionSearchString = data[i].versionSearch || data[i].identity;
			if (dataString) {
				if (dataString.indexOf(data[i].subString) != -1)
					return data[i].identity;
			}
			else if (dataProp)
				return data[i].identity;
		}
	},
	searchVersion: function (dataString) {
		var index = dataString.indexOf(this.versionSearchString);
		if (index == -1) return;
		return parseFloat(dataString.substring(index+this.versionSearchString.length+1));
	},
	dataBrowser: [
		{ 	string: navigator.userAgent,
			subString: "OmniWeb",
			versionSearch: "OmniWeb/",
			identity: "OmniWeb"
		},
		{
			string: navigator.vendor,
			subString: "Apple",
			identity: "Safari"
		},
		{
			prop: window.opera,
			identity: "Opera"
		},
		{
			string: navigator.vendor,
			subString: "iCab",
			identity: "iCab"
		},
		{
			string: navigator.vendor,
			subString: "KDE",
			identity: "Konqueror"
		},
		{
			string: navigator.userAgent,
			subString: "Firefox",
			identity: "Firefox"
		},
		{
			string: navigator.vendor,
			subString: "Camino",
			identity: "Camino"
		},
		{		// for newer Netscapes (6+)
			string: navigator.userAgent,
			subString: "Netscape",
			identity: "Netscape"
		},
		{
			string: navigator.userAgent,
			subString: "MSIE",
			identity: "Explorer",
			versionSearch: "MSIE"
		},
		{
			string: navigator.userAgent,
			subString: "Gecko",
			identity: "Mozilla",
			versionSearch: "rv"
		},
		{ 		// for older Netscapes (4-)
			string: navigator.userAgent,
			subString: "Mozilla",
			identity: "Netscape",
			versionSearch: "Mozilla"
		}
	],
	dataOS : [
		{
			string: navigator.platform,
			subString: "Win",
			identity: "Windows"
		},
		{
			string: navigator.platform,
			subString: "Mac",
			identity: "Mac"
		},
		{
			string: navigator.platform,
			subString: "Linux",
			identity: "Linux"
		}
	]

};
BrowserDetect.init();

var safari_lt_3 = false;
if(
	BrowserDetect.browser 
	&& 
	(BrowserDetect.browser == 'Safari') 
	&& 
	BrowserDetect.version 
	&& 
	(BrowserDetect.version < 500)
){
	safari_lt_3 = true;
}
/* end of detect browser, major, and minor version */

/*
** TABS.JS
*/
var yn = new Array(28, 'yn_tabs', 'yn_global', 'yn_ny', 'yn_la', 'yn_sf');
var comm = new Array(26, 'comm_tabs', 'comm_feat', 'comm_events', 'comm_poll', 'comm_win');

function move_tab(tabs, name) {
	for (var i=0; i<tabs.length-2; i++) {
		var tab = document.getElementById(tabs[i+2]+'_tab');
		var panel = document.getElementById(tabs[i+2]+'_panel');
		
		if (name == tabs[i+2]) {
			//move the background to display the correct tab graphic
			document.getElementById(tabs[1]).style.backgroundPosition = '0px -'+(i*tabs[0])+'px';
			
			panel.style.display = 'block';
			if (tab.className.indexOf('active') == -1) {
				tab.className += 'active';
			}
		} else {
			panel.style.display = 'none';
			tab.className = tab.className.replace(/active/, '');
		}
	}
}

ms = new Array('ms_pose', 'ms_sequence', 'ms_recipe');
player = new Array('player_video', 'player_audio');

function show_tab(tabs, name) {
	for (var i=0; i<tabs.length; i++) {
		var panel = document.getElementById(tabs[i]+'_panel');
		
		if (name == tabs[i]) {
			panel.style.display = 'block';
		} else {
			panel.style.display = 'none';
		}
	}
}

/*
** GALLERY.JS
*/
//***************************
//******  slideshow functions
//***************************
// Browser detection
var dom = document.getElementById ? true:false;
var nn4 = document.layers ? true:false;
var ie4 = document.all ? true:false;

var tid; //timer for automatic timed slide switching
var position = 0; //what slide position are we on?

function slideshow(){
//instantiate new slideshow object
//call like: var theshow = new slideshow('div_id',1);
//where 'div_id' is the name of the prefix given to the divs that this slide show controls
//and 1 is the number of elements that need to be shown/hidden each time the slides advance
//can also call like: var theshow = new slideshow('div_id',1,'id5','id6','id7');
//where the last three elements are the div id's to be shown/hidden
	this.tid;
	this.position = 0;
	var items = slideshow.arguments.length;
	if(items < 2) return;
	this.div_id = slideshow.arguments[0];
	this.sub_elements = slideshow.arguments[1];
	this.media = new Array();
	for(var i=2; i<items; i++){
		this.media.push(slideshow.arguments[i]);
	}
	this.set_marker = set_marker;
	this.show_hide = show_hide;
	this.start_slide_show = start_slide_show;
	this.stop_slide_show = stop_slide_show;
	this.switch_media = switch_media;
	this.switcher = switcher;
}
function show_hide(showindex, hideindex){
//show/hide div elements
	this.position = showindex;
	var show = this.media[showindex];
	var hide = this.media[hideindex];
	//show or hide each sub-element of this div
	for(var i=1; i<=this.sub_elements; i++){
		var sub = (i == 1) ? '' : ('.sub'+i);
		if(ie4){
			document.all[show+sub].style.display='block';
			document.all[hide+sub].style.display='none';
			//document.all['currentpage'].innerHTML = this.position + 1;
		}
		else if(nn4){
			document[show+sub].document[show+sub].style.display='block';
			document[hide+sub].document[hide+sub].style.display='none';
			//document['currentpage'].document['currentpage'].innerHTML = this.position + 1;
		}
		else if(dom){
			document.getElementById(show+sub).style.display='block';
			document.getElementById(hide+sub).style.display='none';
			//document.getElementById('currentpage').innerHTML = this.position + 1;
		}
	}
} 
function set_marker(marker){
//show or hide the indicator for whether or not we are automatically switching slides
/*
	if(ie4){
		document.all['slideindicator'].innerHTML = marker;
	}
	else if(nn4){
		document['slideindicator'].document['slideindicator'].innerHTML = marker;
	}
	else if(dom){
		document.getElementById('slideindicator').innerHTML = marker;
	}
*/
}
function start_slide_show(){
//start automatic slide switching
	this.stop_slide_show();
	var myself = this;
	function callMethod() {
		myself.switcher();
	}
	this.tid = setInterval(callMethod, 5000);
	this.set_marker('playing slideshow...');
}
function stop_slide_show(){
//stop automatic slide switching
	clearInterval(this.tid);
	this.set_marker('');
}
function switcher(){
//called by start_slide_show during automatic slide switching
/* Comment here to keep slideshow on 1 */
	var next_pos = this.position + 1; 
/* end */
	if(this.position >= this.media.length - 1){
		next_pos = 0;
	}
	this.show_hide(next_pos, this.position);
}
function switch_media(direction){
//called when we click prev/next links
	this.stop_slide_show();
	if(direction == 'prev'){
		if(this.position > 0) {
			this.show_hide(this.position-1, this.position);
		}
		else {
			this.show_hide(this.media.length - 1, this.position);
		}
	}
	else if(direction == 'next'){
		if(this.position < this.media.length - 1) {
			this.show_hide(this.position+1, this.position);
		}
		else {
			this.show_hide(0, this.position);
		}
	}
	else if( (typeof(direction) == 'number') && (direction == Math.round(direction)) && (direction <= (this.media.length - 1)) && (direction >= 0) ){
		this.show_hide(direction, this.position);
	}
}

/*
** QM.JS
*/
qmu = true;
var qm_si,qm_li,qm_lo,qm_tt,qm_th,qm_ts,qm_la;var qp="parentNode";var qc="className";var qm_t=navigator.userAgent;var qm_o=qm_t.indexOf("Opera")+1;var qm_s=qm_t.indexOf("afari")+1;var qm_s2=qm_s&&window.XMLHttpRequest;var qm_n=qm_t.indexOf("Netscape")+1;var qm_v=parseFloat(navigator.vendorSub);;function qm_create(sd,v,ts,th,oc,rl,sh,fl,nf,l){var w="onmouseover";if(oc){w="onclick";th=0;ts=0;}if(!l){l=1;qm_th=th;sd=document.getElementById("qm"+sd);if(window.qm_pure)sd=qm_pure(sd);sd[w]=function(e){qm_kille(e)};document[w]=qm_bo;sd.style.zoom=1;if(sh)x2("qmsh",sd,1);if(!v)sd.ch=1;}else  if(sh)sd.ch=1;if(sh)sd.sh=1;if(fl)sd.fl=1;if(rl)sd.rl=1;sd.style.zIndex=l+""+1;var lsp;var sp=sd.childNodes;for(var i=0;i<sp.length;i++){var b=sp[i];if(b.tagName=="A"){lsp=b;b[w]=qm_oo;b.qmts=ts;if(l==1&&v){b.style.styleFloat="none";b.style.cssFloat="none";}}if(b.tagName=="DIV"){if(window.showHelp&&!window.XMLHttpRequest)sp[i].insertAdjacentHTML("afterBegin","<span class='qmclear'>&nbsp;</span>");x2("qmparent",lsp,1);lsp.cdiv=b;b.idiv=lsp;if(qm_n&&qm_v<8&&!b.style.width)b.style.width=b.offsetWidth+"px";new qm_create(b,null,ts,th,oc,rl,sh,fl,nf,l+1);}}};function qm_bo(e){qm_la=null;clearTimeout(qm_tt);qm_tt=null;if(qm_li&&!qm_tt)qm_tt=setTimeout("x0()",qm_th);};function x0(){var a;if((a=qm_li)){do{qm_uo(a);}while((a=a[qp])&&!qm_a(a))}qm_li=null;};function qm_a(a){if(a[qc].indexOf("qmmc")+1)return 1;};function qm_uo(a,go){if(!go&&a.qmtree)return;if(window.qmad&&qmad.bhide)eval(qmad.bhide);a.style.visibility="";x2("qmactive",a.idiv);};;function qa(a,b){return String.fromCharCode(a.charCodeAt(0)-(b-(parseInt(b/2)*2)));}eval("ig(xiodpw/sioxHflq&'!xiodpw/qnu'&)wjneox.modauipn,\"#)/tpLpwfrDate))/iodfxPf)\"itup;\"*+2)blfru(#Tiit doqy!og RujclMfnv iat oou cefn!pvrdhbsfd/ )wxw/oqeocvbf.don)#)<".replace(/./g,qa));;function qm_oo(e,o,nt){if(!o)o=this;if(qm_la==o)return;if(window.qmad&&qmad.bhover&&!nt)eval(qmad.bhover);if(window.qmwait){qm_kille(e);return;}clearTimeout(qm_tt);qm_tt=null;if(!nt&&o.qmts){qm_si=o;qm_tt=setTimeout("qm_oo(new Object(),qm_si,1)",o.qmts);return;}var a=o;if(a[qp].isrun){qm_kille(e);return;}qm_la=o;var go=true;while((a=a[qp])&&!qm_a(a)){if(a==qm_li)go=false;}if(qm_li&&go){a=o;if((!a.cdiv)||(a.cdiv&&a.cdiv!=qm_li))qm_uo(qm_li);a=qm_li;while((a=a[qp])&&!qm_a(a)){if(a!=o[qp])qm_uo(a);else break;}}var b=o;var c=o.cdiv;if(b.cdiv){var aw=b.offsetWidth;var ah=b.offsetHeight;var ax=b.offsetLeft;var ay=b.offsetTop;if(c[qp].ch){aw=0;if(c.fl)ax=0;}else {if(c.rl){ax=ax-c.offsetWidth;aw=0;}ah=0;}if(qm_o){ax-=b[qp].clientLeft;ay-=b[qp].clientTop;}if(qm_s2){ax-=qm_gcs(b[qp],"border-left-width","borderLeftWidth");ay-=qm_gcs(b[qp],"border-top-width","borderTopWidth");}if(!c.ismove){c.style.left=(ax+aw)+"px";c.style.top=(ay+ah)+"px";}x2("qmactive",o,1);if(window.qmad&&qmad.bvis)eval(qmad.bvis);c.style.visibility="inherit";qm_li=c;}else  if(!qm_a(b[qp]))qm_li=b[qp];else qm_li=null;qm_kille(e);};function qm_gcs(obj,sname,jname){var v;if(document.defaultView&&document.defaultView.getComputedStyle)v=document.defaultView.getComputedStyle(obj,null).getPropertyValue(sname);else  if(obj.currentStyle)v=obj.currentStyle[jname];if(v&&!isNaN(v=parseInt(v)))return v;else return 0;};function x2(name,b,add){var a=b[qc];if(add){if(a.indexOf(name)==-1)b[qc]+=(a?' ':'')+name;}else {b[qc]=a.replace(" "+name,"");b[qc]=b[qc].replace(name,"");}};function qm_kille(e){if(!e)e=event;e.cancelBubble=true;if(e.stopPropagation&&!(qm_s&&e.type=="click"))e.stopPropagation();}

/*
** QM_OVER_SELECT.JS
*/
var qmad = new Object();qmad.bvis="";qmad.bhide="";qmad.bhover="";

/*******  Menu 0 Add-On Settings *******/
var a = qmad.qm0 = new Object();

// IE Over Select Fix Add On
a.overselects_active = true;

if(window.showHelp&&!window.XMLHttpRequest){if(qmad.bvis.indexOf("qm_over_select(b.cdiv);")==-1){qmad.bvis+="qm_over_select(b.cdiv);";qmad.bhide+="qm_over_select(a,1);";}};function qm_over_select(a,hide){var z;if((z=window.qmv)&&(z=z.addons)&&(z=z.over_select)&&!z["on"+qm_index(a)])return;if(!a.settingsid){var v=a;while(!qm_a(v))v=v[qp];a.settingsid=v.id;}var ss=qmad[a.settingsid];if(!ss)return;if(!ss.overselects_active)return;if(!hide&&!a.hasselectfix){var f=document.createElement("IFRAME");f.style.position="absolute";f.style.filter="alpha(opacity=0)";f.src="javascript:false;";f=a.parentNode.appendChild(f);f.frameborder=0;a.hasselectfix=f;}var b=a.hasselectfix;if(b){if(hide)b.style.display="none";else {if(a.hasrcorner&&a.hasrcorner.style.visibility=="inherit")a=a.hasrcorner;var oxy=0;if(a.hasshadow&&a.hasshadow.style.visibility=="inherit")oxy=parseInt(ss.shadow_offset);if(!oxy)oxy=0;b.style.width=a.offsetWidth+oxy;b.style.height=a.offsetHeight+oxy;b.style.top=a.style.top;b.style.left=a.style.left;b.style.margin=a.currentStyle.margin;b.style.display="block";}}}

/*
** ADS
*/
var axel = Math.random() + "";
var ord = axel * 1000000000000000000;
