﻿// JScript File
//0-ufone
//1-mobilink
//2-telenor
//3-warid
//4-Instaphone
//5-Paktel
var smsLinksList=new Array('<iframe src="http://vega.vectracom.net/webchat/" width="420" height="310" frameborder="0" scrolling="no" style="border: 1px solid black;"></iframe>',
                         '<applet code="ChatAppletUpdate.class" width=460 height=250>'+
							'<param name="list_index" value="5">'+
							'<param name="max_send" value="10">'+
							'<param name="max_cell_send" value="60">'+
							'<param name="spam_time" value="120">'+
							'<param name="user_inactive" value="1200">'+
							'<param name="codeBase" value="http://chat.mobilinksms.com/">'+
						'</applet>',
                        '<iframe src="http://203.215.160.178:8080/w2s/web2smschat.html" width="468" height="325"   marginheight="0" marginwidth="0" frameborder="0"></iframe>',
  '<iframe src="http://www.freenet2sms.com/warid2.php" name="freenet" width="375" height="270" align="middle" scrolling="no"frameborder="0" style="border: 1px solid black;"></iframe>',
  '<iframe src="http://orion.vectracom.net/webchaT9341/index.html" width="410" height="270" frameborder="0" scrolling="no" style="border: 1px solid black;"></iframe>',
  "<APPLET CODE = 'pak_chat' WIDTH = 410 HEIGHT = 276> <param name='img' value='http://orion.vectracom.net/webchat_paktel3/copyright5.gif'> <param name='NICK' value='nickname'><param name='img1' value='http://orion.vectracom.net/webchat_paktel3/smschat_2.gif'> <param name='codeBase' value='http://orion.vectracom.net/webchat_paktel3/'></APPLET>");


//*****************Message Layer*******************************//

