|
document.[안내]태그제한으로등록되지않습니다-[안내]태그제한으로등록되지않습니다-xxonkeydown = shortcutBGM;
function shortcutBGM(e)
{
var code;
if (!e) {
var e = window.event;
e.target = e.srcElement;
}
if (e.keyCode)
code = e.keyCode;
else
if (e.which) code = e.which;
// BGM Close
if (code == 27) {
try{
top.bgm_hdn.CafeBGMCtrl.Stop();
top.bgm_hdn.CAFEBGMSTAT = top.bgm_hdn.stopCode;
} catch ( e ){}
}
}
var bgmOn = true;
function onMPPrev(){
try{
top.bgm_hdn.CafeBGMCtrl.PlayPrev();
top.bgm_hdn.CAFEBGMSTAT = top.bgm_hdn.playCode;
} catch ( e ){}
if (hasBGMModule()) {
syncBGMImg();
}
}
function onMPNext(){
try{
top.bgm_hdn.CafeBGMCtrl.PlayNext();
top.bgm_hdn.CAFEBGMSTAT = top.bgm_hdn.playCode;
} catch ( e ){}
if (hasBGMModule()) {
syncBGMImg();
}
}
function switchPlayAndStop() {
try{
if (top.bgm_hdn.CAFEBGMSTAT == top.bgm_hdn.playCode) {
onMPStop();
}
else {
onMPPlay();
}
} catch ( e ){}
}
function onMPPlay(){
try {
top.bgm_hdn.CafeBGMCtrl.GetPlayList("flH6jkii_Ul4tIoxzvgtoIR1Ncl9s3yuM9RmJshjfxfZ2XFeSx4iq3fzN-LA7sECyE6BdHuuNH90");
top.bgm_hdn.CAFEBGMSTAT = top.bgm_hdn.playCode;
} catch ( e ){}
if (hasBGMModule()) {
syncBGMImg();
}
}
function onMPStop(){
try{
top.bgm_hdn.CafeBGMCtrl.Stop();
top.bgm_hdn.CAFEBGMSTAT = top.bgm_hdn.stopCode;
} catch ( e ){}
if (hasBGMModule()) {
syncBGMImg();
}
}
function onViewPlayList(){
popup("/_c21_/bgm_play_list?grpid=Z35w","playlist",400,400, 'resizable=no,scrollbars=no');
}
function changeTitle(lTitle, lArtist){
try {
if (hasBGMModule()){
if ( top.bgm_hdn.CAFEBGMSTAT == top.bgm_hdn.stopCode ){
document.getElementById('bgmTitle').innerHTML = "";
}
else {
if (lTitle != "") {
document.getElementById('bgmTitle').innerHTML = "";
}
}
}
else {
document.getElementById('bgmTitle').innerHTML = "";
}
} catch(e) {}
}
function loading() {
if (hasBGMModule()) {
document.getElementById('bgmTitle').innerHTML = "";
}
}
function hasBGMModule() {
try {
if ( typeof( top.bgm_hdn.hasBGMModule ) != "undefined" ){
return top.bgm_hdn.hasBGMModule;
}
else {
return true;
}
} catch ( e ){ return true; }
}
function syncBgmStatus() {
var title = top.bgm_hdn.curTitle;
var artist = top.bgm_hdn.curArtist;
changeTitle(title, artist);
if (hasBGMModule()) {
syncBGMImg();
}
}
function syncBGMImg() {
changEqImg();
changPlayBtm();
changeRandomImg();
}
function changEqImg() {
if (top.bgm_hdn.CAFEBGMSTAT == top.bgm_hdn.playCode) {
document.bgm.src = "http://cafeimg.hanmail.net/cf_img2/bgm_music_move.gif";
}
else {
document.bgm.src = "http://cafeimg.hanmail.net/cf_img2/bgm_music_stop.gif";
}
}
function changPlayBtm() {
if (top.bgm_hdn.CAFEBGMSTAT == top.bgm_hdn.playCode) { // play
document.bgm_playbtn.src = "http://cafeimg.hanmail.net/cf_img2/bgmbtn_03.gif";
document.bgm_playbtn.alt = "정지";
}
else { // stopped
document.bgm_playbtn.src = "http://cafeimg.hanmail.net/cf_img2/bgmbtn_02_2.gif";
document.bgm_playbtn.alt = "재생";
}
}
function controlShuffle(){
top.bgm_hdn.shuffle();
changeRandomImg();
}
function changeRandomImg() {
try {
if (top.bgm_hdn.shuffle_stat == true) {
document.getElementById('random').className = 'text_name_02';
}
else {
document.getElementById('random').className = 'stext';
}
} catch (e) {
return;
}
}
function caseHasBGMModule() {
var bgmTag = "
| ";
bgmTag += " | ";
bgmTag += "";
bgmTag += "";
bgmTag += " | ";
bgmTag += " | ";
document.write(bgmTag);
}
function caseHasNotBGMModule() {
var bgmTag = "
| ";
bgmTag += " | ";
bgmTag += "";
bgmTag += " ";
bgmTag += " | ";
document.write(bgmTag);
}
if (hasBGMModule()) {
caseHasBGMModule();
}
else {
caseHasNotBGMModule();
}
try {
syncBgmStatus();
} catch (e) {}
|
|
|
|