﻿// JScript 文件
function SelectAll(tempControl,paramTabIndex)
{
    //将除头模板中的其它所有的CheckBox取反
     var theBox=tempControl;
     xState=theBox.checked;    
     elem=theBox.form.elements;
     for(i=0;i<elem.length;i++)
     if(elem[i].type=="checkbox" && elem[i].id!=theBox.id && elem[i].tabIndex == paramTabIndex)
     {
       if(elem[i].checked!=xState)
       elem[i].click();
     }
 }

function deleteit(temid)
{
	if(window.confirm("Confirm delete？")==true)
	{
		document.location="?act=delete&id=" + temid;
	}
}

function deleteit2(temid)
{
	if(window.confirm("是否确定删除？")==true)
	{
		document.location=document.URL + "&act=delete&id=" + temid;
	}
}

function strTrue(temp)
{
	if (temp=="1"){
		document.write("<font color='#0000ff'>是</font>");
	}else{
		document.write("<font color='#333333'>否</font>");
	}
}


function strTrue_En(temp)
{
	if (temp=="1"){
		document.write("<font color='#0000ff'>Y</font>");
	}else{
		document.write("<font color='#333333'>N</font>");
	}
}

function strKind(temp)
{
	if (temp=="1"){
		document.write("<font color='#0000ff'>求购</font>");
	}else{
		document.write("<font color='#333333'>出售</font>");
	}
}

function strKind_Cn(temp)
{
	if (temp=="1"){
		document.write("<font color='#0000ff'>求购</font>");
	}else{
		document.write("<font color='#333333'>出售</font>");
	}
}
function strPic(temp)
{
	if (temp==""){
		document.write("<img src='../images/none.jpg' width=100 height=100 border='0'>");
	}else{
		document.write("<img src='../UpPic/" + temp + "' width=100 border='0'>");
	}
}

function strPic2(temp)
{
	if (temp==""){
		document.write("<img src='images/none.jpg' width=100 height=100 border='0'>");
	}else{
		document.write("<img src='UpPic/" + temp + "' width=100 border='0'>");
	}
}

function strPic3(temp)
{
	if (temp==""){
		document.write("<img src='images/none.jpg' width=60 height=60 border='0'>");
	}else{
		document.write("<img src='UpPic/" + temp + "' width=60 height=60 border='0'>");
	}
}