function gowanted()
{
document.location='http://ar-auto.com/board.php?TID=0';
}


function gomessage(MID,TID)
{

document.location='http://ar-auto.com/board.php?TID='+TID+'&parent='+MID;
}

function ConfirmStopDealership()
{
        if(confirm('Are you sure to stop Dealership and become a Regular User?')){
                location.href='http://ar-auto.com/dealership.php?&action=stop';
        }
}

function makebgcolor(elem, bgcolor)
{
document.getElementById(elem).style.background=bgcolor;
}

function goad(AID)
{
document.location='http://ar-auto.com/show_ad_info.php?AID='+AID;
}

function goadnew(AID)
{

window.open('http://ar-auto.com/show_ad_info.php?AID='+AID,'_blank');
}


function showads(SID)
{
document.location='http://ar-auto.com/show_ads.php?SID='+SID;
}

function fadein(elem_name)
{ 
  document.getElementById(elem_name).style.background='#ACCBEA';
};

function fadeout(elem_name)
{ 
  document.getElementById(elem_name).style.background='#EFEFEF';
 
}
function gopage(CID)
{
document.location='http://ar-auto.com/show_cat.php?CID='+CID;
}

function gopage(CID)
{
document.location='http://ar-auto.com/show_cat.php?CID='+CID;
}

function ConfirmDel(AID)
{
        if(confirm('Your Ad will be Removed! Are you sure?')){
                location.href='http://ar-auto.com/delete_ad.php?&AID='+AID;
        }
}
 
function big_pic(name)
{
  a='http://ar-auto.com/show_pic.php?pic_name='+name;
  window.open(a,'Big_picture','scrollbars, resizable, width=700, height=650');
}

function CheckPicture(which){
  tempobj=which.big_pic.value.toLowerCase()
  if((tempobj.indexOf(".jpeg")!=-1)||(tempobj.indexOf(".jpg")!=-1))
  {
    return true
  }else{
    alert("You're allowed to upload only .Jpeg(.jpg). Please choose valid image, then submit again!")
    return false
  }
}

