/* ž¸Þ´º */
var total_tmn = "04" //ÃÑ Å¾¸Þ´º °¹¼ö
function tmnu_on(x,y) { //x:·Ñ¿À¹ö¸Þ´º, y:ÇöÀç¼±Åø޴º
var z01 = x + 1;
var z02 = y +1;
ximg = eval("document.all.tmi0"+x);
ximg.src = "/img/join_site/paran/header/tmnu_0"+x+"on.gif";
if(x!=1) eval("document.all.tm0"+x).className = "tmnu_on";
if(x!=total_tmn) eval("document.all.tm0"+z01).className = "tmnu_on";
yimg = eval("document.all.tmi0"+y);
yimg.src = "/img/join_site/paran/header/tmnu_0"+y+"off.gif";
if(y!=1) {
if(z01!=y) eval("document.all.tm0"+y).className = "tmnu";
}
if(y!=total_tmn) {
if(z02!=x) eval("document.all.tm0"+z02).className = "tmnu";
}
}
function tmnu_off(x,y) { //x:·Ñ¿À¹ö¸Þ´º, y:ÇöÀç¼±Åø޴º
var z01 = x +1;
var z02 = y +1;
ximg = eval("document.all.tmi0"+x);
ximg.src = "/img/join_site/paran/header/tmnu_0"+x+"off.gif";
if(x!=1) eval("document.all.tm0"+x).className = "tmnu";
if(x!=total_tmn) eval("document.all.tm0"+z01).className = "tmnu"
yimg = eval("document.all.tmi0"+y);
yimg.src = "/img/join_site/paran/header/tmnu_0"+y+"on.gif";
if(y!=1) eval("document.all.tm0"+y).className = "tmnu_on";
if(y!=total_tmn) eval("document.all.tm0"+z02).className = "tmnu_on";
}
/* line height px */
function main_line() {
var gab_right;
main_contentsEl = document.getElementById("main_contents");
main_leftEl = document.getElementById("main_left");
main_centerEl = document.getElementById("main_center");
main_rightEl = document.getElementById("main_right");
main_rightEl02 = document.getElementById("cr02");
if (main_centerEl.offsetHeight < main_rightEl.offsetHeight && main_leftEl.offsetHeight < main_rightEl.offsetHeight) {
main_contentsEl.style.height = main_rightEl.offsetHeight + "px";
}
else if (main_leftEl.offsetHeight > main_centerEl.offsetHeight) {
main_contentsEl.style.height = main_leftEl.offsetHeight + "px";
gab_right = main_leftEl.offsetHeight- main_rightEl.offsetHeight;
gab_right = gab_right + main_rightEl02.offsetHeight;
main_rightEl02.style.height = gab_right + "px";
} else {
main_contentsEl.style.height = main_centerEl.offsetHeight + "px";
gab_right = main_centerEl.offsetHeight - main_rightEl.offsetHeight;
gab_right = gab_right + main_rightEl02.offsetHeight;
main_rightEl02.style.height = gab_right + "px";
}
}
/************************************************ ÆÄ¶õ¸ÞÀÎ_º¸Çè¸ÞÀÎ Àü¹®°¡Ãßõ/°í°´¿ì¼ö/ÃÖ´Ù¼³°è ½ºÅ©¸³Æ® ½ÃÀÛ ************************************************/
var TopMenuOn = '01';
var TopMenuOff = '01';
var searchNode = 'TOTAL';
var parnXmlHttp;
var cprSpecXml; //Àü¹®°¡Ãßõ
var cprCustXml; //°í°´¿ì¼ö
var cprPlanXml; //ÃÖ´Ù¼³°è
var cprBestDoc;
var cprCommXml;
var market_menu = new Array(new Array("TOTAL","Àüü"),
new Array("D01","ÀÇ·á½Çºñ"),
new Array("D02","°Ç°/Á¾ÇÕ"),
new Array("D03","¾Ï"),
new Array("D04","žÆ/¾î¸°ÀÌ"),
new Array("D05","½Ç¹ö"),
new Array("D06","Á¾½Å/Á¤±â"),
new Array("D07","º¯¾×"),
new Array("D08","¿¬±Ý"));
/* ¼ýÀÚ µÎÀÚ¸® ¸ÂÃß±â */
function setNumberChar(num){
if(eval(num) < 10) return "0"+num;
else return num;
}
/* topMenu Img Seq */
function topMenuSelect(num)
{
if(topMenuSelect.arguments[0] != undefined){
TopMenuOff = TopMenuOn;
TopMenuOn = setNumberChar(num);
}
if(topMenuSelect.arguments[1] == undefined){
getBestRank();
}
selecetImgSRC();
}
/* subMenu change */
function getBestCurrMenu(targetMarket){
var writeMenu = '';
var thisMenuName = '';
if(targetMarket) searchNode = targetMarket;
writeMenu += "
\n";
for(i=0;i \n";
writeMenu += " \n";
writeMenu += " \n";
writeMenu += " | \n";
writeMenu += "  | \n";
writeMenu += " "+thisMenuName+" | \n";
writeMenu += "  | \n";
writeMenu += " | \n";
writeMenu += "
\n";
writeMenu += "
\n";
writeMenu += " \n";
}else{
writeMenu += ""+market_menu[i][1]+" | \n";
if(i != market_menu.length-1 && market_menu[i+1][0] != targetMarket ){
writeMenu += "¤Ó | \n";
}
}
}
writeMenu += "
\n";
paranBestMenu.innerHTML = '';
paranBestMenu.innerHTML = writeMenu;
seachNodeFnc(targetMarket);
}
/* load menu of xml */
function getBestRank(targetMarket){
var makeMarket = '';
if(TopMenuOn == '02'){
if(cprCustXml == undefined){
cprCustXml = new ActiveXObject("Microsoft.XMLDOM");
cprCustXml.async = false;
cprCustXml.load("/common/include_file/insvalley/xml/rank_cust.xml");
}
cprCommXml = cprCustXml;
}
else if(TopMenuOn == '03'){
if(cprPlanXml == undefined){
cprPlanXml = new ActiveXObject("Microsoft.XMLDOM");
cprPlanXml.async = false;
cprPlanXml.load("/common/include_file/insvalley/xml/rank_plan.xml");
}
cprCommXml = cprPlanXml;
}
else{
if(cprSpecXml == undefined){
cprSpecXml = new ActiveXObject("Microsoft.XMLDOM");
cprSpecXml.async = false;
cprSpecXml.load("/common/include_file/insvalley/xml/rank_spec.xml");
}
cprCommXml = cprSpecXml;
}
getBestCurrMenu(targetMarket);
}
/* menu ON/OFF */
function selecetImgSRC(imgSelect){
var imgSRC;
var imgOn;
var imgOff;
var selectInt;
var imgArray = new Array(new Array("document.topImg","/img/join_site/paran/main/thema_mnu"),
new Array("document.subImg","/img/join_site/paran/main/thema_mnu01_"));
selectInt = 0; // ¹è¿ ã±â
imgOn = TopMenuOn; //¸Þ´º on img
imgOff = TopMenuOff; //¸Þ´º Off img
imgSRC = eval(imgArray[selectInt][0]+imgOn);
imgSRC.src = imgArray[selectInt][1]+imgOn+"on.gif";
if(imgOn != "03"){
imgSRC = eval(imgArray[selectInt][0]+imgOn+"_sub");
imgSRC.src= "/img/join_site/paran/main/thema_mnu01_line_on.gif";
}
if(imgOn != imgOff){
imgSRC = eval(imgArray[selectInt][0]+imgOff);
imgSRC.src= imgArray[selectInt][1]+imgOff+"off.gif";
if(imgOff != "03"){
imgSRC = eval(imgArray[selectInt][0]+imgOff+"_sub");
imgSRC.src= "/img/join_site/paran/main/thema_mnu01_line_off.gif";
}
}
}
/* paranRankArea ¿µ¿ª »ý¼º */
function seachNodeFnc(){
var currNode;
var attachTbody = '';
var pathAccessCD = new Array("PLA_20070103001","PLA_20070103002","PLA_20070103003");
currNode = cprCommXml.selectNodes("//MAIN_GALLERY/*");
attachTbody += " \n";
for(i=0;i| | ";
}
}
break;
}
}
attachTbody += "
";
paranRankArea.innerHTML = attachTbody;
}
/* ¸Þ´º ROW Ãß°¡ */
function createRow(getNode,accesspointCD) {
var nodeObject = new Object();
for(i=0;i \n";
addTR += " +".gif) | \n";
addTR += " "+nodeObject["group_product_name"]+" ["+nodeObject["company_name"]+"] | \n";
if(nodeObject["tot_premium_m"] != '' && nodeObject["sex_name"] == '³²'){
addTR += " "+nodeObject["tot_premium_m"]+"¿ø  | \n";
}else if(nodeObject["tot_premium_f"] != '' && nodeObject["sex_name"] == '¿©'){
addTR += " "+nodeObject["tot_premium_f"]+"¿ø  | \n";
}else{
addTR += " | \n";
}
if(nodeObject["opinion_content"] != ''){
if(nodeObject["opinion_content"].length > 26)
addTR += " "+nodeObject["opinion_content"].substring(0,25)+"... | \n";
else
addTR += " "+nodeObject["opinion_content"]+" | \n";
}else{
addTR += " | \n";
}
if(nodeObject["benefit_img"]!=''){
addTR += "  | \n";
}else{
addTR += " | \n";
}
addTR += " \n";
if(getNode[0].parentNode.getAttribute("rank") != 3){
addTR += " |
\n";
}
return addTR;
/* var addTR = '';
var goodsPath = "/goods/comm/goods_200.jsp?group_product_cd="+getNode[7].firstChild.nodeValue+"&market_point_cd="+accesspointCD;
addTR += " \n";
addTR += " +".gif) | \n";
addTR += " "+getNode[8].firstChild.nodeValue+" ["+getNode[10].firstChild.nodeValue+"] | \n";
if(getNode[15] && getNode[15].firstChild){
addTR += " "+getNode[15].firstChild.nodeValue+"¿ø  | \n";
}else{
addTR += " | \n";
}
if(getNode[19] && getNode[19].firstChild){
if(getNode[19].firstChild.nodeValue.length > 26)
addTR += " "+getNode[19].firstChild.nodeValue.substring(0,25)+"... | \n";
else
addTR += " "+getNode[19].firstChild.nodeValue+" | \n";
}else{
addTR += " | \n";
}
if(getNode[16] && getNode[16].firstChild){
addTR += "  | \n";
}else{
addTR += " | \n";
}
addTR += "
\n";
if(getNode[0].parentNode.getAttribute("rank") != 3){
addTR += " |
\n";
}
return addTR; */
}
/* º¸Çè¸ÞÀÎ Àü¹®°¡Ãßõ/°¡À帹ÀÌ ÆÇ¸ÅµÈº¸Çè/ÃÖ´Ù¼³°èº¸Çè µ¥ÀÌÅÍ °¡Á®¿À±â */
function doGoBest(selectStr){
cprBestDoc = new ActiveXObject("Microsoft.XMLDOM");
cprBestDoc.async = false;
cprBestDoc.load("/join_site/layout/paran/shop_totRank.xsl");
if(selectStr == "SPECIAL"){
if(cprSpecXml == undefined){
cprSpecXml = new ActiveXObject("Microsoft.XMLDOM");
cprSpecXml.async = false;
cprSpecXml.load("/common/include_file/insvalley/xml/rank_spec.xml");
}
BestRank.innerHTML = cprSpecXml.documentElement.transformNode(cprBestDoc);
}else if(selectStr == "CUSTOM"){
if(cprCustXml == undefined){
cprCustXml = new ActiveXObject("Microsoft.XMLDOM");
cprCustXml.async = false;
cprCustXml.load("/common/include_file/insvalley/xml/rank_cust.xml");
}
BestRank.innerHTML = cprCustXml.documentElement.transformNode(cprBestDoc);
}else if(selectStr == "PLAN"){
if(cprPlanXml == undefined){
cprPlanXml = new ActiveXObject("Microsoft.XMLDOM");
cprPlanXml.async = false;
cprPlanXml.load("/common/include_file/insvalley/xml/rank_plan.xml");
}
BestRank.innerHTML = cprPlanXml.documentElement.transformNode(cprBestDoc);
}
}
/* º¸Çè¸ÞÀÎ °í°´¿ì¼ö ¸Þ´º */
var customMon = "01";
var customMoff = "01";
function goCustomRank(index){
customMoff = customMon;
customMon = setNumberChar(index);
elem = document.getElementById("custom"+customMon);
elem.className = "customMenu";
if(customMon != customMoff){
elem = document.getElementById("custom"+customMoff);
elem.className = "";
}
}
function shopCustomGet(selectStr){
if (window.ActiveXObject) {
parnXmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
else if (window.XMLHttpRequest) {
parnXmlHttp = new XMLHttpRequest();
}
var url = "/join_site/layout/paran/shop_main_custom.jsp?gubun="+selectStr;
parnXmlHttp.open("GET", url, true);
parnXmlHttp.onreadystatechange = shopStartCallBack;
parnXmlHttp.send(null);
}
function shopStartCallBack() {
if (parnXmlHttp.readyState == 4) {
if (parnXmlHttp.status == 200){
customMenuDIV.innerHTML = parnXmlHttp.responseText;
}
}
}
/************************************************ ÆÄ¶õ¸ÞÀÎ_º¸Çè¸ÞÀÎ Àü¹®°¡Ãßõ/°í°´¿ì¼ö/ÃÖ´Ù¼³°è ½ºÅ©¸³Æ® ³¡ ************************************************/
/*ȸ»çº° ¼±ÅÃ*/
function companyListMenu(option){
if(option == 'on'){
if(document.getElementById('select_comp').style.display == 'none'){
document.getElementById('select_comp').style.display = 'block';
}else{
document.getElementById('select_comp').style.display = 'none';
}
if(document.getElementById('select_market').style.display == 'block'){
document.getElementById('select_market').style.display = 'none';
}
}else if(option == 'off'){
document.getElementById('select_comp').style.display = 'none';
}
}
/*Á¾·ùº° ¼±ÅÃ*/
function marketListMenu(option){
if(option == 'on'){
if(document.getElementById('select_market').style.display == 'none'){
document.getElementById('select_market').style.display = 'block';
}else{
document.getElementById('select_market').style.display = 'none';
}
if(document.getElementById('select_comp').style.display == 'block'){
document.getElementById('select_comp').style.display = 'none';
}
}else if(option == 'off'){
document.getElementById('select_market').style.display = 'none';
}
}