function pxmobj(_d,mtxt){if(_d.getElementById){m=_d.getElementById(mtxt)}else if(_d.all){m=_d.all[mtxt]}else if(_d.layers){m=_d[mtxt]}return m;}
var pindex = 0;
var pover = 0;
var pplay = 0;
var ptmr = null;
function jvSetPartner(i) {
	if(imgc == undefined) {return;}
	if(pover == 1) {ptmr=setTimeout("jvSetPartner(" + pindex.toString() + ")",100);}
	document.body.style.cursor = 'wait';
	o = pxmobj(document,'iplay');if(o != null) {
	if(pplay == 0) {o.src = aplay.src;o.alt="Play";}
	else {o.src = astop.src;o.alt="Stop";}}
	if(i >= imgc) {i = 0;}if(i < 0) {i = imgc-1;}
	o = pxmobj(document,'partner');
	if(o != null) {
		atr = (attr[i] +"||x||x||x").split('||');
		if(atr[3].length>5) {
			o.innerHTML = "<a href='" + atr[3] + "' target='" + atr[4] + "'><img id='pimg' src='../images/spacer.gif' width='" + atr[0] + "' height='" + atr[1] + "' border='0' /></a>";
		} else {
			o.innerHTML = "<img id='pimg' src='../images/spacer.gif' width='" + atr[0] + "' height='" + atr[1] + "' border='0' />";
		}
		o = pxmobj(document,'pimg');
		//alert(o.src);
		if(o != null) {
			o.src = img[i].src;
			pindex = i;
		}
		s = (pindex + 1).toString();
		document.body.style.cursor = 'default';
		if(pplay == 1) {ptmr=setTimeout("jvSetPartner(" + s + ")",5000);}
	}
}
function jvPartnerPlay() {
	o = pxmobj(document,'iplay');if(o != null) {
	if(pplay == 0) {pplay = 1;ptmr=setTimeout("jvSetPartner(" + (pindex + 1).toString() + ")",100);o.src = astop.src;o.alt="Stop";}
	else {pplay = 0;clearTimeout(ptmr);o.src = aplay.src;o.alt="Play";}}
}
function jvPartnerGo(d) {
	pplay = 0;
	clearTimeout(ptmr);
	jvSetPartner(pindex+d);
}