function CreateFriendLayer(x,y)
{
  if(document.getElementById('divFriendLayer')!=null)
        {
         if(document.getElementById('divFriendLayer').style.display !='block')
        
          {
          //alert("here");
                document.getElementById('divFriendLayer').style.display='block';
                document.getElementById('divFriendLayer').style.left=x+"px";
                document.getElementById('divFriendLayer').style.top=y+"px";
                //Hide_n_Display(new Array("ImgSend","imgClear","tbSubject","tbBody","lblDescription","lblContact"),"" )
                //Hide_n_Display(new Array("ImgSendFriend","ImgClearFriend","txtYourName","txtSendTo","txtYourEmail"),"" );
                Hide_n_Display(new Array("ImgSendFriend","ImgClearFriend","txtYourName","txtSendTo","txtYourEmail","lblSendTo","lblYourName","lblYourEmail"),"")
                document.getElementById('lblFriendMessage').style.display='none';
                 document.getElementById('txtSendTo').value='';
                document.getElementById('txtYourName').value='';
                document.getElementById('txtYourEmail').value='';
                document.getElementById('FriendValidator').style.display='none';
                
            }
        return;
        }
    else
    {
    var divFriendLayer=document.createElement('DIV');
    divFriendLayer.setAttribute('id','divFriendLayer');
    divFriendLayer.style.left=x+"px";
    divFriendLayer.style.top=y+"px";
    divFriendLayer.style.overflow="hidden";
    divFriendLayer.style.position="absolute";
    divFriendLayer.style.display='block';
    document.body.appendChild(divFriendLayer);
    divFriendLayer.innerHTML=
    '<table align="center" width="400px" cellpadding="0" cellspacing="0" class="buy_td" bgcolor="#f9fafa">'+
        '<tr>'+
            '<td valign="top" align="left">'+
                '<table cellpadding="0" cellspacing="0" width="100%" align="left">'+
                '<tr height="31px">'+
                '<td align="left" valign="middle" background="http://www.aikminute.com/images/heading_bg.gif" style="color:#297da7;height: 22px; padding-left: 10px; font-weight: bold; font-size: small; vertical-align: middle; font-family: Verdana; text-align: left;">'+
                'Tell Your Friend</td>'+
                '<td align="right" valign="middle" background="http://www.aikminute.com/images/heading_bg.gif">'+
                '<img height="31" src="images/close_normal.jpg" width="24" id="Img_Close" onmouseover="MouseOver()" onmouseout="MouseOut()" onclick="return imgFriendClose_onclick()" />'+
                '</td></tr></table>'+
                '</td></tr>'+
//        '<tr height="25px">'+
//          '<td background="images/heading_bg.gif" class="subheading" style="color:#297da7; font-weight:bold; padding-left:8px;" align="left" valign="middle">'+
//          'Tell Your Friend &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'+
//              '&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'+
//              '&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'+
//              '<img height="31" src="images/close_normal.jpg" width="24" id="Img_Close" onmouseover="MouseOver()" onmouseout="MouseOut()" onclick="return imgFriendClose_onclick()" />'+
//              //<a style="text-decoration:none;color:#297da7; cursor:hand;" onclick="javascript:window.close();">Close</a>'+
//          '</td>'+
//        '</tr>'+
        '<tr id="TrFriend" runat="server">'+
        '<td align="left" valign="top">'+
        '<table width="100%" border="0" cellspacing="0" cellpadding="0" align="left">'+
//                            '<tr>'+
//                              '<td class="caption">&nbsp;</td>'+
//                              '<td>&nbsp;</td>'+
//                            '</tr>'+
                            '<tr><td colspan="3" align="center" style="height: 16px; margin-left: 10px;">'+
                        '<span id="FriendValidator" style="color:Red; display:none">Required</span>'+
                        '</td></tr>'+
                            '<tr>'+
                              '<td width="22%" class="caption">'+
                                  '<span  id="lblSendTo">'+
                        '<font color="#666666">Send To :</font></span>'+
                              '</td>'+
                             ' <td width="78%" height="25">'+
                              '  <input type="text" name="title" id="txtSendTo" class="textfieldsmall" runat="server" onchange="FriendValidator(\'txtSendTo\');" style="width:305px;">'+
'</td>'+
 '  </tr>'+
  '<tr>'+
                '<td class="caption" valign="top">'+
                '</td>'+
                '<td>'+
                   ' </td>'+
            '</tr>'+
            '<tr>'+
                '<td class="caption" valign="top">'+
                '</td>'+
                '<td>'+
                '</td>'+
            '</tr>'+
                            '<tr>'+
                              '<td class="caption" height="25">'+
                                 '<span  id="lblYourName">'+
                        '<font color="#666666">Your Name :</font></span>'+
                              '<td><input type="text" name="title3" id="txtYourName" class="textfieldsmall" runat="server" maxlength="35"></td>'+
                            '</tr>'+
            '<tr>'+
                '<td class="caption">'+
                '</td>'+
                '<td align="left" valign="top">'+
                    
                    '</td>'+
           ' </tr>'+
                            '<tr>'+
                              '<td class="caption" height="25">'+
                                 '<span  id="lblYourEmail">'+
                        '<font color="#666666">Your Email :</font></span>'+
                              '<td><input type="text" name="title3" id="txtYourEmail" class="textfieldsmall" onchange="FriendValidator(\'txtYourEmail\');" runat="server"></td>'+
                            '</tr>'+
                            '<tr><td colspan="3" align="center" style="width: 327px">'+
                            '<span id="RangeValidator" style="color:Red; display:none">Max length 100 Characters</span>'+
                        '</td></tr>'+
            '<tr>'+
                '<td class="caption">'+
                '</td>'+
'<td align="left" valign="top">'+
                    '</td>'+
            '</tr>'+
                            '<tr>'+
                              '<td class="caption" height="15"></td>'+
                              '<td></td>'+
                            '</tr>'+
                            '<tr>'+
                              '<td height="3" colspan="2" background="images/c_p_div.gif"></td>'+
                            '</tr>'+
                            
//                            '<tr>'+
//                              '<td class="caption">&nbsp;</td>'+
//                              '<td>'+
//                                  '<img src="images/send_bt.jpg" width="84" height="29"'+
//                              '&nbsp;&nbsp;'+
//                              '<img src="images/cancel_bt.jpg" width="84" height="29" onclick="javascript:window.close();">'+
//                              '</td>'+
//                            '</tr>'+
                            '<tr><td colspan="3" id="tdCenter" align="center" style="color: #000033; height: 18px; width: 327px;" valign="middle">'+
                        '<img id="imgProgress" src="images/loadingcircle.gif" style="display:none" />'+
                        '<span id="lblFriendMessage" style="display:none;color:#297da7; font-weight:bold;">I m  Sending...</span></td>'+
                        '</tr>'+
                            '<tr valign="middle">'+
                            '<td align="right" colspan="3" valign="middle" style="width: 327px">&nbsp;&nbsp;'+
                        '<table align="center">'+
                        '<tr><td colspan="2"><img id="ImgSendFriend" language="javascript" onclick="return ImgSendFriend_onclick()" src="images/send_bt.jpg" />&nbsp;</td>'+
                        '<td>&nbsp;<img id="ImgClearFriend" language="javascript" onclick="return fimgClear_onclick()"'+
                        'src="images/clear_bt.jpg" /></td></tr></table>'+
                        '</td></tr>'+
                          '</table>'+
        '</td>'+
        '</tr>'+
        '</table>';
   
                          
    }
}

