﻿// JScript 文件

function AjaxLoad_UnitCompare(tag,t)
{
    opt={
	    method:'post',
	    postBody:'a='+tag+'&t='+t,
        onSuccess: function(t) {
            $('UnitCompare').innerHTML = t.responseText;
            //Effect.BlindDown('blogsDiv', {duration:2});
        },
        onFailure: function(t) {
            $('UnitCompare').innerHTML = '网络故障,请刷新页面!';
        }
    }
    new Ajax.Request("http://www.jiaxing114.net/Method/Unit/Index/Temp_ResponseUnitCompare.aspx",opt);
}

function AjaxLoad_HotUnit(tag)
{
    opt={
	    method:'post',
	    postBody:'a='+tag,
        onSuccess: function(t) {
            $('HotUnit').innerHTML = t.responseText;
            //Effect.BlindDown('blogsDiv', {duration:2});
        },
        onFailure: function(t) {
            $('HotUnit').innerHTML = '网络故障,请刷新页面!';
        }
    }
    new Ajax.Request("http://www.jiaxing114.net/Method/Unit/Index/Temp_ResponseHotUnit.aspx",opt);
}

function AjaxLoad_UnitVists(tag)
{
    opt={
	    method:'post',
	    postBody:'a='+tag,
        onSuccess: function(t) {
            $('Vists').innerHTML = "总点击量: "+t.responseText+"人";
            //Effect.BlindDown('blogsDiv', {duration:2});
        },
        onFailure: function(t) {
            $('Vists').innerHTML = '';
        }
    }
    new Ajax.Request("http://www.jiaxing114.net/Method/Unit/Index/Temp_ResponseVists.aspx",opt);
}

function AjaxLoad_Alarm(tag1,tag2)
{
var FromUrl=parent.location.href;
var k=window.showModalDialog("http://www.jiaxing114.net/Method/Unit/Index/Temp_ResponseAlarm.aspx?a="+tag1+"&b="+escape(tag2)+"&FromUrl="+escape(FromUrl)+"&time="+ new Date().getTime(),window,"dialogWidth:600px;status:no;dialogHeight:330px;scroll:no")
}

function AjaxLoad_Huodong(tag)
{
    opt={
	    method:'post',
	    postBody:'a='+tag,
        onSuccess: function(t) {
            $('Huodong').innerHTML = t.responseText;
            //Effect.BlindDown('blogsDiv', {duration:2});
        },
        onFailure: function(t) {
            $('Huodong').innerHTML = '网络故障,请刷新页面!';
        }
    }
    new Ajax.Request("http://www.jiaxing114.net/Method/Unit/Index/Temp_ResponseHuodong.aspx",opt);
}

function AjaxLoad_Photo(tag)
{
    opt={
	    method:'post',
	    postBody:'a='+tag,
        onSuccess: function(t) {
            $('Photo').innerHTML = t.responseText;
            //Effect.BlindDown('blogsDiv', {duration:2});
        },
        onFailure: function(t) {
            $('Photo').innerHTML = '网络故障,请刷新页面!';
        }
    }
    new Ajax.Request("http://www.jiaxing114.net/Method/Unit/Index/Temp_ResponsePhoto.aspx",opt);
}

function UnitDianPingAgreeOrAnti(tag,flag)
{
opt={
	    method:'post',
	    postBody:'c='+flag+'&d='+tag,
        onSuccess: function(t) {
            $('Agree'+tag).innerHTML = t.responseText;
        },
        onFailure: function(t) {
            $('Agree'+tag).innerHTML = '';
        }
    }
    new Ajax.Request("http://www.jiaxing114.net/Method/Unit/Index/Cate_ResponseDianPingAgreeOrAnti.aspx",opt);
}

//0=no, 1=yes
var copytoclip=1

function HighlightAll(theField) {
//alert(1);
var tempval=eval("document."+theField)
tempval.focus()
tempval.select()
if (document.all&&copytoclip==1){
therange=tempval.createTextRange()
therange.execCommand("Copy")
window.status="Contents highlighted and copied to clipboard!"
setTimeout("window.status=''",1800)
}

}