//屏蔽错误
function killErrors() {
return true; 
} 
window.onerror = killErrors; 
//屏蔽错误

function getobj(fuc_name)
{
	return document.getElementById(fuc_name);
}

//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
var currentpos=0;
var direction="top";
var srollobj;
var poccess;
var speed=40;
var step=3;
var stateheight=400;
function stopsroll()
{
	clearInterval(poccess);
}

function showflash(fuc_src,fuc_width,fuc_height)
{
	document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='"+fuc_width+"' height='"+fuc_height+"'><param name='movie' value='"+fuc_src+"' /><param name='quality' value='high' /><param name='wmode' value='transparent' /><embed src='"+fuc_src+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+fuc_width+"' height='"+fuc_height+"'></embed></object>");
}

function sroll()
{
	if(srollobj==null) return;
	height=srollobj.offsetHeight;
	tempheight=srollobj.style.pixelTop;
	if(direction=="top")
	{
		tempheight=tempheight<0?tempheight+step:0;
	}
	else
	{
		if(height<stateheight) return;
		tempheight=(tempheight>(-(height-stateheight)))?tempheight-step:-(height-stateheight);
	}
	//window.status=direction;
	srollobj.style.pixelTop=tempheight;
}

function srolltop(fuc_name)
{
	srollobj=getobj(fuc_name);
	if(srollobj==null) return;
	direction="top";
	poccess=setInterval(sroll,speed)
}

function srollbottom(fuc_name)
{
	srollobj=getobj(fuc_name);
	if(srollobj==null) return;
	direction="down";
	//window.status=direction;
	poccess=setInterval(sroll,speed);
}

function gototop()
{
	srollobj.style.pixelTop=0;
	clearInterval(poccess);
}
function gotobottom(fuc_name)
{
	srollobj=getobj(fuc_name);
	if(srollobj==null) return;
	height=srollobj.offsetHeight;
	srollobj.style.pixelTop=-(height-stateheight);
	clearInterval(poccess);
}
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
var currentpage=1;
var currentviewpage=1;
var maxpage=1;

function ilovelucyming(fuc_name)
{
	var tempnum=0;
	
	fuc_name = fuc_name < 1 ? 1 : fuc_name;
	fuc_name = fuc_name > maxpage ? maxpage : fuc_name;
	
	currentviewpage = fuc_name;
	fuc_name= "smallpic0" + fuc_name;
	var tempobj=getobj(fuc_name);
	if(tempobj==null) return;
	tempobj.style.pixelLeft=event.clientX-420;
	tempobj.style.pixelTop=330;
	tempobj.style.visibility="visible";
}

function butshegonnamarryforauncle()
{
	fuc_name= "smallpic0" + currentviewpage;
	var floatdiv=getobj(fuc_name);
	if(floatdiv==null) return;
	floatdiv.style.visibility="hidden";
}

function myheartwasbroken(fuc_id)
{
	var tempstr=location.href;
	if(tempstr.indexOf("Project.html")!=-1)
	{
	location.href="ProjectInfo.html?ProductPicker_action=Searchcategory&CategoryID="+fuc_id;
	}
	else
	{
	location.href="ProductInfoExhibit.html?ProductPicker_action=Searchcategory&CategoryID="+fuc_id;
	}
}


function butthereisstillaspecialplaceforherinmyheart(fuc_name)
{
	var i=1;
	var tempobj1;
	var tempobj2;
	var tempobj3;
	var tempobj4;
	var tempobj5;
	var tempstr;
	
	fuc_name = fuc_name < 1 ? 1 : fuc_name;
	fuc_name = fuc_name > maxpage ? maxpage : fuc_name;
	currentpage=fuc_name;
	
	srollobj=getobj("sroll");
	if(srollobj!=null) srollobj.style.pixelTop=0;
	
	tempstr= "smallpic0" + fuc_name;
	tempobj1=getobj(tempstr);
	if(tempobj1==null) return;
	tempstr= "detail0" + fuc_name;
	tempobj2=getobj(tempstr);
	if(tempobj2==null) return;
	tempobj3=getobj("productdetailimg");
	if(tempobj3==null) return;
	tempobj4=getobj("productdetaildetail");
	if(tempobj4==null) return;
	
	for(i;i<=maxpage;i++)
	{
		tempstr= "bigpic0" + i;
		tempobj5=getobj(tempstr);
		if(tempobj5==null) continue;
		if(i==fuc_name)
		{
			tempobj5.style.display="block";
		}
		else
		{
			tempobj5.style.display="none";
		}
	}
	
	tempobj4.innerHTML = tempobj2.innerHTML;
	//alert(tempobj4.innerHTML);
}

function lovelucymingforever()
{
	var tempstr;
	var tempobj1;
	var tempobj3;
	tempstr= "bigpic01";
	tempobj1=getobj(tempstr);
	if(tempobj1==null)
	{
		tempobj3=getobj("productdetailimg");
		tempobj3.innerHTML="对不起，该分类暂无内容!";
	}
	else
	{
		butthereisstillaspecialplaceforherinmyheart(1);
	}
}

function ilovelucyming_project(fuc_name)
{
	var tempnum=0;
	fuc_name = fuc_name < 1 ? 1 : fuc_name;
	fuc_name = fuc_name > maxpage ? maxpage : fuc_name;
	
	currentviewpage = fuc_name;
	fuc_name= "smallpic0" + fuc_name;
	var tempobj=getobj(fuc_name);
	if(tempobj==null) return;
	tempobj.style.pixelLeft=event.clientX-375;
	tempobj.style.pixelTop=315;
	tempobj.style.visibility="visible";
}

function butshegonnamarryforauncle_project()
{
	fuc_name= "smallpic0" + currentviewpage;
	var floatdiv=getobj(fuc_name);
	if(floatdiv==null) return;
	floatdiv.style.visibility="hidden";
}


