
function topdesign_SubmitContest(pid){var result=confirm("Although you can create as many designs as you like, you are limited to one submission per contest challenge.  You will not be able to edit the design after it is submitted. Press OK to proceed or Cancel to exit.");if(result){document.frmContest.postid.value=pid;document.frmContest.updateFld.value="submitcontest";document.frmContest.action="/main/contest/top_design_user_modify.php";document.frmContest.submit();}}
function doPopup(url,w,h){x='100';y='100';winname='contest';OpWin=window.open(''+url+'',''+winname+'','left='+x+', top='+y+', width='+w+', height='+h+'');}
function topdesign_deletePost(pid){var result=confirm("Are you sure you want to delete this design?");if(result){document.frmContest.postid.value=pid;document.frmContest.updateFld.value="deleteroom";document.frmContest.action="/main/contest/top_design_user_modify.php";document.frmContest.submit();}}
function topdesign_createPost(roomtype){topdesign_Launch_App(0,1,1,roomtype);}
function topdesign_viewPost(serverid,postid,roomtype){topdesign_Launch_App(serverid,postid,3,roomtype);}
function topdesign_editPost(serverid,postid,roomtype){topdesign_Launch_App(serverid,postid,2,roomtype);}
function topdesign_getServer(serverid){switch(serverid){case 2:return"view224.us.cyworld.com";break;case 3:return"view225.us.cyworld.com";break;case 4:return"view226.us.cyworld.com";break;default:return"view22.us.cyworld.com";break;}}
function topdesign_Launch_App(serverid,project_id,mode_id,room_type){var width=0;var height=0;var top=0;var left=0;var screen_width=window.screen.width;var screen_height=window.screen.height;if(mode_id==3){width=754;height=606;}else{width=1026;height=650;}
left=Math.abs(screen_width-width)/2;serverUrl=topdesign_getServer(serverid);var redir='http://'+serverUrl+'/view22/web/designapp/check_sys.jsp?project_id='+project_id+'&mode_id='+mode_id+'&room_type='+room_type;if(window.app_popup&&window.app_popup.open&&!window.app_popup.closed){window.app_popup.focus();}else{app_popup=window.open(redir,'Cyworld','scrollbars=no,resizable=no,status=yes,location=yes,width='+width+',height='+height+',top=0,left='+left);app_popup.opener=window.self;app_popup.opener.name="main_win";app_popup.focus();}}
function ratePost(rating){postid=document.frmRating.postid.value;document.location.href="top_design_main_rating_proc.php?rating="+rating+"&postid="+postid;}
function MM_reloadPage(init){if(init==true)with(navigator){if((appName=="Netscape")&&(parseInt(appVersion)==4)){document.MM_pgW=innerWidth;document.MM_pgH=innerHeight;onresize=MM_reloadPage;}}
else if(innerWidth!=document.MM_pgW||innerHeight!=document.MM_pgH)location.reload();}
MM_reloadPage(true);function MM_swapImgRestore(){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_preloadImages(){var d=document;if(d.images){if(!d.MM_p)d.MM_p=new Array();var i,j=d.MM_p.length,a=MM_preloadImages.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_findObj(n,d){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(){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 swapImgRestoreAll(){document.getElementById('star1').src="http://img.us.cyworld.com/image/icon/icon_star_off.gif";document.getElementById('star2').src="http://img.us.cyworld.com/image/icon/icon_star_off.gif";document.getElementById('star3').src="http://img.us.cyworld.com/image/icon/icon_star_off.gif";document.getElementById('star4').src="http://img.us.cyworld.com/image/icon/icon_star_off.gif";document.getElementById('star5').src="http://img.us.cyworld.com/image/icon/icon_star_off.gif";}
loadingFlag=true;createObject('lrgarrowlefton','http://img.us.cyworld.com/image/common/lrg_arrow_left_on.gif');createObject('lrgarrowleftoff','http://img.us.cyworld.com/image/common/lrg_arrow_left_off.gif');createObject('lrgarrowrighton','http://img.us.cyworld.com/image/common/lrg_arrow_right_on.gif');createObject('lrgarrowrightoff','http://img.us.cyworld.com/image/common/lrg_arrow_right_off.gif');createObject('btnsubmitconteston','http://img.us.cyworld.com/image/common/btnor_submitcontest_on.gif');createObject('btnsubmitcontestoff','http://img.us.cyworld.com/image/common/btnor_submitcontest_off.gif');createObject('btneditdesignon','http://img.us.cyworld.com/image/common/btnpale_edit_TD_on.gif');createObject('btneditdesignoff','http://img.us.cyworld.com/image/common/btnpale_edit_TD_off.gif');createObject('btndeletedesignon','http://img.us.cyworld.com/image/common/btnpale_delete_TD_on.gif');createObject('btndeletedesignoff','http://img.us.cyworld.com/image/common/btnpale_delete_TD_off.gif');createObject('btnsharedesignon','http://img.us.cyworld.com/image/common/btn_sharewfriends_on.gif');createObject('btnsharedesignoff','http://img.us.cyworld.com/image/common/btn_sharewfriends_off.gif');createObject('btnview3Ddesignon','http://img.us.cyworld.com/image/common/btnor_view_TD_on.gif');createObject('btnview3Ddesignoff','http://img.us.cyworld.com/image/common/btnor_view_TD_off.gif');createObject('btnpaleviewdesignon','http://img.us.cyworld.com/image/common/btn_view_TD_on.gif');createObject('btnpaleviewdesignoff','http://img.us.cyworld.com/image/common/btn_view_TD_off.gif');createObject('btncontestinfoon','http://img.us.cyworld.com/image/common/btnpale_contest_info_on.gif');createObject('btncontestinfooff','http://img.us.cyworld.com/image/common/btnpale_contest_info_off.gif');createObject('btnmydesignsoff','http://img.us.cyworld.com/image/common/btnpale_my_designs_off.gif');createObject('btnmydesignson','http://img.us.cyworld.com/image/common/btnpale_my_designs_on.gif');createObject('btnbacktoconteston','http://img.us.cyworld.com/image/common/btnpale_back_to_contest_on.gif');createObject('btnbacktocontestoff','http://img.us.cyworld.com/image/common/btnpale_back_to_contest_off.gif');createObject('btnviewtopon','http://img.us.cyworld.com/image/common/btnpale_view_top_on.gif');createObject('btnviewtopoff','http://img.us.cyworld.com/image/common/btnpale_view_top_off.gif');createObject('btnnew3Ddesignon','http://img.us.cyworld.com/image/common/btnpale_create3Ddesign_on.gif');createObject('btnnew3Ddesignoff','http://img.us.cyworld.com/image/common/btnpale_create3Ddesign_off.gif');createObject('btngotoTDclubon','http://img.us.cyworld.com/image/common/btn_gotoTDclub_on.gif');createObject('btngotoTDcluboff','http://img.us.cyworld.com/image/common/btn_gotoTDclub_off.gif');createObject('btnsendtoTDclubon','http://img.us.cyworld.com/image/common/btn_sendtoTDclub_on.gif');createObject('btnsendtoTDcluboff','http://img.us.cyworld.com/image/common/btn_sendtoTDclub_off.gif');createObject('btnviewwinnersoff','http://img.us.cyworld.com/image/common/btnpale_view_winner_off.gif');createObject('btnviewwinnerson','http://img.us.cyworld.com/image/common/btnpale_view_winner_on.gif');createObject('navmainoff','http://img.us.cyworld.com/image/common/menu_main_off.gif');createObject('navmainon','http://img.us.cyworld.com/image/common/menu_main_on.gif');createObject('navpeopleoff','http://img.us.cyworld.com/image/common/menu_people_off.gif');createObject('navpeopleon','http://img.us.cyworld.com/image/common/menu_people_on.gif');createObject('navclubsoff','http://img.us.cyworld.com/image/common/menu_clubs_off.gif');createObject('navclubson','http://img.us.cyworld.com/image/common/menu_clubs_on.gif');createObject('navshopoff','http://img.us.cyworld.com/image/common/menu_shop_off.gif');createObject('navshopon','http://img.us.cyworld.com/image/common/menu_shop_on.gif');createObject('navmycyworldoff','http://img.us.cyworld.com/image/button/menu_mycyworld_off.gif');createObject('navmycyworldon','http://img.us.cyworld.com/image/button/menu_mycyworld_on.gif');createObject('navplazaon','http://img.us.cyworld.com/image/button/menu_plaza_beta_on.gif');createObject('navplazaoff','http://img.us.cyworld.com/image/button/menu_plaza_beta_off.gif');createObject('btnmyminihomeoff','http://img.us.cyworld.com/image/common/btn_my_minihome_off.gif');createObject('btnmyminihomeon','http://img.us.cyworld.com/image/common/btn_my_minihome_on.gif');createObject('btnsearchnavoff','http://img.us.cyworld.com/image/common/btn_search_off.gif');createObject('btnsearchnavon','http://img.us.cyworld.com/image/common/btn_search_on.gif');createObject('btnhelpnavoff','http://img.us.cyworld.com/image/common/btn_help_off.gif');createObject('btnhelpnavon','http://img.us.cyworld.com/image/common/btn_help_on.gif');createObject('btnlogoutoff','http://img.us.cyworld.com/image/button/btn_logout_off.gif');createObject('btnlogouton','http://img.us.cyworld.com/image/button/btn_logout_on.gif');createObject('btnlogingooff','http://img.us.cyworld.com/image/common/btn_logingo_off.gif');createObject('btnlogingoon','http://img.us.cyworld.com/image/common/btn_logingo_on.gif');createObject('smlmoreoff','http://img.us.cyworld.com/image/common/btn_more_sml_off.gif');createObject('smlmoreon','http://img.us.cyworld.com/image/common/btn_more_sml_on.gif');loadingFlag=false;preloadFlag=true;