function show_vtip(othis, text, tag) {
	othis.t = othis.title;
	othis.title = ''; 
	var popcode = '<table class="OldPopup"><tr class="T"><td class="L"><div><img src="/images/template/box/ypopup/tl.png" alt="" /></div></td><td class="C"><div><img src="/images/template/box/ypopup/px.png" alt="" /></div></td><td class="R"><div><img src="/images/template/box/ypopup/tr.png" alt="" /></div></td></tr><tr class="M"><td class="L"><div><img src="/images/template/box/ypopup/px.png" alt="" /></div></td><td class="C">'+ text +'</td><td class="R"><div><img src="/images/template/box/ypopup/px.png" alt="" /></div></td></tr><tr class="B"><td class="L"><div><img src="/images/template/box/ypopup/bl.png" alt="" /></div></td><td class="C"><div><img src="/images/template/box/ypopup/corner.png" alt="" /></div></td><td class="R"><div><img src="/images/template/box/ypopup/br.png" alt="" /></div></td></tr></table>';
	jQuery('#vtip .content').html(popcode);
	jQuery('#vtip').html(popcode);
	var pos = jQuery(othis).offset();
	var top = 0; var left = 0;
	if ( tag == 'td' || tag == 'span' ) {
		top = pos.top - jQuery('#vtip').height() + 1;
		left = pos.left + jQuery(othis).width()/2 - 19;
	}
	if ( tag == 'image'  ) {
		top = pos.top - jQuery('#vtip').height() + 1;
		left = pos.left - 20 + jQuery(othis).width()/2 + 1;
	}
	left = parseInt( left ); top = parseInt( top );
	jQuery('#vtip').css("top", top+"px").css("left", left+"px").show();
}
function vtip() {
	jQuery('body').append( '<div id="vtip" style="position: absolute; z-index: 300;"></div>' );
	jQuery("#vtip").hide();
	jQuery("#vtip").mouseover(function() { jQuery('#vtip').show(); });
	jQuery("#vtip").mouseout(function() { jQuery("#vtip").hide(); });
	jQuery(".vtip").mouseout(function() { jQuery("#vtip").hide(); });
	jQuery(".vtip").unbind().hover(
		function(e) { show_vtip(this, this.title, 'td'); },
		function() { this.title = this.t; jQuery("#vtip").hide(); }
	);
}

var ttip_current = '';
function show_ttip_start(othis, text) {
	// alert( othis.nodeName );
	ttip_current = othis;
	othis.t = othis.title;
	othis.title = ''; 
	var popcode = '<table class="OldPopup"><tr class="T"><td class="L"><div><img src="/images/template/box/ypopup/tl.png" alt="" /></div></td><td class="C"><div><img src="/images/template/box/ypopup/px.png" alt="" /></div></td><td class="R"><div><img src="/images/template/box/ypopup/tr.png" alt="" /></div></td></tr><tr class="M"><td class="L"><div><img src="/images/template/box/ypopup/px.png" alt="" /></div></td><td class="C">'+ text +'</td><td class="R"><div><img src="/images/template/box/ypopup/px.png" alt="" /></div></td></tr><tr class="B"><td class="L"><div><img src="/images/template/box/ypopup/bl.png" alt="" /></div></td><td class="C"><div><img src="/images/template/box/ypopup/corner.png" alt="" /></div></td><td class="R"><div><img src="/images/template/box/ypopup/br.png" alt="" /></div></td></tr></table>';
	jQuery(othis).attr('src', '/images/template/paramtable/qd.gif');
	jQuery('#ttip .content').html(popcode);
	jQuery('#ttip').html(popcode);
	var pos = jQuery(othis).offset();
	var top = 0; var left = 0;
	top = pos.top - jQuery('#ttip').height() + 0;
	left = pos.left - 20 + jQuery(othis).width()/2 + 1;
	left = parseInt( left ); top = parseInt( top );
	jQuery('#ttip').css("top", top+"px").css("left", left+"px").show();
}
function show_ttip() {
	jQuery('body').append( '<div id="ttip" style="position: absolute; z-index: 300;"></div>' );
	jQuery("#ttip").hide();
	jQuery("#ttip").mouseover(function() { jQuery('#vtip').show(); });
	jQuery("#ttip").mouseout(function() { jQuery("#vtip").hide(); });
	jQuery(".ttip").mouseout(function() { jQuery("#vtip").hide(); });
	jQuery(".ttip").unbind().hover(
		function(e) { show_vtip(this, this.title, 'td'); },
		function() { this.title = this.t; jQuery("#ttip").hide(); }
	);
}

function hide_ttip() {
	jQuery("#ttip").hide();
}
function ttip() {
	jQuery('body').append( '<div id="ttip" style="position: absolute; z-index: 300;"></div>' );
	jQuery("#ttip").hide();
	jQuery("#ttip").mouseover(function() { jQuery('#ttip').show(); show_ttip(); });
	jQuery("#ttip").mouseout(function() { hide_ttip(); jQuery(ttip_current).attr('src', '/images/template/paramtable/ql.gif'); });
	jQuery("img.ttip").mouseout(function() { hide_ttip(); });
	jQuery("img.ttip").unbind().hover(
		function(e) { show_ttip_start(this, this.title); },
		function() { this.title = this.t; jQuery(this).attr('src', '/images/template/paramtable/ql.gif'); hide_ttip(); }
	);
}


