//文本框得到与失去焦点
function cleartxt(id,txt) {
if (document.getelementbyid(id).value == txt)
document.getelementbyid(id).value="" ;
return ;
}
function filltxt(id,txt) {
if ( document.getelementbyid(id).value == "" )
document.getelementbyid(id).value=txt;
return ;
}
//焦点图片轮换
function $(id) { return document.getelementbyid(id); }
function addloadevent(func){
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function(){
oldonload();
func();
}
}
}
function addbtn() {
if(!$('focus_turn')||!$('focus_pic')||!$('focus_tx')) return;
var focuslist = $('focus_pic').getelementsbytagname('li');
if(!focuslist||focuslist.length==0) return;
var btnbox = document.createelement('div');
btnbox.setattribute('id','focus_btn');
var spanbox ='';
for(var i=1; i<=focuslist.length; i++ ) {
var spanlist = ''+i+'';
spanbox += spanlist;
}
btnbox.innerhtml = spanbox;
$('focus_turn').appendchild(btnbox);
$('focus_btn').getelementsbytagname('span')[0].classname = 'current';
}
function classnormal(){
var focuslist = $('focus_pic').getelementsbytagname('li');
var btnlist = $('focus_btn').getelementsbytagname('span');
var txlist = $('focus_tx').getelementsbytagname('li');
for(var i=0; i