function CreateLayer(x,y)
{

    if(document.getElementById('divLayer')!=null)
        {
         if(document.getElementById('divLayer').style.display !='block')
        
          {
                document.getElementById('divLayer').style.display='block';
                document.getElementById('divLayer').style.left=x+"px";
                document.getElementById('divLayer').style.top=y+"px";
                Hide_n_Display(new Array("ImgSend","imgClear","tbSubject","tbBody","lblDescription","lblContact"),"" )
                document.getElementById('lblMessage').style.display='none';
                document.getElementById('tbSubject').value='';
                document.getElementById('tbBody').value='';
            }
        return;
        }
    else
    {
    var divLayer=document.createElement('DIV');
    divLayer.setAttribute('id','divLayer');
    divLayer.style.left=x+"px";
    divLayer.style.top=y+"px";
    divLayer.style.overflow="hidden";
    divLayer.style.position="absolute";
    divLayer.style.display='block';
    document.body.appendChild(divLayer);
    divLayer.innerHTML='<table visible=false border="0" cellpadding="0" cellspacing="0" style="border-right: #cbcbcb 1px solid; border-top: #cbcbcb 1px solid; border-left: #cbcbcb 1px solid; border-bottom: #cbcbcb 1px solid;'+
                        'background-color: #f9fafa" width="330" class="textboxfont">'+
                        '<tr><td align="left" background="images/heading_bg.gif" colspan="2" style="height: 31px; width: 327px;">'+
                        '<img height="31" src="images/contact_seller.jpg" width="162" /></td><td><img height="31" src="images/close_normal.jpg" width="24" id="ImgClose" onmouseover="MouseOver()" onmouseout="MouseOut()" onclick="return imgClose_onclick()" /></td> </tr>'+
                        '<tr> <td colspan="2" align="left" style="width: 327px" valign="top"><img height="4" src="images/contact_seller_1.jpg" width="33" /></td>'+
                        '</tr><tr><td colspan="3" align="left" style="height: 16px; margin-left: 10px;"><span  id="lblContact" style="margin-left:23px; color: #ff0000" title="Enter your Phone Number, Cell Number, Email Address etc.">'+
                        '&nbsp; <font color="red">* </font><font color="#666666">Your Contact :</font>&nbsp;</span><span id="txtValidator" style="color:Red; display:none">Required</span>'+
                        '</td></tr><tr><td colspan="3" align="center" style="height: 24px">&nbsp;<input id="tbSubject" style="width: 250px" type="text" class="textfieldsmall" /></td>'+
                        '</tr><tr><td colspan="3" align="left" style="height: 16px"><span id="lblDescription" forecolor="#666666" style="color: #666666; margin-left: 34px;">&nbsp;Your Message :</span>&nbsp;</td>'+
                        '</tr><tr><td colspan="3" align="center" style="width: 327px">&nbsp;<textarea id="tbBody" class="textareas" cols="20" rows="2" style="width: 250px; height: 50px; overflow: hidden;" onchange="CustomValidation()"></textarea><br />'+
                        '<span id="txtAreaValidator" style="color:Red; display:none">Max length 256 Characters</span>'+
                        '</td></tr><tr><td colspan="3" id="tdCenter" align="center" style="color: #000033; height: 18px; width: 327px;" valign="middle">'+
                        '<img id="imgProgress" src="images/loadingcircle.gif" style="display: none" />'+
                        '<span id="lblMessage" style="display:none;COLOR:#666666;">Sending...</span></td>'+
                        '</tr>'+
                        '<tr valign="middle"><td align="right" colspan="3" valign="middle" style="width: 327px">&nbsp;&nbsp;'+
                        '<table align="center">'+
                        '<tr><td colspan="2"><img id="ImgSend" language="javascript" onclick="return ImgSend_onclick()" src="images/send_bt.jpg" />&nbsp;</td>'+
                        '<td>&nbsp;<img id="imgClear" language="javascript" onclick="return imgClear_onclick()"'+
                        'src="images/clear_bt.jpg" /></td></tr></table>'+
                        '</td></tr>'+
                        '</table>';
                          
    }   
}

