Warning: include(../language/english.php) [function.include]: failed to open stream: No such file or directory in /home/myrecord/public_html/js/javascript_function.js.php on line 2
Warning: include() [function.include]: Failed opening '../language/english.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/myrecord/public_html/js/javascript_function.js.php on line 2
Warning: Cannot modify header information - headers already sent by (output started at /home/myrecord/public_html/js/javascript_function.js.php:2) in /home/myrecord/public_html/js/javascript_function.js.php on line 3
// function to check alpha numaric values with space
function alphanumeric(alphane)
{
var numaric = alphane;
for(var j=0; j 47 && hh<59) || (hh > 64 && hh<91) || (hh > 96 && hh<123)||(hh==32))
{
}
else{
return false;
}
}
return true;
}
//function to check special character
function special_char(input_value){
var iChars = "!#%^&*()+=-[]\\\';,/{}|\":<>?$";
var ster12=input_value.length;
for (var i = 0; i < ster12; i++) {
if (iChars.indexOf(input_value.charAt(i)) != -1) {
// alert ("Special characters are not allowed.\n Please remove them and try again.");
return false;
}
}
}
// function to trim the values
function trim(input_val)
{
while(''+input_val.charAt(input_val.length-1)==' ')
{
input_val = input_val.substring(0,input_val.length-1);
}
return input_val;
}
// email validation check
function echeck(str) {
var at="@"
var dot="."
var lat=str.indexOf(at)
var lstr=str.length
var ldot=str.indexOf(dot)
if (str.indexOf(at)==-1){
alert("Invalid email address")
return false
}
if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
alert("Invalid email address")
return false
}
if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
alert("Invalid email address")
return false
}
if (str.indexOf(at,(lat+1))!=-1){
alert("Invalid email address")
return false
}
if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
alert("Invalid email address")
return false
}
if (str.indexOf(dot,(lat+2))==-1){
alert("Invalid email address")
return false
}
if (str.indexOf(" ")!=-1){
alert("Invalid email address")
return false
}
return true
}
//admin login form validation check
function login_validation(){
var fa= document.Login_frm;
if(fa.user.value==""){
alert("ALERT_ENTER_USERNAME");
fa.user.focus();
return false;
}
if(fa.password.value==""){
alert("ALERT_ENTER_PASSWORD");
fa.password.focus();
return false;
}
return true;
}
//admin change password validation
function validate_change_pass(){
var fa= document.change_pw;
if(fa.old_pass.value==""){
alert("ALERT_ENTER_OLD_PASSWORD");
fa.old_pass.focus();
return false;
}
if(fa.new_pass.value==""){
alert("ALERT_ENTER_NEW_PASSWORD");
fa.new_pass.focus();
return false;
}
if(fa.con_pass.value==""){
alert("ALERT_CONFIRM_PASSWORD");
fa.con_pass.focus();
return false;
}
if(fa.con_pass.value!=fa.new_pass.value){
alert("ALERT_MATCH_PASSWORD");
fa.con_pass.focus();
return false;
}
return true;
}
function Validate_Numeric(Ctrl,valid_chars,msg)
{
if(chkNumeric(Ctrl.value,valid_chars) == false)
{
alert(msg);
Ctrl.focus();
return false;
}
return true;
}
function chkNumeric(strString,strValidChars)
{
var strChar;
var blnResult = true;
for (i = 0; i < strString.length && blnResult == true; i++)
{
strChar = strString.charAt(i);
if (strValidChars.indexOf(strChar) == -1)
{
blnResult = false;
}
}
return blnResult;
}
//FUNCTION FOR A AND R SUBMISSION FORM
// writer_cowriter period_sn_wr rights_of_sale email_db no_of_cp term_ser_chk
function lTrim(sTr)
{
var re = /\s*((\S+\s*)*)/;
return sTr.replace(re, "$1");
}
function anr2Validation(edit)
{
dt=document.frm_anr2;
if(lTrim(dt.submit_name.value)=="")
{
alert("ALERT_ANR2_SUBMITNAME_BLANK");
dt.submit_name.focus();
return false;
}
if(lTrim(dt.legal_name.value)=="")
{
alert("ALERT_ANR2_LEGALNAME_BLANK");
dt.legal_name.focus();
return false;
}
if(lTrim(dt.email_id.value)=="")
{
alert("ALERT_ANR2_USERID_BLANK");
dt.email_id.focus();
return false;
}
else if(!echeck(dt.email_id.value))
{
dt.email_id.focus();
dt.email_id.select();
return false;
}
if(lTrim(dt.password.value)=="")
{
alert("ALERT_ANR2_PASSWORD_BLANK");
dt.password.focus();
return false;
}
if(lTrim(dt.address.value)=="")
{
alert("ALERT_ANR2_ADDRESS_BLANK");
dt.address.focus();
return false;
}
if(lTrim(dt.city.value)=="")
{
alert("ALERT_ANR2_CITY_BLANK");
dt.city.focus();
return false;
}
if(lTrim(dt.state.value)=="")
{
alert("ALERT_ANR2_STATE_BLANK");
dt.state.focus();
return false;
}
if(lTrim(dt.country.value)=="")
{
alert("ALERT_SELECT_COUNTRY");
dt.country.focus();
return false;
}
return true;
}
function anr2Validation1(edit) //"edit" ADDED BY MAXWELL
{
dt=document.frm_anr2;
if(lTrim(dt.submit_name.value)=="")
{
alert("ALERT_ANR2_SUBMITNAME_BLANK");
dt.submit_name.focus();
return false;
}
if(lTrim(dt.address.value)=="")
{
alert("ALERT_ANR2_ADDRESS_BLANK");
dt.address.focus();
return false;
}
if(lTrim(dt.city.value)=="")
{
alert("ALERT_ANR2_CITY_BLANK");
dt.city.focus();
return false;
}
if(lTrim(dt.state.value)=="")
{
alert("ALERT_ANR2_STATE_BLANK");
dt.state.focus();
return false;
}
if(lTrim(dt.country.value)=="")
{
alert("ALERT_SELECT_COUNTRY");
dt.country.focus();
return false;
}
return true;
}
function LoginformValidation()
{
var dt=document.frm_login;
if(lTrim(dt.user_name.value)!="" && dt.user_password.value!="")
{
dt.btn_submit.value="GO";
dt.submit();
}
}
function validationVoting()
{
var dt=document.frm_votelisting;
var jvCntr=dt.fieldcounter.value;
var selGenreStatus=0;
var selAnrStatus=0;
for(i=0;i <= jvCntr; i++)
{
if(document.getElementById('genreid'+ i).value==0){
document.getElementById('genreDivAlert'+i).style.display='block';
selGenreStatus=1;
}
else
document.getElementById('genreDivAlert'+i).style.display='none';
if(document.getElementById('anrid'+ i).value==0){
document.getElementById('anrDivAlert'+i).style.display='block';
selAnrStatus=1;
}else
document.getElementById('anrDivAlert'+i).style.display='none';
}
if(lTrim(dt.voting_name.value)=="")
{
alert("ALERT_VOTING_NAME_BLANK");
dt.voting_name.focus();
return false;
}
if(lTrim(dt.voting_name.value)=="")
{
alert("ALERT_VOTING_NAME_BLANK");
dt.voting_name.focus();
return false;
}
if(lTrim(dt.voting_image1.value)!="")
{
if(!validateFileExtension(dt.voting_image1.value,"picture"))
{
alert("Plese upload valid image file.")
return false;
}
}
if(lTrim(dt.voting_image2.value)!="")
{
if(!validateFileExtension(dt.voting_image2.value,"picture"))
{
alert("Plese upload valid image file.")
return false;
}
}
if(lTrim(dt.voting_image3.value)!="")
{
if(!validateFileExtension(dt.voting_image3.value,"picture"))
{
alert("Plese upload valid image file.")
return false;
}
}
if(lTrim(dt.voting_image4.value)!="")
{
if(!validateFileExtension(dt.voting_image4.value,"picture"))
{
alert("Plese upload valid image file.")
return false;
}
}
if(selGenreStatus==1)
{
alert("ALERT_GENRE_BLANK");
return false;
}
if(selAnrStatus==1)
{
alert("ALERT_ANR_BLANK");
return false;
}
else
return true;
}
//Start Kemp Area
//***************************
function vote2Validation()
{
dt=document.voteform2;
if(lTrim(dt.email0.value)=="")
{
alert("ALERT_VOTE1_EMAIL_BLANK");
dt.email0.focus();
return false;
}
else if(!echeck(dt.email0.value))
{
dt.email0.focus();
dt.email0.select();
return false;
}
else
return true;
}
function vote3Validation()
{
dt=document.voteform3;
if(lTrim(dt.email1.value)=="")
{
alert("ALERT_VOTE2_USERID_BLANK");
dt.email1.focus();
return false;
}
if(!echeck(dt.email1.value))
{
dt.email1.focus();
dt.email1.select();
return false;
}
if(lTrim(dt.email01.value)==lTrim(dt.email1.value))
{
alert("ALERT_VOTE3_EQUAL_EMAIL");
dt.email1.focus();
dt.email1.select();
return false;
}
else
return true;
}
function artistAdminEventValidation()
{
dt=document.frm_event;
if(lTrim(dt.event_title.value)=="")
{
alert("EVENT_MANAGEMENT_ALERT_TITLE_BLANK");
dt.event_title.focus();
return false;
}
if(lTrim(dt.start_date.value)=="")
{
alert("EVENT_MANAGEMENT_ALERT_ST_DATE_BLANK");
dt.start_date.focus();
return false;
}else
return true;
}
function anr2ValidationKemp()
{
dt=document.frm_anr2;
if(lTrim(dt.submit_name.value)=="")
{
alert("ALERT_ANR2_SUBMITNAME_BLANK");
dt.submit_name.focus();
return false;
}
if(lTrim(dt.legal_name.value)=="")
{
alert("ALERT_ANR2_LEGALNAME_BLANK");
dt.legal_name.focus();
return false;
}
if(lTrim(dt.email_id.value)=="")
{
alert("ALERT_ANR2_USERID_BLANK");
dt.email_id.focus();
return false;
}
else if(!echeck(dt.email_id.value))
{
dt.email_id.focus();
return false;
}
if(lTrim(dt.currentstate.value)=="")
{
alert("ALERT_SELECT_STATE");
dt.currentstate.focus();
return false;
}
if(lTrim(dt.currentcountry.value)=="")
{
alert("ALERT_SELECT_COUNTRY");
dt.currentcountry.focus();
return false;
}
if(lTrim(dt.prm_picture.value)=="")
{
alert("ALERT_ANR2_PROMOTIONAL_BLANK");
return false;
}
else if(!validateFileExtension(dt.prm_picture.value,"picture"))
{
alert("ERROR_ANR2_PROMOTIONAL_PICTURE_INVALID");
return false;
}
if(lTrim(dt.mp3_song.value)=="")
{
alert("ALERT_ANR2_MP3SONG_BLANK");
return false;
}
else if(!validateFileExtension(dt.mp3_song.value,"mp3"))
{
alert("Please upload Mp3 files only.")
return false;
}
if(!val_chkspecial())
{
return false;
}
if(!dt.agreement_chk.checked)
{
alert("ALERT_ANR2_AGREEMENT_BLANK");
return false;
}
if(!dt.term_ser_chk.checked)
{
alert("ALERT_ANR2_TERMS_OF_SERVICE_BLANK");
return false;
}
return true;
}
function frmCustomizeSubmit(id)
{
window.location="mngCustMessage.php?slart=Change&artist_id="+id;
}
function validationCustMss()
{
var dt=document.frm_cust_mssg;
if(lTrim(dt.message.value)=="")
{
alert("ALERT_CUSTOMIZE_MSG_MANAGEMENT_MSSG_BLANK");
dt.message.focus();
return false;
}
return true;
}
function frmRandomBoxSubmit(id)
{
window.location="mngRandomBox.php?rnbxart=Change&artist_id="+id;
}
function validationRandBox()
{
var dt=document.frm_rand_box;
if(dt.randombox_picture.value=="")
{
if(dt.command.value!="EDIT"){
alert("RANDOM_BOX_MANAGEMENT_ALERT_PICTURE");
return false;
}
}
if(lTrim(dt.description.value)=="")
{
alert("RANDOM_BOX_MANAGEMENT_ALERT_DESC");
dt.description.focus();
return false;
}
return true;
}
function playMp3PopUp(id,m)
{
x=window.open('http://myrecordlabel.net/playMp3.php?id='+ id + '&mode='+m,'new','resizable=0,scrollbars=0,menubar=0,toolbar=0,status=0,left=200,top=250,height=170,width=610');
}
function rateSongPopUp(id)
{
x=window.open('http://myrecordlabel.net/ratesong.php?id='+ id,'new1','resizable=0,scrollbars=0,menubar=0,toolbar=0,status=0,left=200,top=250,height=400,width=600');
}
function addcommentpopup(artid)
{
x=window.open('fancomment.php?id='+ artid,'comment5','resizable=1,scrollbars=0,menubar=0,toolbar=0,status=0,left=200,top=250,height=400,width=600');
}
function reportabusepopup(artid,commentid)
{
x=window.open('report_abuse.php?id='+ artid+'&cid='+commentid,'comment5','resizable=1,scrollbars=0,menubar=0,toolbar=0,status=0,left=200,top=250,height=400,width=600');
}
function anr2POSPopUp()
{
x=window.open('termsofservice.php','new2','resizable=0,scrollbars=1,menubar=0,toolbar=0,status=0,left=200,top=250,height=650,width=700');
}
function emailtofriendPopUp(id,type)
{
x=window.open('email_to_friend.php?id='+ id + '&m=' + type,'new3','resizable=0,scrollbars=0,menubar=0,toolbar=0,status=0,left=100,top=50,height=550,width=650');
}
function sendmeEmailPopUp(id)
{
x=window.open('sendmeEmail.php?id='+ id,'new3','resizable=0,scrollbars=1,menubar=0,toolbar=0,status=0,left=100,top=50,height=550,width=650');
}
function contestEmailUsPopUp(id)
{
x=window.open('contestEmailUs.php?id='+ id,'new3','resizable=0,scrollbars=1,menubar=0,toolbar=0,status=0,left=100,top=50,height=550,width=650');
}
function topleftImageKempValid()
{
var dt=document.frm_top_left_image;
if(dt.top_left_image.value=="")
{
if(dt.command.value!="EDIT"){
alert("TOP_LEFT_IMAGE_ALERT_PICTURE");
return false;
}
}
if(lTrim(dt.image_text.value)=="")
{
alert("TOP_LEFT_IMAGE_ALERT_TEXT");
dt.image_text.focus();
return false;
}
}
function shoppingPaymentDetailsKemp()
{
dt=document.frm_shopping_payment_details
if(lTrim(dt.contact_name.value)=="")
{
alert("ALERT_PAYMENT_DETAILS_CONTACT_NAME_BLANK");
dt.contact_name.focus();
return false;
}
if(lTrim(dt.email.value)=="")
{
alert("ALERT_PAYMENT_DETAILS_EMAIL_BLANK");
dt.email.focus();
return false;
}
else if(!echeck(dt.email.value))
{
dt.email.focus();
dt.email.select();
return false;
}
return true;
}
function rateValidationKemp()
{
var dt=document.frm_rating;
var oplength=dt.rate.length;
var rateValid=0;
for(i=0;i < oplength;i++)
{
if (dt.rate[i].checked){
rateValid=1;
}
}
if(lTrim(dt.name.value)=="")
{
alert("ALERT_RATING_NAME_BLANK");
dt.name.focus();
return false;
}
if(lTrim(dt.email.value)=="")
{
alert("ALERT_RATING_EMAIL_BLANK");
dt.email.focus();
return false;
}
else if(!echeck(dt.email.value))
{
dt.email.focus();
dt.email.select();
return false;
}
if(rateValid==0)
{
alert("ALERT_RATING_OPTION_BLANK");
return false;
}
return true
}
function contactusValidation()
{
var dt=document.frm_contactus
if(lTrim(dt.f_name.value)=="")
{
alert("CONTACT_US_FIRST_NAME_BLANK");
dt.f_name.focus();
return false;
}
if(lTrim(dt.email.value)=="")
{
alert("CONTACT_US_EMAIL_BLANK");
dt.email.focus();
return false;
}
else if(!echeck(dt.email.value))
{
dt.email.focus();
dt.email.select();
return false;
}
return true;
}
function paypalpaymentInfoValid()
{
var dt=document.frm_paypalpayinfo;
if(lTrim(dt.paypalemail.value)=="")
{
alert("PAYPAL_PAYMENT_INFORMATION_EMAIL_BLANK_ERROR");
dt.paypalemail.focus();
return false;
}
else if(!echeck(dt.paypalemail.value))
{
dt.paypalemail.focus();
dt.paypalemail.select();
return false;
}
return true;
}
function chkJSValid(){
var dt=document.frm_fan_base;
if(lTrim(dt.fans_email.value)!="" && !echeck(dt.fans_email.value))
{
dt.fans_email.focus();
dt.fans_email.focus();
return false;
}/*
if(lTrim(dt.fans_zip.value)!="" && isNaN(dt.fans_zip.value))
{
alert("please enter zip zode");
dt.fans_zip.focus();
return false;
}*/
return true;
}
function chkEmailBlast()
{
var dt=document.frm_email_blast;
if(lTrim(dt.subject.value)=="")
{
alert("Please enter the subject");
dt.subject.focus();
return false;
}
else
return true;
}
function emailBlastCHK(opt)
{
if(opt==2)
{
document.getElementById("sz").style.display='block';
document.getElementById("rz").style.display='none';
return true;
}
else if(opt==3)
{
document.getElementById("sz").style.display='none';
document.getElementById("rz").style.display='block';
return true;
}
else{
document.getElementById("sz").style.display='none';
document.getElementById("rz").style.display='none';
return true;
}
}
function emailFreindValidationKemp()
{
var dt=document.frm_email_toFriend;
if(lTrim(dt.f_email.value)=="")
{
alert("Please enter your friend's email address");
dt.f_email.focus();
return false;
}
else if(!echeck(dt.f_email.value))
{
dt.f_email.focus();
dt.f_email.select();
return false;
}
if(lTrim(dt.y_email.value)=="")
{
alert("Please enter your email address");
dt.y_email.focus();
return false;
}
else if(!echeck(dt.y_email.value))
{
dt.y_email.focus();
dt.y_email.select();
return false;
}
return true;
}
//***************************
//End Kemp Area
//========================================//
// FUNCTION ADDED BY MAXWELL //
//========================================//
function openRequestedPopup(url,Wname,w,h,bresizable,scrollbar,statusbar)
{
WindowObjectReference = window.open(url,
Wname,
"width=" + w + ",height=" + h + "," + (bresizable?'resizable':'') + ",scrollbars=" + scrollbar +",status=" + statusbar);
}
//END FUNCTION
function validateFileExtension(fld,type) {
switch(type)
{
case 'picture':
if(!/(\.png|\.PNG|\.gif|\.GIF|\.jpg|\.JPG|\.jpeg|\.JPEG|\.giff|\.GIFF)$/i.test(fld)) {
return false;
}
break;
case 'pdf':
if(!/(\.pdf|\.PDF)$/i.test(fld)) {
return false;
}
break;
case 'mp3':
if(!/(\.mp3|\.MP3|\.swf|\.SWF)$/i.test(fld)) {
return false;
}
break;
case 'video':
if(!/(\.swf|\.SWF)$/i.test(fld)) {
return false;
}
break;
case 'videoflash':
if(!/(\.flv|\.FLV)$/i.test(fld)) {
return false;
}
break;
case 'artistvideo':
if(!/(\.avi|\.AVI|\.asf|\.ASF|\.dv|\.DV|\.wmv|\.WMV|\.mov|\.MOV|\.mpg|\.MPG|\.mpeg|\.MPEG|\.flv|\.FLV|\.mp4|\.MP4)$/i.test(fld)) {
return false;
}
break;
default:
alert('Please specify a valid file extension');
return false
}
return true;
}
//SMITH FUNCTION START HERE
function confirmmsg(msg)
{
if(confirm(msg))
{
return true;
}
else
{
return false;
}
}
function val_addblogfrm()
{
if(document.addblogfrm.blogtitle.value=='')
{
alert('ALERT_MSG_BLOG_TITLE');
document.addblogfrm.blogtitle.focus();
return false;
}
}
function anr2newValidation1() //"edit" ADDED BY MAXWELL
{
dt=document.contactform;
if(lTrim(dt.cname.value)=="")
{
alert("ENTER_NAME_FIELD");
dt.cname.focus();
return false;
}
if(lTrim(dt.address.value)=="")
{
alert("ENTER_ADDRESS_FIELD");
dt.address.focus();
return false;
}
if(lTrim(dt.zipcode.value)=="")
{
alert("ENTER_ZIPCODE_FIELD");
dt.zipcode.focus();
return false;
}
if(lTrim(dt.email.value)=="")
{
alert("ENTER_EMAIL_FIELD");
dt.email.focus();
return false;
}
else if(!echeck(dt.email.value))
{
dt.email.focus();
dt.email.select();
return false;
}
if(lTrim(dt.phone.value)=="")
{
alert("ENTER_PHONE_FIELD");
dt.phone.focus();
return false;
}
if(lTrim(dt.comments.value)=="")
{
alert("ENTER_COMMENTS_FIELD");
dt.comments.focus();
return false;
}
return true;
}
function anr2feedbacknewValidation1() //"edit" ADDED BY MAXWELL
{
dt=document.feedbackform;
if(lTrim(dt.fname.value)=="")
{
alert("ENTER_FNAME_FIELD");
dt.fname.focus();
return false;
}
if(lTrim(dt.email.value)=="")
{
alert("ENTER_FEMAIL_FIELD");
dt.email.focus();
return false;
}
else if(!echeck(dt.email.value))
{
dt.email.focus();
dt.email.select();
return false;
}
if(lTrim(dt.feedback.value)=="")
{
alert("ENTER_FCOMMENTS_FIELD");
dt.feedback.focus();
return false;
}
return true;
}
//END FUNCTION
//FUNCTION TO CHECK URL
function checkURL() {
return /^(ftp|https?):\/\/+(www\.)?[a-z0-9\-\.]{3,}\.[a-z]{2,3}$/.test(checkURL.arguments[0]);
}
//END CHECK URL FUNCTION
//=================END==================//
function printpage(storyid)
{
window.open("printdata.php?stories_id="+storyid,"mywin1","status=1,scrollbars=1,resizable=0, width=500,height=650");
}
function cleanoldzipval()
{
if(document.frm_fan_base.fans_zip.value=='Zip')
{
document.frm_fan_base.fans_zip.value=''
}
}
function cleanoldemailval()
{
if(document.frm_fan_base.fans_email.value=='Enter email here')
{
document.frm_fan_base.fans_email.value=''
}
}
function val_frm_chkspecial()
{
var iChars = "!@#$%^&*`()+=[]';,{}|\"<>?";
var btnchange=0;
f=document.frm;
var pic=f.picture.value.toLowerCase();
var paidpic=f.paid_picture.value.toLowerCase();
var img=f.mpe3imagefile.value.toLowerCase();
if(f.title.value==""){alert("Please enter a title"); f.title.focus();return false;}
if(f.mp3_genre.value==0){alert("Please select a genre"); f.mp3_genre.focus();return false;}
if(f.picture.value==''){alert("Please upload mp3 song"); return false;}
if(f.mpe3imagefile.value==''){alert("Please upload image"); return false;}
if(f.picture.value!=""){
if(!validateFileExtension(pic,"mp3")){ alert("This is not a valid song file");return false;}
}
if(f.paid_picture.value!=""){
if(!validateFileExtension(paidpic,"mp3")){ alert("This is not a valid song file ");return false;}
}
if(f.mpe3imagefile.value!=""){
if(!validateFileExtension(img,"picture")){ alert("This is not a valid image file");return false;}
}
if(btnchange==0){
document.getElementById("myaddbutton").style.display="none";
document.getElementById("uploadtext").style.display="";
}
return true;
}
function val_chkspecial()
{
var inewChars = "!@#$%^&*`()+=[]';,{}|\"<>?";
for (var i = 0; i < frm_anr2.mp3_song.value.length; i++)
{
if (inewChars.indexOf(frm_anr2.mp3_song.value.charAt(i)) != -1)
{
alert ("The mp3 file name can not contain characters such as: ',\",*,{} etc.");
frm_anr2.mp3_song.focus();
return false;
}
}
return true;
}
function showhidemessagepart(divid)
{
if(document.getElementById(""+divid+"").style.display=="none")
{
document.getElementById(""+divid+"").style.display="";
}
else
{
document.getElementById(""+divid+"").style.display="none";
}
}
function showhidestop(divid)
{
document.getElementById(""+divid+"").style.display="none";
}
function setsongorder()
{
testwindow= window.open ("songorder.php", "mywindow",
"resizable=1,scrollbars=0,menubar=0,toolbar=0,status=0,width=650,height=400");
testwindow.moveTo(0,0);
}
function mailvideotofriend(maillink)
{
x=window.open('sendlink.php?id='+ maillink,'sndlink','resizable=1,scrollbars=0,menubar=0,toolbar=0,status=0,left=200,top=250,height=300,width=600');
}
function copy(inElement) {
if (inElement.createTextRange) {
var range = inElement.createTextRange();
if (range && BodyLoaded==1)
range.execCommand('Copy');
} else {
var flashcopier = 'flashcopier';
if(!document.getElementById(flashcopier)) {
var divholder = document.createElement('div');
divholder.id = flashcopier;
document.body.appendChild(divholder);
}
document.getElementById(flashcopier).innerHTML = '';
var divinfo = '';
document.getElementById(flashcopier).innerHTML = divinfo;
}
alert("Copied to clipboard successfully.");
}
var xmlhttpCat;
var str="";
function getAsynchronous(url)
{
if(window.XMLHttpRequest)
{
xmlhttpCat=new XMLHttpRequest;
xmlhttpCat.open("GET",url,false);
xmlhttpCat.send(null);
if(xmlhttpCat.readyState==4 && xmlhttpCat.status==200);
str=xmlhttpCat.responseText
}
else if(window.ActiveXObject)
{
xmlhttpCat=new ActiveXObject(Microsoft.XMLHTTP)
if(xmlhttpCat){
xmlhttpCat.open("GET",url,false);
xmlhttpCat.send(null);
if(xmlhttpCat.readyState==4 && xmlhttpCat.status==200);
str=xmlhttpCat.responseText
}
}
return str;
}
function rememberMe(){
dt=document.frm_login_right;
if(dt.remember_me.checked==true){
SetCookie("remember_me",dt.remember_me.value,'');
SetCookie("user_name",dt.user_name.value,'');
SetCookie("user_password",dt.user_password.value,'');
}else{
SetCookie("remember_me",'','');
SetCookie("user_name",'','');
SetCookie("user_password",'','');
}
}
function SetCookie(cookieName,cookieValue,nDays) {
var today = new Date();
var expire = new Date();
if (nDays==null || nDays==0) nDays=1;
expire.setTime(today.getTime() + 3600000*24*nDays);
document.cookie = cookieName+"="+escape(cookieValue)
+ ";expires="+expire.toGMTString();
}
function checkLogin()
{
var err='';
dt=document.frm_login_right;
if(dt.user_name.value==""){
alert("Please your e-mail address");
dt.user_name.focus();
return false;
}
if(dt.user_password.value==""){
alert("Please your password");
dt.user_password.focus();
return false;
}
err=getAsynchronous("ajxlogin.php?user_name="+dt.user_name.value+"&user_password="+dt.user_password.value);
if(err==1){
rememberMe();
window.location="artistadmin/index.php";
return false;
}else{
alert(err);
dt.remember_me.checked=false;
rememberMe();
dt.user_name.value='';
dt.user_password.value='';
return false;
}
}
function validForgotPass(){
dt=document.frm_forgot_password;
if(dt.user_name.value==""){
alert("Please enter your user name.");
dt.user_name.focus();
return false
}
else if(!echeck(dt.user_name.value))
{
dt.user_name.focus();
dt.user_name.select();
return false;
}
else
return true
}
function cleanoldnameval(dt)
{
if(dt.name.value=='Enter name here')
dt.name.value='';
return;
}
function cleanoldcommentval(dt)
{
if(dt.comment.value=='Enter comment here')
dt.comment.value='';
return;
}
function commentNavigation(cpg,id)
{
var err='';
err=getAsynchronous("fanscommentAjx.php?cpg="+cpg+"&id="+id);
document.getElementById("fancomment_span").innerHTML=err;
}
function votecommentNavigation(cpg,vid)
{
var err='';
err=getAsynchronous("votecommentAjx.php?cpg="+cpg+"&vid="+vid);
document.getElementById("votecomment_span").innerHTML=err;
}
function glbblank(fld){
dt=document.frm_login_right;
if(fld==1){
if(dt.user_name.value=='e-mail')
dt.user_name.value=''
}else{
if(dt.user_password.value=='password')
dt.user_password.value=''
}
}
/*Update by Kemp [14-10-2008] (Start)*/
/*----------------------------------------------------------------------*/
function validProduct()
{
var dt=document.frm_product;
if(dt.product_title.value=="")
{
alert("Please enter product title.");
dt.product_title.focus();
return false;
}
if(dt.product_title.value=="")
{
alert("Please enter product title.");
dt.product_title.focus();
return false;
}
if(dt.product_price.value=="")
{
alert("Please enter product price.");
dt.product_price.focus();
return false;
}
else if(isNaN(dt.product_price.value))
{
alert("Please enter a valid product price.");
dt.product_price.focus();
dt.product_price.select();
return false;
}
if(dt.product_id.value=="")
{
if(dt.product_image.value==""){
alert("Please upload product image.");
return false;
}
}
if(dt.product_image.value!=""){
if(!validateFileExtension(dt.product_image.value,"picture"))
{
alert("Plese upload valid image file.")
return false;
}}
}