/**
* @author shengliang.yaosl
* 2007-12-06
*/
/*
* 函数说明：对齐左右两列
* 参数：lay1：左侧主；lay2：登陆框高度,lay3：右侧高度,lay4：填补的层的高度
* 时间：2007-11-28 yaosl
*/
function forBalance(lay1,lay2,lay3,lay4){
var referenceHeight,loginHeight,leadHeight;
referenceHeight = 0;
loginHeight = 0;
leadHeight = 0;
if (document.getElementById(lay1)) {
referenceHeight = document.getElementById(lay1).scrollHeight;
}
if (document.getElementById(lay2)) {
loginHeight = document.getElementById(lay2).scrollHeight;
}
if (document.getElementById(lay3)) {
leadHeight = document.getElementById(lay3).scrollHeight;
}
if (referenceHeight > (loginHeight + leadHeight)){
document.getElementById(lay4).style.height = referenceHeight - loginHeight - leadHeight;
}
}
//内容css切换
function overTab(obj){
var oClass = obj.className;
var oClassType = oClass.substring(oClass.length - 1, oClass.length);
switch (oClassType)
{
case "1":
obj.className = "memo_mainover1"
break;
case "2":
obj.className = "memo_mainover2"
break;
case "3":
obj.className = "memo_mainover3"
break;
}
}
function outTab(obj){
var oClass = obj.className;
var oClassType = oClass.substring(oClass.length - 1, oClass.length);
switch (oClassType)
{
case "1":
obj.className = "memo_main1"
break;
case "2":
obj.className = "memo_main2"
break;
case "3":
obj.className = "memo_main3"
break;
}
}
function newCheckAlitalkInstalled()
{
var obj;
try{
obj = new ActiveXObject("AlitalkSetup.Install");
}
catch(e){}
if (null!=obj){
return true;
}
else {
return false;
}
}
function checkId(userId){
//判断浏览者是否安装了贸易通
if (newCheckAlitalkInstalled()){
var d = new Date();
window.location = "Alitalk:SendIM?"+userId+"&url2=http://page.china.alibaba.com/others/feedbackfromalitalk.html?time="+d.getTime()+"#type=bidding_new_talk1";
}else{
//提示安装贸易通
window.target="_blank";
window.open("http://china.alibaba.com/community/turbine/template/community%2CATCPromotionDown");
}
}