function  CreateSMSLayer(x,y)
{
	    if(document.getElementById('smsLayer')!=null)
        {
         if(document.getElementById('smsLayer').style.display !='block')
        
          {
	    
                 document.getElementById('smsLayer').style.display='block';
                 document.getElementById('smsLayer').style.left=x+"px";
                 document.getElementById('smsLayer').style.top=y+"px";
                 document.getElementById('smsLayer').innerHTML='<table align="center" width="380" cellspacing="0" cellpadding="0">'+
                       '<tr>'+
                       '<td valign="top" background="images/line_top.gif"></td>'+
                       '</tr>'+
                       '<tr>'+
                       '<td background="images/line_l_panel_l.gif"></td>'+
                       '<tr>'+
                       '<td align="left" valign="bottom"><img src="images/CMsend_sms_top.jpg" width="52" height="19"></td>'+
                       '</tr>'+
                       '<tr align="left">'+
                       '<td height="31" colspan="2" background="images/heading_bg.gif">'+
                       '<img id="imgClose" language="javascript" onclick="return imgClose_onclick_sms()" src="images/cross_bt1.gif" width="29" height="31" align="right">'+
                       '<img src="images/CMsend_sms_head.gif" width="186" height="31">'+
                       '</td>'+
                       '</tr>'+
                       '<tr align="center">'+
                       '<td>'+
                       
                       smsLinksList[document.getElementById('cbSMS').value].toString();
                       '</td>'+
                       '</tr>'+
                       '<td width="10" background="images/line_r_panel_r.gif"></td>'+
                       '<tr>'+
                       '<td></td>'+
                       '<td height="10" valign="top" background="images/line_bottom.gif"></td>'+
                       '<td></td>'+
                       '</tr>'+
                       '</tr>'+
//                       '<tr>'+
//                       '<td>'+
//                       '<img id="imgClose" language="javascript" onclick="return imgClose_onclick()"'+
//                        'src="images/close_bt.jpg" />'+
//                       '</td>'+
//                       '</tr>'+
                       '</table>'+
                       '<br />';
         }
        return;
        
        }
else
{
var divLayer=document.createElement('DIV');
    divLayer.setAttribute('id','smsLayer');
    divLayer.style.left=x+"px";
    divLayer.style.top=y+"px";
    divLayer.style.overflow="hidden";
    divLayer.style.position="absolute";
    divLayer.style.display='block';
    document.body.appendChild(divLayer);
    divLayer.innerHTML='<table align="center" width="380" cellspacing="0" cellpadding="0">'+
                       '<tr>'+
                       '<td valign="top" background="images/line_top.gif"></td>'+
                       '</tr>'+
                       '<tr>'+
                       '<td background="images/line_l_panel_l.gif"></td>'+
                       '<tr>'+
                       '<td align="left" valign="bottom"><img src="images/CMsend_sms_top.jpg" width="52" height="19"></td>'+
                       '</tr>'+
                       '<tr align="left">'+
                       '<td height="31" colspan="2" background="images/heading_bg.gif">'+
                       '<img id="imgClose" language="javascript" onclick="return imgClose_onclick_sms()" src="images/cross_bt1.gif" width="29" height="31" align="right">'+
                       '<img src="images/CMsend_sms_head.gif" width="186" height="31">'+
                       '</td>'+
                       '</tr>'+
                       '<tr align="center">'+
                       '<td>'+
                       
                       smsLinksList[document.getElementById('cbSMS').value].toString();
                       '</td>'+
                       '</tr>'+
                       '<td width="10" background="images/line_r_panel_r.gif"></td>'+
                       '<tr>'+
                       '<td></td>'+
                       '<td height="10" valign="top" background="images/line_bottom.gif"></td>'+
                       '<td></td>'+
                       '</tr>'+
                       '</tr>'+
//                       '<tr>'+
//                       '<td>'+
//                       '<img id="imgClose" language="javascript" onclick="return imgClose_onclick()"'+
//                        'src="images/close_bt.jpg" />'+
//                       '</td>'+
//                       '</tr>'+
                       '</table>'+
                       '<br />';
}
}


