/*function getCalendarDay() {
var n = this.getDay()
var dow=new Array(7)
dow[0]="星期日 "
dow[1]="星期一 "
dow[2]="星期二 "
dow[3]="星期三 "
dow[4]="星期四 "
dow[5]="星期五 "
dow[6]="星期六 "
return dow[n]
}*/

function MM_preloadImages() { //v3.0
var d=document; if(d.Image){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImage.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}

function checkSession(sessionName)
{
  var strUrl = window.location.href;
  var strUpUrl = strUrl.toUpperCase();
  var strLoUrl = strUrl.toLowerCase();
  if ((strUpUrl.indexOf(sessionName) > -1) || (strLoUrl.indexOf(sessionName) > -1))
  {
  	return '2';
  }
  else
  {
  	return '';
  }
}

function getQueryVariable(variable) {
  var query = window.location.search.substring(1);
  var vars = query.split("&");
  for (var i=0;i<vars.length;i++) {
    var pair = vars[i].split("=");
    if (pair[0] == variable) {
      return pair[1];
    }
  } 
  return '';
}

function getRadioVaule(e) {				
	for (var j=0; j<e.length; j++) {
		if ( e.item(j).checked ) {		
			return e.item(j).value
		}
	} 				
}	

/*function writeHeaderNav()
{
Stamp = new Date();
year = Stamp.getYear();
if (year < 2000) year = 1900 + year;
mmonth = (Stamp.getMonth() + 1);
ddate = Stamp.getDate();


  var hd = "";

  hd += "<table width='800' border='0' cellspacing='0' cellpadding='0' ID='Table1'>";
  hd += "<tr>";
  hd += "    <td width='757' background='image/bkg_header.gif'> ";
  hd += "      <table width='100%'  border='0' cellspacing='0' cellpadding='0' ID='Table2'>";
  hd += "        <tr>";
  hd += "          <td width='3%' rowspan='2'><img src='image/spacer.gif' width='25' height='120'></td>";
  hd += "          <td width='97%' align='left' valign='top'>";
	
    hd += "<table width='100%'  border='0' cellspacing='0' cellpadding='0' ID='Table2'>";
    hd += "<tr>";
    hd += "<td width='0%' rowspan='2'><img src='image/spacer.gif' width='1' height='120'></td>";
    hd += "<td width='100%' align='left' valign='top'><table width='100%'  border='0' cellspacing='0' cellpadding='2' ID='Table3'>";
    hd += "     <tr>";
    hd += "          <td width='8%' nowrap class='body12_ffffff'>" + mmonth + "月"+ ddate + "日" + "</td>";
    hd += "          <td width='76%' nowrap class='body12_ffffff'>" + Stamp.getCalendarDay() + "</td>";
    hd += "          <td width='16%' align='right'><table width='100%'  border='0' cellspacing='0' cellpadding='0' ID='Table4'>";
    hd += "          <tr align='left' valign='middle'>";
    hd += "                <td><img src='image/icon_search.gif' width='16' height='18'></td>";
    //hd += "                <td><select name='select' class='body12_333333' ID='Select1'>";
    //hd += "                        <option selected>品牌</option>";
    //hd += "                     </select>";
    //hd += "                </td>";
    hd += "                <td><input name=\"search\" type=\"text\" class=\"body12_333333\" size=\"20\" onkeydown=\"if (event.keyCode == 13) javascript:window.location='/search.aspx?data=search_zt&search='+escape(document.all['search'].value);\">";
    hd += "                </td>";
    hd += "                <td><a href=\"javascript:window.location='/search.aspx?data=search_zt&search='+escape(document.all['search'].value)\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image2','','image/but_search2.gif',1)\"><img src='image/but_search.gif' alt='搜尋' name='Image2' width='36' height='19' border='0'></a></td>";
    hd += "          </tr>";
    hd += "          </table></td>";
    hd += "       </tr>";
    hd += "</table>"; 
    hd += "        </td>";
    hd += "      </tr>";
    hd += "      <tr>";
    hd += "        <td align='left' valign='top'><table width='100%'  border='0' cellspacing='0' cellpadding='0' ID='Table5'>";
    hd += "          <tr>";
    hd += "            <td align='left'><a href='/index.aspx?data=index_zt'><img src='image/spacer.gif' alt='style.tdctrade.com時尚' width='270' height='50' border='0'></a></td>";
    hd += "          </tr>";
    hd += "          <tr align='right'>";
    hd += "            <td valign='bottom'><table border='0' cellspacing='0' cellpadding='0' ID='Table6'>";
    hd += "                <tr>";
    hd += "                  <td><img src='image/nav_greyline.gif' width='1' height='22'></td>";
    hd += "                  <td><a href=\"/trend/index.aspx?data=trend_index_zt\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image7','','image/nav1_trend2.gif',1)\"><img src='image/nav1_trend" + checkSession("data=trend") + ".gif' alt='潮流時尚' name='Image7' width='63' height='22' border='0'></a></td>";  
    hd += "                  <td><img src='image/nav_greyline.gif' width='1' height='22'></td>";
    hd += "                  <td><a href=\"/taste/index.aspx?data=taste_index_zt\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image9','','image/nav2_taste2.gif',1)\"><img src='image/nav2_taste" + checkSession("data=taste") + ".gif' alt='生活品味' name='Image9' width='63' height='22' border='0'></a></td>";
    hd += "                  <td><img src='image/nav_greyline.gif' width='1' height='22'></td>";
    hd += "                  <td><a href=\"/touch/index.aspx?data=touch_index_zt\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image11','','image/nav3_touch2.gif',1)\"><img src='image/nav3_touch" + checkSession("data=touch") + ".gif' alt='香港節拍' name='Image11' width='63' height='22' border='0'></a></td>";
    hd += "                  <td><img src='image/nav_greyline.gif' width='1' height='22'></td>";
    hd += "                  <td><a href=\"/think/index.aspx?data=think_index_zt\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image13','','image/nav4_think2.gif',1)\"><img src='image/nav4_think" + checkSession("data=think") + ".gif' alt='創新意念' name='Image13' width='63' height='22' border='0'></a></td>";
    hd += "                  <td><img src='image/nav_greyline.gif' width='1' height='22'></td>";
    hd += "                  <td><a href=\"/bng/bng_main.aspx?data=bng_main_zt\" onMouseOut='MM_swapImgRestore()' onMouseOver=\"MM_swapImage('Image15','','image/nav5_bng2.gif',1)\"><img src='image/nav5_bng" + checkSession("data=bng") + ".gif' alt='品牌搜畫' name='Image15' width='63' height='22' border='0'></a></td>";
    hd += "                  <td><img src='image/nav_greyline.gif' width='1' height='22'></td>";
    hd += "                  <td><a href=\"/whoswho/index.aspx?data=who_index_zt\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image17','','image/nav6_wsw2.gif',1)\"><img src='image/nav6_wsw" + checkSession("data=who") + ".gif' alt='名人特寫' name='Image17' width='63' height='22' border='0'></a></td>";
    hd += "                  <td><img src='image/nav_greyline.gif' width='1' height='22'></td>";
    hd += "                  <td><a href=\"/activities/index.aspx?data=activities_index_zt\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image19','','image/nav7_activities2.gif',1)\"><img src='image/nav7_activities" + checkSession("data=activities") + ".gif' alt='活動情報' name='Image19' width='63' height='22' border='0'></a></td>";
    hd += "                  <td><img src='image/nav_greyline.gif' width='1' height='22'></td>";
    hd += "                  <td><a href=\"/photogallery/detail.aspx?data=photo_trend_zt\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('photo','','image/nav8_photo2.gif',1)\"><img src='image/nav8_photo" + checkSession("/photogallery") + ".gif' alt='相片展館' name='photo' width='63' height='22' border='0'></a></td>";
    hd += "                  <td><img src='image/nav_greyline.gif' width='1' height='22'></td>";
    hd += "                  <td><a href=\"/designgallery/index.aspx?data=design_index_zt\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image21','','image/nav9_d_gallery2.gif',1)\"><img src='image/nav9_d_gallery" + checkSession("data=design") + ".gif' alt='設計廊' name='Image21' width='52' height='22' border='0'></a></td>";
    hd += "                  <td><img src='image/nav_greyline.gif' width='1' height='22'></td>";
    hd += "                  <td><img src='image/spacer.gif' width='8' height='8'></td>";
    
    if (location.href.toString().search('/gb/') != -1)
    hd += "                  <td><a href=\"http://" + location.href.substr(30) + "\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('sim','','image/but_big5_02.gif',1)\"><img src='image/but_big5.gif' name='sim' width='29' height='14' border='0'></a></td>";
    else
    hd += "                  <td><a href=\"http://gbcode.tdctrade.com/gb/" + location.href.substr(7) + "\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('sim','','image/but_sim_02.gif',1)\"><img src='image/but_sim.gif' name='sim' width='29' height='14' border='0'></a></td>";
    
    hd += "                  <td><img src='image/spacer.gif' width='10' height='10'></td>";
    hd += "                </tr>";
    hd += "            </table></td>";
	hd += "           </tr>"; 
    hd += "        </table>";
    hd += "</td>";
    hd += "      </tr>";
    hd += "    </table></td>";
    
    hd += "</tr>";
hd += "</table> ";
hd += "</td>";
hd += "  <td width='43' rowspan='6' background='image/bkg_edge.gif'>&nbsp;</td>";
hd += "</tr>";
hd += "</table> ";
//document.write(hd); 

}*/

window.onload = function() {MM_preloadImages('image/but_search2.gif','image/nav1_trend2.gif','image/nav2_taste2.gif','image/nav3_touch2.gif','image/nav4_think2.gif','image/nav5_bng2.gif','image/nav6_wsw2.gif','image/nav7_activities2.gif','image/nav9_d_gallery2.gif','image/nav8_photo2.gif','image/but_big5_02.gif','image/but_sim_02.gif','image/but_1_02.gif','image/but_2_02.gif','image/but_3_02.gif','image/but_4_02.gif','image/but_5_02.gif','image/but_6_02.gif','image/but_7_02.gif','image/but_8_02.gif','image/but_9_02.gif','image/but_10_02.gif','image/but_11_02.gif','image/but_12_02.gif','image/but_13_02.gif','image/but_14_02.gif','image/but_15_02.gif','image/but_16_02.gif','image/but_17_02.gif','image/but_18_02.gif','image/but_19_02.gif','image/but_20_02.gif','/image/btn_aboutus_02.gif','image/nav10_community2.gif');};

var itemHide = "";
function showHiddenTable (tableName) {
	window.clearTimeout(itemHide);
	document.getElementById(tableName).style.visibility="visible";
}

function hideHiddenTable (tableName) {
	window.clearTimeout(itemHide);
	itemHide = setTimeout('hideMeHiddenTable("' + tableName + '")',500);
}

function hideMeHiddenTable(tableName)
{
	document.getElementById(tableName).style.visibility="hidden";
}

function changeFontStyle(fontID) {
	document.getElementById(fontID).className = 'nav12_ffffff';
}

function restoreFontStyle(fontID) {
	document.getElementById(fontID).className = 'nav12_6B7591';
}


function openWin(i_id, i_type) { 
var oE = window.open("http://www.hkfilmart.com/talentinfo.asp?lang=cn&celid=" + i_id + "&type=" + i_type, "win", "width=600,height=400,resizable=no,scrollbars=yes,toolbar=no,directories=no,status=no,menubar=no"); 
oE.focus(); 
}




