//Don't access this frame directly.
function my_frame(){
if (parent.frames.length == 0){
alert("Go To Top");
top.location.href="http://kashu-navi.com/tw/";
}}

//Check cookie exactly.
function cook_check(){
if (window.navigator.cookieEnabled) {
	return true;
}
else {
	window.location.href = "alert.html";
        return false;
}
}

//New window settings.
function vote(){
window.open("ranking_w.html","name","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,Width=455,Height=220");
}

//1hour settings.(artist)

function sav_cook() {
coknam = "artistjs";
coktxt = document.airtist.run.value;
day0 = new Date();
day0.setTime(day0.getTime()+60*60*1000);
endday = day0.toGMTString();
document.cookie = coknam+"="+escape(coktxt)+";expires="+endday;
}

function check(){

coknam = "artistjs";
coktxt = document.cookie+";";
stano = coktxt.indexOf(coknam);
if (stano != -1){
endno = coktxt.indexOf(";",stano);
txt = unescape(coktxt.substring(stano+coknam.length,endno));
}else{
txt = "";
}

if (txt == "=artist_vote"){
window.alert('Sorry,you can vote at intervals of 1 hour.');
return false;
}
else{
sav_cook();
return true;
    }
}

//1hour settings.(music)

function sav_cook2() {
coknam2 = "musicjs";
coktxt2 = document.music.run.value;
day0 = new Date();
day0.setTime(day0.getTime()+60*60*1000);
endday = day0.toGMTString();
document.cookie = coknam2+"="+escape(coktxt2)+";expires="+endday;
}

function check2(){

coknam2 = "musicjs";
coktxt2 = document.cookie+";";
stano2 = coktxt2.indexOf(coknam2);
if (stano2 != -1){
endno2 = coktxt2.indexOf(";",stano2);
txt2 = unescape(coktxt2.substring(stano2+coknam2.length,endno2));
}else{
txt2 = "";
}

if (txt2 == "=music_vote"){
window.alert('Sorry,you can vote at intervals of 1 hour.');
return false;
}
else{
sav_cook2();
return true;
    }
}

//Don't vote doble at once.
var set=0;
function doble() {
if(set==0){
set=1;
}else{
alert("Just a moment");
return false;
}
}

//Don't press enter-key.
function noenter() {
return (event.keyCode == 13) ? false : true;
}