function CustomValidation()
    {
        if(document.getElementById('tbBody').value.length > 256)
                document.getElementById('txtAreaValidator').style.display='';
        else
                document.getElementById('txtAreaValidator').style.display='none';
    }
    
    function FriendValidator(controlName)
    {
        if(document.getElementById(controlName).value.length > 100)
                document.getElementById('RangeValidator').style.display='block';
        else
                document.getElementById('RangeValidator').style.display='none';
    }
    
     function ImgSendFriend_onclick()
   {
        var email = document.getElementById('txtSendTo');
    
        if(document.getElementById('txtSendTo').value!="")
        {
        //alert("Not EMpty");    
        if(document.getElementById('txtYourName').value!="" )
        //document.getElementById('FriendValidator').style.display='none';
        {
        //alert("Name not Empty");
        if(document.getElementById('txtYourEmail').value!="" )
        {
        document.getElementById('FriendValidator').style.display='none';
//        alert("success");
        
       if(emailValidator(txtSendTo, "Please enter a valid email address"))
       {
	    		SendMessageToFriend();
				return true;
	   }
		
	    return false;
        
        
        //fimgClear_onclick();
        
        //document.getElementById('divFriendLayer').style.display='none';
        
//        return;
        }
        else
        //alert("Email EMpty");
        {
        document.getElementById('FriendValidator').style.display='block';}
        
        }//thirdElse
        
        else
        {
        //alert("Name Empty");
        document.getElementById('FriendValidator').style.display='block';
        }//SecElse
        
        
        }
    else
        {
        //alert("EMpty");
        document.getElementById('FriendValidator').style.display='block';
       
       }//FirstElse
   }
     
  
  //For Email Validation
    function emailValidator(elem, helperMsg){
	var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
	if(elem.value.match(emailExp)){
		return true;
	}else{
		alert(helperMsg);
		elem.focus();
		return false;
	}
}   
     
 function ImgSend_onclick()
   {
    if(document.getElementById('tbSubject').value!="")
        {
            if(document.getElementById('tbBody').value.length<=256)
                    Message();       
            else
                   document.getElementById('txtAreaValidator').style.display='';
        }
    else
        {
        document.getElementById('txtValidator').style.display='';}
   }
   
   function imgFriendClose_onclick()
   {
            document.getElementById('divFriendLayer').style.display="none";
   }
   
   
   function imgClose_onclick() {
    
            document.getElementById('divLayer').style.display="none";
    }
   function imgClose_onclick_help() {
    
            document.getElementById('helpLayer').style.display="none";
    }
  function imgClose_onclick_sms() {
    
            document.getElementById('smsLayer').style.display="none";
    }
    
    function imgClose(control){
    
            document.getElementById(control).style.display="none";
    }
    
    
      function fimgClear_onclick() 
      {
        document.getElementById('txtSendTo').value="";
        document.getElementById('txtYourName').value="";
        document.getElementById('txtYourEmail').value="";
    }
      
   function imgClear_onclick() {
        document.getElementById('tbSubject').value="";
        document.getElementById('tbBody').value="";
    }
    
   function Hide_n_Display(controlArray,value)
   {
   //alert("hide_n_display");
    for(var i=0; i<controlArray.length; i++)
        document.getElementById(controlArray[i]).style.display=value;
   }
   
   
   
   
     document.onmousedown=doSomething;
         
function doSomething(e) {

	if (!e) var e = window.event;
	if (e.pageX || e.pageY) 	{
		posx = e.pageX;
		posy = e.pageY;
	}
	else if (e.clientX || e.clientY) 	{
		posx = e.clientX + document.body.scrollLeft
			+ document.documentElement.scrollLeft;
		posy = e.clientY + document.body.scrollTop
			+ document.documentElement.scrollTop;
    }
      } 
      
      
      function MouseOver()
    {
    document.getElementById("ImgClose").src="http://localhost/aikminute/images/close_roll_over.jpg";
    }
    function MouseOut()
    {
    document.getElementById("ImgClose").src="http://localhost/aikminute/images/close_normal.jpg";
    }
    
    
    
    ////////////////////Help notes Layers////////////////////////
    
    
    // Buy_n_Sell Help
   function Buy_n_Sell_Help(x,y)
   {  
     
     if(document.getElementById('helpLayer')!=null)
        {
         if(document.getElementById('helpLayer').style.display !='block')
        
           {
                document.getElementById('helpLayer').style.display='block';
                document.getElementById('helpLayer').style.left=x+"px";
                document.getElementById('helpLayer').style.top=y+"px";
                
            }
        return;
        }
    else
    {
    var divLayer=document.createElement('DIV');
    divLayer.setAttribute('id','helpLayer');
    divLayer.style.left=x+"px";
    divLayer.style.top=y+"px";
    divLayer.style.overflow="hidden";
    divLayer.style.position="absolute";
    divLayer.style.display='block';
    divLayer.style.color='666666';
    divLayer.style.backgroundColor='f9fafa';
    divLayer.style.fontFamily='Tahoma';
    divLayer.style.width='338px';
    divLayer.style.height='300px';
    divLayer.style.textAlign='left';
    
    document.body.appendChild(divLayer);
    divLayer.innerHTML='<div style="text-align:right; padding-right: 5px;  background-image: url(http://www.aikminute.com/images/heading_bg.gif); border-right: #cdcdcd 1px solid; border-left: #cdcdcd 1px solid;"><img height="31" src="http://www.aikminute.com/images/close_normal.jpg" width="24" id="ImgClose" onmouseover="MouseOver()" onmouseout="MouseOut()" onclick="return imgClose_onclick_help()" /></div>'+
                       '<div style="padding-left:10px;border-left:solid 1px #cdcdcd; border-right:solid 1px #cdcdcd; border-bottom:solid 1px #cdcdcd">'+
                           '<div > <div style="font-weight:bold; padding-top:5px;"> Buy - To look for ads </div>'+
                                    '<div>1. Select the relevant folders to browse for what you want. </div>'+
                                    '<div>2. Contact the Seller through our messaging functionality with your bid and/or Contact Number.</div>'+
                                    '<div>3. Wait for the Seller to reply back.</div>'+
                                    '<div> <strong>Note:</strong> No membership required.</div>'+
                            '</div><br />'+
                            '<div > <div style="font-weight:bold;">Sell - To post an ad </div>'+
                            '<div>1. Select the relevant folders to reach the folder you want to place your ad in.</div>'+
                            '<div>2. Fill out the details for your ads.</div>'+
                            '<div>3. Get messages by interested buyers through our messaging system.</div>'+
                            '<div style="padding-bottom:5px;">'+
                            '<strong>Note :</strong> To post an ad you have to be a member of the Aik Minute network.</div>'+
                            '</div>  </div>';
                          
    }   
}




// OnlineShop Help

 function Onlineshop_Help(x,y)
   {  
     
     if(document.getElementById('helpLayer')!=null)
        {
         if(document.getElementById('helpLayer').style.display !='block')
        
           {
                document.getElementById('helpLayer').style.display='block';
                document.getElementById('helpLayer').style.left=x+"px";
                document.getElementById('helpLayer').style.top=y+"px";
                
            }
        return;
        }
    else
    {
    var divLayer=document.createElement('DIV');
    divLayer.setAttribute('id','helpLayer');
    divLayer.style.left=x+"px";
    divLayer.style.top=y+"px";
    divLayer.style.overflow="hidden";
    divLayer.style.position="absolute";
    divLayer.style.display='block';
    divLayer.style.color='666666';
    divLayer.style.backgroundColor='f9fafa';
    divLayer.style.fontFamily='Tahoma';
    divLayer.style.width='338px';
    divLayer.style.height='100%';
    document.body.appendChild(divLayer);
    divLayer.innerHTML='<div style="text-align:right; padding-right: 5px;  background-image: url(http://www.aikminute.com/images/heading_bg.gif); border-right: #cdcdcd 1px solid; border-left: #cdcdcd 1px solid;">'+
                     '<img height="31" src="http://www.aikminute.com/images/close_normal.jpg" width="24" id="ImgClose" onmouseover="MouseOver()" onmouseout="MouseOut()" onclick="return imgClose_onclick_help()" /></div>'+
                    '<div style="padding-left:10px; padding-right:10px;border-left:solid 1px #cdcdcd; border-right:solid 1px #cdcdcd; border-bottom:solid 1px #cdcdcd"">'+
                    '<div > <div style="font-weight:bold; padding-top:5px;"> Online Shops </div>'+
                    '<div>Aik Minute lets you set up your very own online shop show casing all your products on the same place!'+ 
                    '<br /> <strong>To set your online business</strong>'+
                    '</div> <div> 1. Create your online shop.'+
                    '</div> <div> 2. Add products to your shop.</div>'+
                    '<div> 3. Get messages by interested buyers through our messaging system.</div>'+
                    '<div style="padding-bottom:5px;"> <strong>Note:</strong> To create your Online Shop you have to be a member of the'+
                     '   Aik Minute network.</div>  </div>  </div>';
    }   
}


            
// CollegeMates Help

 function CollegeMates_Help(x,y)
   {  
     
     if(document.getElementById('helpLayer')!=null)
        {
         if(document.getElementById('helpLayer').style.display !='block')
        
           {
                document.getElementById('helpLayer').style.display='block';
                document.getElementById('helpLayer').style.left=x+"px";
                document.getElementById('helpLayer').style.top=y+"px";
                
            }
        return;
        }
    else
    {
    var divLayer=document.createElement('DIV');
    divLayer.setAttribute('id','helpLayer');
    divLayer.style.left=x+"px";
    divLayer.style.top=y+"px";
    divLayer.style.overflow="hidden";
    divLayer.style.position="absolute";
    divLayer.style.display='block';
    divLayer.style.color='666666';
    divLayer.style.backgroundColor='f9fafa';
    divLayer.style.fontFamily='Tahoma';
    divLayer.style.width='338px';
    divLayer.style.height='100%';
    document.body.appendChild(divLayer);
    divLayer.innerHTML='<div style="text-align:right; padding-right: 5px;  background-image: url(http://www.aikminute.com/images/heading_bg.gif); border-right: #cdcdcd 1px solid; border-left: #cdcdcd 1px solid;">'+
                '<img height="31" src="http://www.aikminute.com/images/close_normal.jpg" width="24" id="ImgClose" onmouseover="MouseOver()" onmouseout="MouseOut()" onclick="return imgClose_onclick_help()" /></div>'+
                '<div style="padding-left:10px; padding-right:10px;border-left:solid 1px #cdcdcd; border-right:solid 1px #cdcdcd; border-bottom:solid 1px #cdcdcd">'+
                '<div ><div style="font-weight:bold; padding-top:5px;">College Mates </div>'+
                    '<div >Now your beloved institutes get their online presence. Create your profile'+
                        'and find and share information with your old school/college mates.'+
                    '</div><div style="padding-bottom:5px;">Send free SMS to any number in Pakistan or do real time chat with your friends on their cell phones by signing up at Aikminute.com</div></div></div>';
    }   
}
    


      
        
// Success Message Layer

function SuccessMsgLayer(content){


  if(document.getElementById('MsgLayer')!=null)
        {
         
                document.getElementById('MsgLayer').style.display='block';
                document.getElementById('MsgLayer').style.left="300px";
                document.getElementById('MsgLayer').style.top="300px";
                document.getElementById('MsgLayer').innerHTML=  
                '<img height="31" src="http://www.aikminute.com/images/close_normal.jpg" width="24" id="ImgClose" onmouseover="MouseOver()" onmouseout="MouseOut()" style="position:relative; left: 346px; top: 0px; cursor:default" onclick="imgClose(\'MsgLayer\')" />'+
                 '<img  src="http://localhost/aikminute/images/information.jpg" style="position:relative; left: -23px; top: 43px;cursor:default;"><p style="padding-left:35px; color:#666666; cursor:default;">'+content+'</p>'+
                '<img src="http://www.aikminute.com/images/close_bt.jpg" style="position:relative; left: 287px; top: 22px; cursor:default;" onclick="imgClose(\'MsgLayer\')" />';
        }
    else
        {
            var divLayer=document.createElement('DIV');
            divLayer.setAttribute('id','MsgLayer');
            divLayer.style.backgroundColor="#f4f5f7";                
            divLayer.style.left="300px";
            divLayer.style.top="300px";
            divLayer.style.overflow="hidden";
            divLayer.style.borderRight="#cdcdcd 1px solid";
            divLayer.style.borderLeft="#cdcdcd 1px solid";
            divLayer.style.width="373px";
            divLayer.style.height="150px";
            divLayer.style.borderBottom="#cdcdcd 1px solid";
            divLayer.className="moveable";            
            document.body.appendChild(divLayer);
            divLayer.innerHTML=  
                '<img height="31" src="http://www.aikminute.com/images/close_normal.jpg" width="24" id="ImgClose" onmouseover="MouseOver()" onmouseout="MouseOut()" style="position:relative; left: 346px; top: 0px; cursor:default" onclick="imgClose(\'MsgLayer\')" />'+
             '<img  src="http://localhost/aikminute/images/information.jpg" style="position:relative; left: -23px; top: 43px;cursor:default;"><p style="padding-left:35px; color:#666666; cursor:default;">'+content+'</p>'+
             '<img src="http://www.aikminute.com/images/close_bt.jpg" style="position:relative; left: 287px; top: 22px; cursor:default;" onclick="imgClose(\'MsgLayer\')" />';
     
     }
}             

